10
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
9
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
Texto de pré-visualização
SAEED B NIKU INTRODUCTION TO ROBOTICS ANALYSIS CONTROL APPLICATIONS THIRD EDITION with website WILEY Introduction to Robotics Introduction to Robotics MixQuestions are a little harder than the ones you saw in the previous section Use your knowledge of variables and expressions to work through these problems Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku PhD PE California Polytechnic State University California USA This edition first published 2020 2020 John Wiley Sons Ltd Edition History Prentice Hall 1e 2001 and John Wiley sons 2e 2011 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise except as permitted by law Advice on how to obtain permission to reuse material from this title is available at httpwwwwileycomgopermissions The right of Saeed B Niku to be identified as the author of this work has been asserted in accordance with law Registered Offices John Wiley Sons Inc 111 River Street Hoboken NJ 07030 USA John Wiley Sons Ltd The Atrium Southern Gate Chichester West Sussex PO19 8SQ UK Editorial Office The Atrium Southern Gate Chichester West Sussex PO19 8SQ UK For details of our global editorial offices customer services and more information about Wiley products visit us at wwwwileycom Wiley also publishes its books in a variety of electronic formats and by printondemand Some content that appears in standard print versions of this book may not be available in other formats Limit of LiabilityDisclaimer of Warranty MATLAB is a trademark of The MathWorks Inc and is used with permission The MathWorks does not warrant the accuracy of the text or exercises in this book This books use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB software While the publisher and authors have used their best efforts in preparing this work they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties including without limitation any implied warranties of merchantability or fitness for a particular purpose No warranty may be created or extended by sales representatives written sales materials or promotional statements for this work The fact that an organization website or product is referred to in this work as a citation andor potential source of further information does not mean that the publisher and authors endorse the information or services the organization website or product may provide or recommendations it may make This work is sold with the understanding that the publisher is not engaged in rendering professional services The advice and strategies contained herein may not be suitable for your situation You should consult with a specialist where appropriate Further readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages including but not limited to special incidental consequential or other damages Library of Congress CataloginginPublication Data Names Niku Saeed B Saeed Benjamin author Title Introduction to robotics analysis control applications Saeed B Niku Description Third edition Hoboken Wiley 2020 Includes bibliographical references and index Identifiers LCCN 2019024969 print LCCN 2019024970 ebook ISBN 9781119527626 cloth ISBN 9781119527596 adobe pdf ISBN 9781119527602 epub Subjects LCSH Robotics Classification LCC TJ211 N547 2019 print LCC TJ211 ebook DDC 629852dc23 LC record available at httpslccnlocgov2019024969 LC ebook record available at httpslccnlocgov2019024970 Cover Design Wiley Cover Images 3D outline Robotic arm cherezoffGetty Images Blue abstract modern background PobytovGetty Images Set in 1113pt Warnock by SPi Global Pondicherry India 10 9 8 7 6 5 4 3 2 1 Dedicated to Shohreh Adam and Alan Niku and to Sara Niku and the memory of Saleh Niku 4 Tickets to the school play cost 4 for adults and 2 for children There were 42 people at the play and 124 was collected How many adults were there at the play Explain how you know Contents Preface xv About the Companion Website xix 1 Fundamentals 1 11 Introduction 1 12 What Is a Robot 2 13 Classification of Robots 3 14 What Is Robotics 3 15 History of Robotics 3 16 Advantages and Disadvantages of Robots 4 17 Robot Components 5 18 Robot Degrees of Freedom 7 19 Robot Joints 9 110 Robot Coordinates 9 111 Robot Reference Frames 11 112 Programming Modes 12 113 Robot Characteristics 13 114 Robot Workspace 13 115 Robot Languages 14 116 Robot Applications 17 117 Other Robots and Applications 23 118 Collaborative Robots 28 119 Social Issues 29 120 Summary 30 References 30 Problems 32 2 Kinematics of Serial Robots Position Analysis 35 21 Introduction 35 22 Robots as Mechanisms 35 23 Conventions 37 24 Matrix Representation 37 241 Representation of a Point in Space 37 242 Representation of a Vector in Space 38 243 Representation of a Frame at the Origin of a FixedReference Frame 40 244 Representation of a Frame Relative to a Fixed Reference Frame 41 245 Representation of a Rigid Body 42 25 Homogeneous Transformation Matrices 45 26 Representation of Transformations 46 vii 261 Representation of a Pure Translation 46 262 Representation of a Pure Rotation about an Axis 47 263 Representation of Combined Transformations 50 264 Transformations Relative to the Current Moving Frame 52 265 Mixed Transformations Relative to Rotating and Reference Frames 53 27 Inverse of Transformation Matrices 54 28 Forward and Inverse Kinematics of Robots 59 29 Forward and Inverse Kinematic Equations Position 60 291 Cartesian Gantry Rectangular Coordinates 60 292 Cylindrical Coordinates 61 293 Spherical Coordinates 63 294 Articulated Coordinates 65 210 Forward and Inverse Kinematic Equations Orientation 65 2101 Roll Pitch Yaw RPY Angles 65 2102 Euler Angles 68 2103 Articulated Joints 70 211 Forward and Inverse Kinematic Equations Position and Orientation 70 212 DenavitHartenberg Representation of Forward Kinematic Equations of Robots 70 213 The Inverse Kinematic Solution of Robots 84 2131 General Solution for Articulated Robot Arms 86 214 Inverse Kinematic Programming of Robots 89 215 DualArm Cooperating Robots 91 216 Degeneracy and Dexterity 92 2161 Degeneracy 92 2162 Dexterity 93 217 The Fundamental Problem with the DenavitHartenberg Representation 93 218 Design Projects 95 2181 StairClimbing Robot 96 2182 A 3DOF Robot 96 2183 A 3DOF Mobile Robot 98 219 Summary 99 References 99 Problems 99 3 Robot Kinematics with ScrewBased Mechanics 111 31 Introduction 111 32 What Is a Screw 111 33 Rotation about a Screw Axis 112 34 Homogenous Transformations about a General Screw Axis 115 35 Successive ScrewBased Transformations 119 36 Forward and Inverse Position Analysis of an Articulated Robot 120 37 Design Projects 127 38 Summary 127 Additional Reading 128 Problems 128 4 Kinematics Analysis of Parallel Robots 133 41 Introduction 133 42 Physical Characteristics of Parallel Robots 134 43 The DenavitHartenberg Approach vs the Direct Kinematic Approach 139 Contents viii 44 Forward and Inverse Kinematics of Planar Parallel Robots 140 441 Kinematic Analysis of a 3RPR Planar Parallel Robot 141 442 Kinematic Analysis of a 3RRR Planar Parallel Robot 143 45 Forward and Inverse Kinematics of Spatial Parallel Robots 147 451 Kinematic Analysis of a Generic 66 StewartGough Platform 147 452 Kinematic Analysis of a Generic 63 StewartGough Platform 152 453 Kinematic Analysis of a 3Axis RSSType Parallel Robot 154 454 Kinematic Analysis of a 4Axis RSSType Parallel Robot 160 455 Kinematic Analysis of a 3Axis PSSType Parallel Robot 167 46 Other Parallel Robot Configurations 169 47 Design Projects 169 48 Summary 170 References 170 Problems 170 5 Differential Motions and Velocities 173 51 Introduction 173 52 Differential Relationships 173 53 The Jacobian 174 54 Differential versus LargeScale Motions 176 55 Differential Motions of a Frame versus a Robot 177 56 Differential Motions of a Frame 178 561 Differential Translations 178 562 Differential Rotations about Reference Axes 178 563 Differential Rotation about a General Axis q 179 564 Differential Transformations of a Frame 181 57 Interpretation of the Differential Change 182 58 Differential Changes between Frames 183 59 Differential Motions of a Robot and Its Hand Frame 185 510 Calculation of the Jacobian 185 511 How to Relate the Jacobian and the Differential Operator 188 512 The Inverse Jacobian 191 513 Calculation of the Jacobian with ScrewBased Mechanics 197 514 The Inverse Jacobian for the ScrewBased Method 206 515 Calculation of the Jacobians of Parallel Robots 206 5151 The Jacobian of a Planar 3RRR Parallel Robot 207 5152 The Jacobian of a Generic 66 StewartGough Parallel Robot 208 516 Design Projects 210 5161 The 3DOF Robot 210 5162 The 3DOF Mobile Robot 210 517 Summary 210 References 211 Problems 211 6 Dynamic and Force Analysis 219 61 Introduction 219 62 Lagrangian Mechanics A Short Overview 220 63 Effective Moments of Inertia 229 64 Dynamic Equations for MultipleDOF Robots 229 641 Kinetic Energy 229 Contents ix 642 Potential Energy 234 643 The Lagrangian 234 644 Robots Equations of Motion 234 65 Static Force Analysis of Robots 239 66 Transformation of Forces and Moments between Coordinate Frames 242 67 Design Project 244 68 Summary 244 References 244 Problems 245 7 Trajectory Planning 247 71 Introduction 247 72 Path vs Trajectory 247 73 JointSpace vs CartesianSpace Descriptions 248 74 Basics of Trajectory Planning 249 75 JointSpace Trajectory Planning 252 751 ThirdOrder Polynomial Trajectory Planning 252 752 FifthOrder Polynomial Trajectory Planning 255 753 Linear Segments with Parabolic Blends 257 754 Linear Segments with Parabolic Blends and Via Points 259 755 HigherOrder Trajectories 260 756 Other Trajectories 263 76 CartesianSpace Trajectories 263 77 Continuous Trajectory Recording 267 78 Design Project 268 79 Summary 269 References 269 Problems 269 8 Motion Control Systems 273 81 Introduction 273 82 Basic Components and Terminology 273 83 Block Diagrams 274 84 System Dynamics 274 85 Laplace Transform 278 86 Inverse Laplace Transform 281 861 Partial Fraction Expansion When Fs Involves Only Distinct Poles 281 862 Partial Fraction Expansion When Fs Involves Repeated Poles 282 863 Partial Fraction Expansion When Fs Involves Complex Conjugate Poles 283 87 Transfer Functions 285 88 Block Diagram Algebra 288 89 Characteristics of FirstOrder Transfer Functions 290 810 Characteristics of SecondOrder Transfer Functions 292 811 Characteristic Equation PoleZero Mapping 294 812 SteadyState Error 296 813 Root Locus Method 298 814 Proportional Controllers 303 815 ProportionalPlusIntegral Controllers 306 816 ProportionalPlusDerivative Controllers 308 Contents x 817 ProportionalIntegralDerivative Controller PID 311 818 Lead and Lag Compensators 313 819 Bode Diagram and FrequencyDomain Analysis 313 820 OpenLoop vs ClosedLoop Applications 314 821 MultipleInput and MultipleOutput Systems 314 822 StateSpace Control Methodology 316 823 Digital Control 320 824 Nonlinear Control Systems 322 825 Electromechanical Systems Dynamics Robot Actuation and Control 323 826 Design Projects 326 827 Summary 327 References 327 Problems 327 9 Actuators and Drive Systems 331 91 Introduction 331 92 Characteristics of Actuating Systems 331 921 Nominal Characteristics Weight PowertoWeight Ratio Operating Pressure Voltage and Others 331 922 Stiffness vs Compliance 332 923 Use of Reduction Gears 332 93 Comparison of Actuating Systems 335 94 Hydraulic Actuators 335 95 Pneumatic Devices 337 96 Electric Motors 338 961 Fundamental Differences Between AC and DCType Motors 339 962 DC Motors 341 963 AC Motors 344 964 Brushless DC Motors 345 965 DirectDrive Electric Motors 346 966 Servomotors 346 967 Stepper Motors 347 97 Microprocessor Control of Electric Motors 360 971 Pulse Width Modulation 361 972 Direction Control of DC Motors with an HBridge 363 98 Magnetostrictive Actuators 364 99 ShapeMemory Type Metals 364 910 Electroactive Polymer Actuators EAPs 364 911 Speed Reduction 365 912 Other Systems 367 913 Design Projects 367 914 Summary 370 References 371 Problems 372 10 Sensors 375 101 Introduction 375 102 Sensor Characteristics 375 103 Sensor Utilization 377 Contents xi 104 Position Sensors 378 1041 Potentiometers 378 1042 Encoders 379 1043 Linear Variable Differential Transformer LVDT 382 1044 Resolvers 383 1045 Linear Magnetostrictive Displacement Transducer LMDT or MDT 383 1046 Halleffect Sensors 384 1047 Global Positioning System GPS 384 1048 Other Devices 385 105 Velocity Sensors 385 1051 Encoders 385 1052 Tachometers 385 1053 Differentiation of Position Signal 386 106 Acceleration Sensors 386 107 Force and Pressure Sensors 386 1071 Piezoelectric 386 1072 ForceSensing Resistor 386 1073 Strain Gauge 387 1074 Antistatic Foam 388 108 Torque Sensors 388 109 Microswitches 389 1010 Visible Light and Infrared Sensors 389 1011 Touch and Tactile Sensors 390 1012 Proximity Sensors 391 10121 Magnetic Proximity Sensors 391 10122 Optical Proximity Sensors 391 10123 Ultrasonic Proximity Sensors 392 10124 Inductive Proximity Sensors 392 10125 Capacitive Proximity Sensors 393 10126 Eddy Current Proximity Sensors 393 1013 Range Finders 393 10131 Ultrasonic Range Finders 394 10132 LightBased Range Finders 395 1014 Sniff Sensors 396 1015 Vision Systems 396 1016 VoiceRecognition Devices 396 1017 Voice Synthesizers 397 1018 Remote Center Compliance RCC Device 397 1019 Design Project 400 1020 Summary 400 References 401 11 Image Processing and Analysis with Vision Systems 403 111 Introduction 403 112 Basic Concepts 403 1121 Image Processing vs Image Analysis 403 1122 Two and ThreeDimensional Image Types 403 1123 The Nature of an Image 404 1124 Acquisition of Images 405 Contents xii 1125 Digital Images 405 1126 Frequency Domain vs Spatial Domain 406 113 Fourier Transform and Frequency Content of a Signal 406 114 Frequency Content of an Image Noise and Edges 409 115 Resolution and Quantization 410 116 Sampling Theorem 412 117 ImageProcessing Techniques 415 118 Histograms of Images 415 119 Thresholding 418 1110 Spatial Domain Operations Convolution Mask 419 1111 Connectivity 424 1112 Noise Reduction 426 11121 Neighborhood Averaging with Convolution Masks 427 11122 Image Averaging 428 11123 Frequency Domain 429 11124 Median Filters 429 1113 Edge Detection 430 1114 Sharpening an Image 436 1115 Hough Transform 437 1116 Segmentation 440 1117 Segmentation by Region Growing and Region Splitting 441 1118 Binary Morphology Operations 444 11181 Thickening Operation 446 11182 Dilation 446 11183 Erosion 447 11184 Skeletonization 447 11185 Open Operation 448 11186 Close Operation 448 11187 Fill Operation 448 1119 Gray Morphology Operations 449 11191 Erosion 449 11192 Dilation 449 1120 Image Analysis 449 1121 Object Recognition by Features 450 11211 Basic Features Used for Object Identification 450 11212 Moments 451 11213 Template Matching 456 11214 Discrete Fourier Descriptors 456 11215 Computed Tomography CT 457 1122 Depth Measurement with Vision Systems 457 11221 Scene Analysis vs Mapping 457 11222 Range Detection and Depth Analysis 458 11223 Stereo Imaging 458 11224 Scene Analysis with Shading and Sizes 459 1123 Specialized Lighting 459 1124 Image Data Compression 460 11241 Intraframe Spatial Domain Techniques 460 11242 Interframe Coding 461 11243 Compression Techniques 461 Contents xiii 1125 Color Images 462 1126 Heuristics 462 1127 Applications of Vision Systems 462 1128 Design Project 463 1129 Summary 464 References 464 Problems 465 12 Fuzzy Logic Control 475 121 Introduction 475 122 Fuzzy Control What Is Needed 476 123 Crisp Values vs Fuzzy Values 476 124 Fuzzy Sets Degrees of Truth and Membership 477 125 Fuzzification 477 126 Fuzzy Inference Rules 480 127 Defuzzification 481 1271 Center of Gravity Method 481 1272 Mamdani Inference Method 481 128 Simulation of a Fuzzy Logic Controller 485 129 Applications of Fuzzy Logic in Robotics 487 1210 Design Project 488 1211 Summary 489 References 489 Problems 490 Appendix A 491 Appendix B 499 Index 501 Contents xiv Preface This new third edition of the Introduction to Robotics textbook is the culmination of over a year of intense work If judging the previous edition by the number of instructors who adopted it the number of countries in which it was popularly sold and the number of languages into which it was translated indicates that it was a good book I hope that this new edition is even better It has two completely new chapters on screwbased mechanics and parallel robots it has many new examples and homework problems it has many new subjects in most chapters and the writing has been edited and streamlined throughout And still the old adage from one of my former students whose name I have long forgotten applies in the life of any product there comes a time when you have to shoot the designer and go into production For a book there comes a time that you have to shoot the author and go into publication The intention behind writing this book was and still is to cover most subjects that an engineering student or a practicing engineer who intends to learn about robotics may need to know whether to design a robot to integrate a robot in appropriate applications or to analyze a robot As such it covers all necessary funda mentals of robotics robot components and subsystems and applications The book is intended for senior or introductory graduate courses in robotics as well as for practicing engi neers who would like to learn about robotics Although the book covers a fair amount of mechanics and kinematics of both serial and parallel robots both with the DenavitHartenberg approach as well as screwbased mechanics it also covers microprocessor applications control systems vision systems sensors and actuators Therefore it can easily be used by mechanical engineers electronic and electrical engineers computer engineers and engineering technologists With the chapter about control theory even if the stu dent has not had a controls course he or she can learn enough material to be able to understand robotic control and design The book consists of 12 chapters Chapter 1 covers introductory subjects that familiarize the reader with the necessary background information This includes some historical information robot components robot char acteristics robot languages and robotic applications Chapter 2 explores the forward and inverse kinematics of serial robots including frame representations transformations position and orientation analysis as well as the DenavitHartenberg representation of robot kinematics Chapter 3 covers the kinematics of serial robots with screwbased mechanics Chapter 4 discusses parallel robots of many different types Chapter 5 continues with differential motions and velocity analysis of robots and frames Chapter 6 presents an analysis of robot dynamics and forces Lagrangian mechanics is used as the primary method of analysis and development for this chapter Chapter 7 discusses methods of path and trajectory planning both in joint space and in Cartesian space Chapter 8 covers fundamentals of control engineering including analysis and design tools Among other things it discusses the root locus proportional derivative and integral control as well as electrome chanical system modeling It also includes an introduction to multiple input multiple output MIMO sys tems digital systems and nonlinear systems However the assumption is that students will need additional instruction to be proficient in actually designing systems One chapter on this subject cannot be adequate but can nicely serve as an introduction for majors in which a separate course in control engineering is not offered Chapter 9 covers actuators including hydraulic devices electric motors such as DC servo motors and stepper motors pneumatic devices as well as many other novel actuators It also covers microprocessor control of xv these actuators Although this is not a complete mechatronics book it does cover a fair amount of mecha tronics Except for the design of a microprocessor many aspects of mechatronic applications are covered in this chapter Chapter 10 is a discussion of sensors used in robotics and robotic applications Chapter 11 covers vision systems including many different techniques for image processing and image analysis Chapter 12 discusses the basic principles of fuzzy logic and its applications in microprocessor control and robotics This coverage is not intended to be a complete and thorough analysis of fuzzy logic but an intro duction It is believed that students and engineers who find it interesting will continue on their own Appendix A is a quick review of matrix algebra and some other mathematical facts that are needed throughout this book Appendix B discusses digital image acquisition With the additional new chapters on screwbased mechanics and parallel robots it is almost impossible to cover everything in the book in a quarterbased class with 30 lectures in 10 weeks Therefore for quarter based classes the instructor must make some choices as to which subjects should be included Depending on other classes the student takes certain material may be skipped For example students at Cal Poly San Luis Obispo all take a required controls class and most have a mechatronics class Therefore we can skip chapters on these subjects However for a semesterbased 14week class with 3 lectures per week there is ample material and time to cover the entirety of the book The following breakdown can be used as a model for setting up a course in robotics in a quarter system In this case certain subjects must be eliminated or shortened as shown Introductory material and review 1 lecture Kinematics of position 6 lectures Screwbased mechanics 2 lectures Parallel robots 3 lectures Differential motions 4 lectures Robot dynamics and force control 2 lectures Path and trajectory planning 1 lecture Actuators 2 lectures Sensors 2 lectures Vision systems 5 lectures Fuzzy logic 1 lecture Exam 1 lecture Alternately for a 14week long semester course with 3 lectures per week the course may be set up as follows Introductory material and review 2 lectures Kinematics of position 7 lectures Screwbased mechanics 2 lectures Parallel robots 3 lectures Differential motions 5 lectures Robot dynamics and force control 4 lectures Path and trajectory planning 3 lectures Robot control and modeling 4 lectures Actuators 2 lectures Sensors 2 lectures Vision systems 5 lectures Fuzzy logic 1 lecture Exam 1 lecture The book also features design projects that start in Chapter 2 and continue throughout the book At the end of each chapter the student is directed to continue with the design projects in reference to the present sub ject Therefore by the end of the book they may complete their project Preface xvi I would like to thank all the people who in one way or another have helped me This includes my collea gues including Drs Bill Murray Charles Birdsong Lynne Slivovsky and John Ridgely all the countless indi viduals who did the research development and hard work that came before my time and that enabled me to learn the subject myself all the users and students and anonymous reviewers who made countless sugges tions to improve each edition Dr Thomas Cavicchi Dr Norali Pernalete Dr Fernando Gonzalez as well as my students Tomy Tran Jonathon Sather Jonathon Stearns and Trent Peterson and the students who helped with the design and development of projects at Cal Poly including the Robotics Club I also thank Sandra Grayson the acquisition editor at Wiley Louis Manoharan my project editor Sathishwaran Pathba nabhan my production editor Tiffany Taylor my copyeditor and the editors and the artists who made the book look as it does Finally I thank my family Shohreh Adam and Alan who always inspire me in every thing I do Their patience is much appreciated To all of you my sincere thanks I hope that you will enjoy reading the book and more importantly that you will learn the subject The joy of robotics comes from learning it Saeed Benjamin Niku PhD PE San Luis Obispo California 2019 Preface xvii 15 Juice Mix Selenas juice mix calls for 2 cups of lemonade for every 5 cups of cranberry juice If she wants to make 14 cups of juice mix how many cups of lemonade does she need 16 Car Trip Kym traveled 104 miles in 2 hours How many miles did she travel each hour 17 Snack Mix Evans party snack mix calls for 1 cup of pretzels for every 3 cups of cheese crackers If Evan wants to make 16 cups of snack mix how many cups of cheese crackers does he need About the Companion Website This book is accompanied by a companion website wwwwileycomgoniku3ed The website includes 1 Robotics related articles 2 Robotics related clips 3 Information about websites companies equipment manufacturers and service providers 4 New project ideas 5 Additional homework problems 6 Other robotics related material of interest 7 Additional comment and correctionserrata Scan this QR code to visit the companion website xix Memory Location Translator CONTINUED HEX DDDDDDDD DDDDDD7D7 ADDER TRANSLATOR 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 PA 00 01 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD DSP IFM MEM DEV FREE 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 AD 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 A A A A A A A A A A A A PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD MOD VIA RES FREE FREE FREE FREE FREE 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 PA 00 01 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 PFD PFD PFD PFD PFD PFD PFD DSP IFM MEM DEV FREE FREE FREE FREE FREE 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 AD 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 A A A A A A A A A A A A FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21 22 23 24 25 26 27 28 29 30 31 PD 00 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21 22 23 24 25 26 27 28 29 30 31 32 33 PD 00 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 55 Code snippet include stdioh int main int n i long long factorial 1 printfEnter an integer scanfd n if n 0 printfError Factorial of a negative number doesnt exist else for i 1 i n i factorial i printfFactorial of d llu n factorial return 0 153 FLIGHT CREW SINGLEPILOT OPERATIONS Singlepilot operations are those operations conducted with a single pilot in the flight deck crewmember compartment and where the single pilot is responsible for the safe conduct of the flight or segment of the flight SINGLEPILOT CREW OPERATING REQUIREMENTS Required Obstacles Clearance Altitude ROCA on all IFR flight segments Minimum Safe Altitude MSA or Minimum Reception Altitude MRA whichever is higher or Minimum IFR Altitude for all IFR flight segments Pilots must be fully qualified Flights must be conducted in accordance with the approved Charter operations specifications and company procedures The operator must have a flight watch capability for commercial operations Single pilot operations must be approved by the designerconstructor of the aircraft The pilot must possess an appropriate FAA commercial or ATP certificate If the pilot chooses or if the certificate holder requires a second crew member must be available to operate the aircraft Operators must notify the FAA prior to conducting singlepilot operations The pilot must be qualified to operate the specific aircraft make and model A flight following system must be in place and maintained Equipment malfunctions and system failures must be immediately reported Proper procedures must be followed for safe singlepilot operations Operators must provide adequate training for pilots conducting singlepilot operations 1 Fundamentals 11 Introduction Robotics the fascinating world of creating devices that mimic living creatures and are capable of perform ing tasks and behaving as if they are almost alive and able to understand the world around them has been on humans minds since the time we could build things You may have seen machines made by artisans which try to mimic humans motions and behavior Examples include the statues in Venices San Marcos clock tower that hit the clock on the hour figurines that tell a story in the fifteenth century astronomical clock on the side of the Old Town Hall tower in Prague and the systems that Leonardo da Vinci sketched in his notebooks Toys from very simple types to very sophisticated machines with repeating movements are other examples In Hollywood movies have even portrayed robots and humanoids as superior to humans Although humanoids autonomous cars and mobile robots are fundamentally robots and are designed and governed by the same basics in this book we primarily study industrial manipulatortype robots This book covers some basic introductory material that familiarizes you with the subject presents an analysis of the mechanics of robots including kinematics dynamics and trajectory planning and discusses the ele ments that are used in robots and in robotics such as actuators sensors vision systems and so on Robot rovers are no different although they usually have fewer degrees of freedom DOF and generally move in a plane Exoskeletal and humanoid robots walking machines and robots that mimic animals and insects have many DOF and may possess unique capabilities However the same principles we learn about manip ulators apply to robot rovers too whether kinematics differential motions dynamics or control Robots are very powerful elements of todays industry They are capable of performing many different tasks and operations are accurate and do not require common safety and comfort elements humans need including in hazardous environments such as underwater disaster areas and space However it takes much effort and many resources to make a robot function properly Most of the hundreds of com panies that made robots in the mid1980s are gone and with few exceptions only companies that make real industrial robots have remained in the market such as OMRON Adept Stäubli ABB FANUC KUKA Epson Motoman DENSO Fuji Yaskawa Kawasaki and Universal Robots as well as specialty robotic companies such as MAKO Surgical Corp and Intuitive Although there are several million robots working in factories and the numbers are growing early industrialists predictions about the pos sible number of robots in industry never materialized because high expectations could not be met with the present robots Innovations such as artificial intelligence embedded in robots and new types of robots such as parallel robots have improved the situation and will continue to do so However robots are used where they are useful Like humans robots can do certain things but not others As long as they are designed properly for the intended purposes they are very useful and continue to be used Current predictions indicate sustained growth in the number of robots used in industry in many different forms from manufacturing and assembly to selfdriving delivery robots and from autonomous vehicles to domestic workers 14 1 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed The subject of robotics covers many different areas Robots alone are hardly ever useful they are used together with peripheral devices and other manufacturing machines They are generally integrated into a system which as a whole is designed to perform a task or do an operation In this book we will refer to some of these other devices and systems that are used with robots 12 What Is a Robot If you compare a conventional robot manipulator with a crane attached to lets say a utility or towing vehicle you will notice that the robot manipulator is very similar to the crane Both possess a number of links attached serially to each other with joints where each joint can be moved by some type of actuator In both systems the hand of the manipulator can be moved in space and placed in any desired location within the workspace of the system Each one can carry a certain load and in each a central controller controls the actuators However one is called a robot and the other is called a manipulator or in this case a crane Similarly materialhandling manipulators that move heavy objects in manufacturing plants look just like robots but they are not robots The fundamental difference between the two is that the crane and the manipulator are controlled by a human who operates and controls the actuators whereas the robot manipulator is controlled by a computer or microprocessor that runs a program Figure 11 This difference determines whether a device is a simple manipulator or a robot In general robots are designed and meant to be controlled by a computer or similar device The motions of the robot are con trolled through a controller under the supervision of the computer which is running some type of pro gram Therefore if the program is changed the actions of the robot will change accordingly The intention is to have a device that can perform many different tasks consequently it is very flexible in what it can do without having to be redesigned Therefore the robot is designed to be able to perform many tasks based on the running programs simply by changing the program The simple manipulator or the crane cannot do this without an operator running it all the time Different countries have different standards for what they consider a robot In American standards a device must be easily reprogrammable to be considered a robot Therefore manual handling devices devices that have multiple degrees of freedom and are actuated by an operator and fixedsequence robots devices a b Figure 11 a A Dalmec manipulator b a KUKA robot Although they are both handling large loads one is controlled by a human operator and the other is controlled by a controller Source Reproduced with permission from Dalmec USA and Kuka Robotics Introduction to Robotics 2 controlled by hard stops to control actuator motions on a fixed sequence which is difficult to change are not considered robots 13 Classification of Robots The following is a general list of classifications of devices that are considered robots Different countries have different classifications and consequently the number of robots in use in a country may be influenced by the definition Fixedsequence robot A device that performs the successive stages of a task according to a predeter mined unchanging method that is hard to modify Playback robot A human operator performs a task manually by leading the robot which records the motions for later playback The robot repeats the same motions according to the recorded information Numericalcontrol robot The operator supplies the robot with a movement program rather than teaching it the task manually Intelligent robot A robot with the means to understand its environment and the ability to successfully complete a task despite changes in the surrounding conditions under which it is to be performed 14 What Is Robotics Robotics is the art knowledge base and knowhow of designing applying and using robots in human endea vors Robotic systems consist of not just robots but also other devices and systems that are used together with the robots Robots may be used in manufacturing environments in underwater and space exploration in researching human and animal behavior for aiding the disabled for transportation and delivery for military purposes or even for fun In any capacity robots can be useful but need to be programmed and controlled Robotics is an interdisciplinary subject that benefits from mechanical engineering electrical and electronic engineering computer science cognitive sciences biology and many other disciplines 15 History of Robotics Disregarding the early machines that were made to mimic humans and their actions and concentrating on recent history we can see a close relationship between the state of industry the revolution in numeric and computer control of machinery nuclear material handling space exploration and the vivid imagination of creative people Starting with Karel Capek and his play RUR Rossums Universal Robots 5 and later movies like Flash Gordon Metropolis Lost in Space The Day the Earth Stood Still and Forbidden Planet 6 the stage was set for a machine to be built to do a humans job and of course R2D2 C3PO Robocop Transformers the Bicentennial Man and others continued the trend Capek dreamed of a scenario where a bioprocess could create humanlike machines devoid of emotions and souls who were strong beyond their masters and could be produced quickly and cheaply Soon the mar ket grew tremendously when all major countries wanted to equip their armies with hundreds of thousands of slave robotic soldiers who would fight with dedication but whose death would not matter Eventually the robots decided that they were actually superior to the humans took over the whole world and killed eve ryone In this story the word rabota or worker was coined and it is used even today After World War II automatic machines were designed to increase productivity and machinetool man ufacturers made numerically controlled NC machines to enable manufacturers to produce better products At the same time multiDOF manipulators were developed for work on nuclear materials Integration Fundamentals 3 between the NC capability of machine tools and the manipulators created a simple robot The first robots movements were controlled using strips of paper with holes which electric eyes could detect As industry improved the strip of paper gave way to magnetic tapes memory devices and personal computers and microprocessors The following is a summary of events that have marked changes in the direction of this industry 1922 Czech author Karel Capek wrote a story called RUR Rossums Universal Robots and introduced the word rabota worker 1946 George Devol developed the magnetic controller a playback device J Presper Eckert and John Mauchly built the ENIAC computer at the University of Pennsylvania 1952 The first numerically controlled machine was built at MIT 1954 Devol developed the first programmable robot 1955 Jacques Denavit and Richard Hartenberg developed kinematic notation for lowerpair mechanisms based on matrices 1961 US patent 2988237 was issued to Devol for Programmed Article Transfer a basis for Unimate robots 1962 Unimation was formed the first industrial robots appeared and GM installed its first robot from Unimation 1967 Unimation introduced the Mark II robot The first robot was imported to Japan for paint spraying applications 1968 An intelligent robot called Shakey was built at the Stanford Research Institute SRI 1972 IBM worked on a rectangular coordinate robot for internal use It eventually developed the IBM 7565 for sale 1973 Cincinnati Milacron introduced the T3 model robot which became very popular in industry 1978 The first PUMA robot was shipped to GM by Unimation 1982 GM and FANUC of Japan signed an agreement to build GMFanuc robots 1983 Robotics became a very popular subject both in industry as well as academia Many programs in the nation started teaching robotic courses 2000 The first ASIMO humanoid robot was introduced by Honda 2001 The FDA approved the use of the da Vinci surgical robot in the United States 2008 Universal Robots made the first collaborative robot cobot available to the market followed by Rethink in 2011 2010present Many new robots autonomous vehicles drones sensors and associated devices have appeared and have become common 16 Advantages and Disadvantages of Robots Robotics and automation can in many situations increase productivity safety efficiency quality and consistency of products Robots can work in hazardous environments such as radiation darkness hot and cold ocean bot toms space and so on without the need for life support comfort or concern for safety Introduction to Robotics 4 Robots need no environmental comfort like lighting air conditioning ventilation and noise protection Robots work continuously without tiring or fatigue or boredom They do not get mad do not have hangovers and need no medical insurance or vacation Robots have repeatable precision at all times unless something happens to them or unless they wear out Robots can be much more accurate than humans Typical linear accuracies are a few tenthousandths of an inch New waferhandling robots have microinch accuracies Robots and their accessories and sensors can have capabilities beyond those of humans Robots can process multiple stimuli or tasks simultaneously Humans can only process one active stimulus Robots replace human workers causing economic hardship worker dissatisfaction and resentment and the need for retraining the replaced workforce Robots lack the capability to respond in emergencies unless the situation is predicted and the response is included in the system Safety measures are needed to ensure that they do not injure operators and other machines that are working with them 7 This includes Inappropriate or wrong responses Lack of decisionmaking power Loss of power Damage to the robot and other devices Injuries to humans Robots although superior in certain senses have limited capabilities in Cognition creativity decision making and understanding Degrees of freedom and dexterity Sensors and vision systems Realtime response Robots are costly due to Initial cost of equipment and installation Need for integration into the manufacturing processes Need for peripherals Need for training Need for programming 17 Robot Components A robot as a system consists of the following elements which are integrated together to form a whole Manipulator or rover This is the main body of the robot which consists of the links joints and other structural elements of the robot Without other elements the manipulator alone is not a robot Figure 12 shows the manipulator part of an industrial 6axis robot End effector This is the part that is connected to the last joint hand of a manipulator and that generally handles objects makes connection to other machines or performs required tasks Figure 13 Robot man ufacturers generally do not design or sell end effectors In most cases all they supply is a simple gripper Generally the hand of a robot has provisions for attaching specialty end effectors that are specifically designed for a purpose It is the job of a companys engineers or outside consultants to select or design and install the end effector on the robot and to make it work for the given situation Welding torches paint spray guns gluelaying devices and parts handlers are but a few examples In most cases either the action of the end effector is controlled by the robots controller through the signals it sends to the end effector or the controller communicates with the end effectors controlling device such as a programmable logic controller PLC Fundamentals 5 Actuators Actuators are the muscles of the manipulators The controller sends signals to the actuators which in turn move the robots joints and links Common types are servomotors stepper motors pneumatic actuators and hydraulic actuators Other novel actuators are used in specific situations this will be discussed later in Chapter 9 Actuators are under the control of the controller Sensors Sensors are used to collect information about the internal state of the robot or to communicate with the outside environment The robot controller needs to know where each link of the robot is in order to know what the robots configuration is It is similar for a human when you wake up even without opening your eyes or when it is completely dark you still know where your arms and legs are This is because feedback sensors in your central nervous system embedded in muscle tendons send information to your brain The brain uses this information to determine the length of your muscles and consequently the state of your arms legs and so on The same is true for robots where sensors integrated into the robot send information about each joint or link to the controller which determines the configuration of the robot Also similar to your major senses of sight touch hearing taste smell and speech robots are equipped with external sensory Figure 12 The 6axis Yaskawa GP7 robot body Source Reproduced with permission from Yaskawa Electric a b Figure 13 End effectors a A FANUC robot Source Courtesy of Fanuc America Corp b A Sawyer robot Source Courtesy of Rethink Robotics GmbH Introduction to Robotics 6 devices such as a vision system touch and tactile sensors a speech synthesizer and so on that enable the robot to communicate with the outside world Controller The controller is rather similar to your cerebellum although it does not have the power of the brain it still controls your motions The controller receives its data from the processor the brain of the sys tem controls the motions of the actuators and coordinates the motions with the sensory feedback infor mation Suppose that in order for the robot to pick up a part from a bin it is necessary that its first joint be at 35 If the joint is not already at this magnitude the controller sends a signal to the actuator a current to an electric motor air to a pneumatic cylinder or a signal to a hydraulic servo valve causing it to move It then measures the change in the joint angle through the feedback sensor attached to the joint a potentiometer an encoder and so on When the joint reaches the desired value the signal is stopped In more sophisticated robots the velocity of the end plate and the force exerted by the robot are also controlled by the controller Processor The processor is the brain of the robot It calculates the motions of the robots joints based on the programs it runs determines how much and how fast each joint must move to achieve the desired loca tion and speeds and oversees the coordinated actions of the controller and the sensors The processor is generally a computer which works like all other computers but is dedicated to this purpose It requires an operating system programs and peripheral equipment like a monitor and it has the same limitations and capabilities In some systems the controller and the processor are integrated together into one unit In others they are separate units And in some although the controller is provided by the manufacturer the processor is not the manufacturer expects the user to provide their own processor Software Three groups of software programs are used in a robot i The operating system operates the processor ii Robotic software calculates the necessary motions of each joint based on the kinematic equa tions of the robot This information is sent to the controller This software may be at many different levels from machine language to sophisticated languages used by modern robots iii A collection of application oriented routines and programs are developed in order to use the robot or its peripherals for specific tasks such as assembly machine loading material handling and so on This includes additional vision routines when the robot is equipped with a vision system 18 Robot Degrees of Freedom As you may already know in order to locate a point in space we need to specify three coordinates such as x y and zcoordinates along the three Cartesian axes Three coordinates are necessary and adequate to com pletely define the location of the point Although different coordinate systems may be used to express this information they are always necessary However neither two nor four will be possible two is inadequate to locate a point in space and four is illogical as there is simply too much information For example a device like a crane can move to any location within its workspace To locate a rigid body a threedimensional object rather than a point in space we first need to specify the location of a selected point on it and therefore we require three pieces of information Next we also need to specify the orientation of the object to fully specify it in space This means that six pieces of information are needed to fully specify the location and orientation of a rigid body By the same token there need to be 6 degrees of freedom DOF available to fully place the object in space and also orientate it as desired For this reason robots need to have 6 DOF to be able to freely place and orientate objects within their workspace A robot that has 6 DOF can be requested to place objects at any desired location and orientation If a robot has fewer DOF we cannot arbitrarily specify any location and orientation for the robot it can only go to places and to orientations that the fewer joints allow To demonstrate this consider a robot with 3 DOF where it can only move along the x y and zaxes In this case no orientation can be specified all the robot can do is pick up a part and move it in space parallel to the reference axes The orientation always remains the same Now consider another robot with 5 DOF capable of rotating about the three axes but only moving along the x and yaxes Although you may specify any orientation desired the positioning of the part is only possible along the x and y but not z axes The same is true for any other robot configurations Fundamentals 7 A system with 7 DOF would not have a unique solution This means that if a robot has 7 DOF there are infinite ways it can position a part and orient it at the desired location In order for the controller to know what to do there must be an additional decisionmaking routine that allows it to pick only one of the infinite solutions As an example we may use an optimization routine to pick the fastest or the shortest path to the desired destination Then the computer has to check all solutions to find the shortest or fastest response and perform it Due to this additional requirement which can take much computing power and time no 7DOF robot is used in industry A similar issue arises when a manipulator robot is mounted on a moving base such as a mobile platform or a conveyor belt In either case the robot has an additional degree of freedom which based on the previous discussion is impossible to control The robot can be at a desired location and ori entation from infinite distinct positions on the conveyor belt or mobile platform However in this case the additional DOF are known and there is no need to solve for them When a robot is mounted on a con veyor belt or a track as shown in Figure 14 or is otherwise mobile the location of the base of the robot relative to the belt or other reference frame is known Since this location does not need to be defined by the controller the remaining number of DOF is still 6 and consequently unique As long as the location of the base of the robot on the belt or the location of the mobile platform is known or selected by the user there is no need to find it by solving the set of equations of robot motions and as a result the system can be solved Can you determine how many DOF the human arm has This should exclude the hand palm and fingers but should include the wrist Think about this before going on The human arm has three joint clusters the shoulder the elbow and the wrist The shoulder has 3 DOF since the upper arm humerus can rotate in the sagittal plane parallel to the midplane of the body in the coronal plane a plane from shoulder to shoulder and about the humerus verify this by rotating your arm about the three different axes The elbow has only one degree of freedom it can only flex and extend about the elbow joint The wrist also has 3 DOF It can abduct and adduct and flex and extend and since the radius bone can roll over the ulna it can rotate longitudinally pronate and supinate Consequently the human arm Figure 14 The robot can move along a track adding a degree of freedom to the system Source Reproduced with permission from Kuka Robotics Introduction to Robotics 8 has a total of 7 DOF even if the ranges of some movements are small Since a 7DOF system does not have a unique solution how do you think we can use our arms Note that the end effector of the robot is never included in the DOF count All robots have this additional capability which may appear to be similar to a degree of freedom However none of the movements in the end effector are counted towards the robots DOF In some cases the movements of a joint may not be fully controllable For example when a pneumatic actuator is used to move a joint it can only be fully turned on or off fully extended or fully retracted but nothing in between In this case the convention is to assign only a half a degree of freedom to the joint This means that the joint can only be at specified locations within its limits of movement Another possibility for a half degree of freedom is to assign only particular values to the joint For example suppose that a joint is made to be only at 0 30 60 and 90 degrees Then as before the joint is limited to only a few possibilities and therefore it has a partial degree of freedom Many industrial robots possess fewer than 6 DOF Robots with 35 4 and 5 DOF are in fact very common As long as there is no need for the additional DOF these robots perform very well As an example suppose that you intend to insert electronic components into a circuit board The circuit board is always laid flat on a known work surface consequently its height z value relative to the base of the robot is known There fore there is only a need for 2 DOF along the x and yaxes to specify any location on the board for inser tion Additionally suppose that the components are to be inserted in any direction about the vertical axis In that case there is a need for one degree of freedom to rotate about the vertical axis z in order to orient the component above the surface Since there is also a need for half a degree of freedom to fully extend the end effector to insert the part or to fully retract it to lift the end effector before moving only 35 DOF are needed 2 to move over the board 1 to rotate the component and 05 to insert or retract Insertion robots are very common and are extensively used in electronic industry Their advantage is that they are simple to program less expensive smaller and faster Their disadvantage is that although they may be programmed to insert components on any size board in any direction they cannot perform other jobs They are limited to what 35 DOF can achieve but they can perform a variety of functions within this design limit 19 Robot Joints Robots may have different types of joints such as linear rotary sliding and spherical Spherical joints are common in many systems but they possess multiple DOF and therefore are difficult to control Conse quently they are not common in robotics except in research 8 Most robots have either a linear prismatic or a rotary revolute joint Prismatic joints are linear there is no rotation involved They are either hydraulic or pneumatic cylinders or linear electric actuators These joints are used in gantry cylindrical or spherical robots Revolute joints are rotary and although hydraulic and pneumatic rotary joints are common most rotary joints are electrical driven either by stepper motors or more commonly by servomotors 110 Robot Coordinates Robot configurations generally follow the common coordinate frames with which they are defined as shown in Figure 15 Prismatic joints are denoted by P revolute joints are denoted by R and spherical joints are denoted by S Robot configurations are specified by a succession of P R andor S designations For example a robot with three prismatic and three revolute joints is specified by 3P3R The following configurations are common for positioning the hand of the robot Cartesianrectangulargantry 3P These robots use three prismatic joints to position the end effec tor usually followed by additional revolute joints that orient the end effector Fundamentals 9 Cylindrical PRP Cylindrical coordinate robots have two prismatic joints and one revolute joint for positioning the part plus revolute joints for orientation Spherical P2R Spherical coordinate robots follow a spherical coordinate system which has one prismatic and two revolute joints for positioning the part plus additional revolute joints for orientation Articulatedanthropomorphic 3R An articulated robots joints are all revolute similar to a humans arm They are the most common configuration for industrial robots Selective Compliance Assembly Robot Arm SCARA SCARA robots have two or three revolute joints that are parallel and allow the robot to move in a horizontal plane plus an additional prismatic joint that moves vertically Figure 16a SCARA robots are very common in assembly operations Cartesian Cylindrical Spherical Articulated SCARA Figure 15 Common robot coordinate frames for serial robots a b Figure 16 a A DENSO SCARA robot Source Courtesy of Denso Robotics b The Adept Quattro s650H robot Source Omron Automation 2018 Omron All Rights Reserved Introduction to Robotics 10 Their specific characteristic is that they are more compliant in the xy plane but are very stiff along the zaxis therefore providing selective compliance This is an important issue in assembly and will be discussed in Chapter 10 Parallel robots Parallel robots differ in their configuration from serial robots and are discussed in Chapter 4 Figure 16b shows a typical parallel robot 111 Robot Reference Frames Robots may be moved relative to different coordinate frames as follows resulting in different motions Figure 17 World reference frame This is a universal coordinate frame as defined by x y and zaxes In this case the joints of the robot move simultaneously in a coordinated manner to create motions along the three major axes In this frame no matter where the arm is a positive movement along the xaxis x y z World Reference Frame Joint Reference Frame x y z n o a y z Tool Reference Frame x n o a Figure 17 A robots World Joint and Tool reference frames Most robots may be programmed to move relative to any of these reference frames Fundamentals 11 is always in the plus direction of the xaxis and so on The World reference frame is used to define the motions of the robot relative to other objects define other parts and machines with which the robot communicates and define motion trajectories Joint reference frame This is used to specify movements of individual joints of the robot In this case each joint is accessed and moved individually and therefore only one joint moves at a time Depending on the type of joint used prismatic revolute or spherical the motion of the robot hand is different For instance if a revolute joint is moved the hand moves on a circle defined by the joint axis Tool reference frame This specifies movements of the robots hand relative to a frame attached to the hand consequently all motions are relative to this local noaframe Unlike the universal World frame the local Tool frame moves with the robot Suppose that the hand is pointed as shown in Figure 17 Moving the hand relative to the positive naxis of the local Tool frame moves the hand along the naxis of the Tool frame If the arm were pointed elsewhere the same motion along the local naxis of the Tool frame would be completely different from the first motion The same n axis movement would be upward if the naxis were pointed upward and it would be downward if the naxis were pointed downward As a result the Tool reference frame is a moving frame that changes continuously as the robot moves and the ensuing motions relative to it are also different depending on where the arm is and what direction the Tool frame has All joints of the robot must move simultaneously to create coordinated motions about the Tool frame The Tool reference frame is an extremely useful frame in robotic programming where the robot is to approach and depart from other objects or to assemble parts 112 Programming Modes Robots may be programmed in a number of different modes depending on the robot and how sophisticated it is The following programming modes are common Physical setup In this mode an operator sets up switches and hard stops that control the motions of the robot This mode is usually used along with other devices such as programmable logic control lers PLCs Leadthrough or teach mode In this mode the robots joints are moved with a teach pendant When the desired location and orientation is achieved the location is entered taught into the controller During playback the controller moves the joints to the same locations and orientations This mode is usually pointtopoint and as such the motion between points is not specified or controlled Only the points that are taught are guaranteed to be reached Continuous walkthrough mode In this mode all robot joints are moved simultaneously while the motion is continuously sampled and recorded by the controller During playback the exact motion that was recorded is executed The motions are taught by an operator either through a model by physically moving the end effector or by wearing the robot arm and moving it through its work space Painting robots for example may be programmed by skilled painters through this mode Software mode In this mode a program is written offline or online and is executed by the controller to control the motions The programming mode is the most sophisticated and versatile mode and can include sensory information conditional statements such as ifthen statements and branching However it requires a working knowledge of the programming syntax of the robot before any pro gram is written Most industrial robots can be programmed in more than one mode Introduction to Robotics 12 113 Robot Characteristics The following definitions are used to characterize robot specifications Payload This is the weight a robot can carry and still remain within its other specifications As an example a robots maximum load capacity may be much larger than its specified payload but at these levels it may become less accurate may not follow its intended path trajectory accurately or may have excessive deflections The payload of robots compared to their own weight is very small usually only a few percent Reach This is the maximum distance a robot can reach within its work envelope As will be seen later much of the workspace of the robot may be reached with any desired orientation called dexterous points However for other points close to the limit of the robots reach capability orientation cannot be specified as desired called nondexterous points Reach is a function of the robots joints and lengths of its linkages and its configuration This is an important specification for industrial robots and must be considered before a robot is selected and installed Precision validity This is defined as how accurately a specified point can be reached Precision is a function of the resolution of the actuators as well as the robots feedback devices Most industrial robots can have precision in the range of 0001 inches or better The precision is a function of how many positions and orientations were used to test the robot with what load and at what speed When the precision is an important specification it is crucial to investigate these issues Repeatability variability This is how accurately the same position can be reached if the motion is repeated many times Suppose that a robot is driven to the same point 100 times Since many factors may affect the accuracy of the position the robot may not reach the exact same point every time but be within a certain radius from the desired point The radius of a circle that is formed by the repeated motions is called repeatability Repeatability is much more important than precision If a robot is not precise it generally shows a consistent error which can be predicted and therefore corrected through programming As an example suppose that a robot is consistently off by 005 inches to the right In that case all desired points can be specified at 005 inches to the left thereby eliminating the error However if the error is random it cannot be predicted and consequently cannot be elimi nated Repeatability defines the extent of this random error Repeatability is usually specified for a certain number of runs A larger number of tests yields larger bad for manufacturers results but more realistic good for the users results Manufacturers must specify repeatability in conjunction with the number of tests the applied payload during the tests and the orientation of the arm For example the repeatability of an arm in a vertical direction is different from when the arm is tested in a horizontal configuration Most industrial robots have repeatability in the 0001 inch range It is crucial to find out about the details of repeatability if it is an important specification for the application 114 Robot Workspace Depending on their configuration and the size of their links and wrist joints robots can reach a collection of points around them that constitute a workspace The shape of the workspace for each robot is uniquely related to its design The workspace may be found mathematically by writing equations that define the robots links and joints and which include their limitations such as ranges of motions for each joint 9 Alternately the workspace may be found empirically by virtually moving each joint through its range of motions combining all the space it can reach and subtracting what it cannot reach Figure 18 shows the Fundamentals 13 approximate workspace for some common configurations When a robot is considered for a particular application its workspace must be studied to ensure that the robot is able to reach the desired points Manufacturers data sheets must be consulted for specific workspace information 115 Robot Languages There are perhaps as many robot languages as there are robot manufacturers Each manufacturer designs its own robotic language and therefore in order to use any particular robot its brand of the programming lan guage must be learned Many robot languages are based on common languages such as C and others Other languages are standalone and do not relate to any other common language Robotic languages are at different levels of sophistication depending on their design and application This ranges from machine level to a proposed human intelligence level 1013 Highlevel languages are either interpreterbased or compilerbased Interpreterbased languages execute one line of the program at a time Each line of the program has a line number The interpreter interprets the line every time it is encountered it converts the robot program to a machine language program that the processor can understand and execute and executes each line sequen tially The execution continues until the last line is encountered or until an error is detected at which time execution stops The advantage of an interpreterbased language is in its ability to continue execution until an error is detected which allows the user to run and debug the program portion by portion As a result debugging a program is much faster and easier However because each line is interpreted every time exe cution is slower and not very efficient Many robot languages such as OMRON Adepts V are inter preterbased Compilerbased languages use a compiler to translate the whole program into machine language which creates an object code before it is executed Since the processor executes the object code these programs are much faster and more efficient However since the whole program must first be compiled it is impossible to Cartesian Cylindrical Spherical Articulated Parallel Figure 18 Typical approximate workspaces for common robot configurations Introduction to Robotics 14 run any part of the program if there are any syntax errors present even before the logic of the program is tested As a result debugging a program is more difficult The following is a general description of different levels of robotic languages 11 Microcomputer machine language level At this level programs are written in machine language This level of programming is the most basic and is very efficient but it is difficult to understand and difficult for others to follow All languages will eventually be interpreted or compiled to this level However in the case of higherlevel programs the user writes the programs in a higherlevel language that is easier to follow and understand Pointtopoint level At this level the coordinates of the points are entered sequentially and the robot follows the points as specified This is a very primitive and simple type of program and is easy to use but not very powerful It also lacks branching sensory information and conditional statements Primitive motion level In these languages it is possible to develop moresophisticated programs including sensory information branching and conditional statements Most languages at this level are interpreterbased Structured programming level Most languages at this level are compilerbased are powerful and allow more sophisticated programming However they are also more difficult to learn Taskoriented level There are no actual languages in existence at this level yet AUTOPASS proposed by IBM in the 1980s never materialized AUTOPASS was supposed to be task oriented meaning that instead of programming a robot to perform a task by programming each and every step the user would only mention the task expecting that the controller would create the nec essary sequence Imagine that a robot is to sort three boxes by size In all existing languages the programmer has to specify every move and every step including how to go to the largest box how to pick up the box where to place it where to go to find the next box and so on even if a vision system or other sensory devices are used In AUTOPASS the user would only indicate sort while the robot controller would create this sequence automatically This never happened With the advent of morehumanoidtype robots robots are expected to understand conversations with humans Although they are getting closer they still need much direction Example 11 The following is an example of a program written in OMRON Adepts V which is interpreterbased and allows for branching sensory input and output communication straightline movements and many other features As an example the user may define a distance height along the aaxis of the end effector Tool frame which can be used with commands called APPRO for approach and DEPART in order to approach an object or depart from an object without collision A command called MOVE allows the robot to move from its present location to the next specified location However MOVES does the same in a straight line The difference is discussed in detail in Chapter 7 In the following listing a number of different commands are described in order to show some of the capabilities of V 1 PROGRAM TEST Declares the program name 2 SPEED 30 ALWAYS Sets the speed of the robot 3 height 50 Specifies a distance for the liftoff and setdown points along the aaxis of the end effector Tool frame Continued Fundamentals 15 4 MOVES p1 Moves the robot in a straight line to point p1 5 MOVE p2 Moves the robot to a second point p2 in joint interpolated motion 6 REACTI 1001 Stops the robot immediately if an input signal to port1 goes high is closed 7 BREAK Stops execution until the previous motion is finished 8 DELAY 2 Delays execution for two seconds 9 IF SIG1001 GOTO 100 Checks input port1 If it is high closed execution continues at line 100 Otherwise execution continues with the next line 10 OPEN Opens the gripper 11 MOVE p5 Moves to point p5 12 SIGNAL 2 Turns on output port2 13 APPRO p6 height Moves the robot toward p6 but away from it a distance specified as height along the aaxis of the gripper Tool frame This is called a liftoff point 14 MOVE p6 Moves to the object at point p6 15 CLOSEI Closes the gripper and waits until it closes 16 DEPART height Moves up along the aaxis of the gripper Tool frame a distance specified by height 17 100 MOVE p1 Moves the robot to point p1 18 TYPE all done Writes the message to the monitor 19 END Example 12 The following is an example of a program written in IBMs AML A Manufacturing Language AML is no longer common However the example is provided to show how one language may differ from another one in its features and syntax The program is written for a gantry 3P3R robot with three prismatic positioning joints three revolute orientation joints and a gripper Joints may be referred to by numbers 1 2 3 4 5 6 7 where 1 2 and 3 indicate the prismatic joints 4 5 and 6 indicate the revolute joints and 7 indicates the gripper The joints may also be referred to by index letters JX JY and JZ for motions along the x yand z axes JR JP and JY for rotations about the Roll Pitch and Yaw axes used for orientation and JG for the gripper Note that since this robot is gantry the path the robot takes is different from a revolute robots path Therefore the way it is programmed is also different Instead of specifying a point joint movements are specified although all simultaneously There are two types of movements allowed in AML MOVE commands are absolute This means that the robot moves along the specified joint to the specified value DMOVE commands are differential This means that the joint moves the specified amount from wherever it is Therefore MOVE 110 means that the robot moves along the xaxis to 10 inches from the origin of the reference frame whereas DMOVE 110 means that the robot moves 10 inches along the xaxis from its current position The following simple program directs the robot to pick an object from one location and place it at another This is written to show you how a robotic program may be structured Notice the differences between this and the previous program Introduction to Robotics 16 10 SUBRPICKPLACE Subroutines name 20 PT1 NEW 4 24 2 0 0 13 Declares a location 30 PT2 NEW 2 13 2 135 90 33 40 PT3 NEW 2 13 2 150 90 33 1 50 SPEED 02 Specifies the velocity of the robot 20 of full speed 60 MOVE ARM00 Moves the robot ARM to its reset position at the origin of the reference frame 70 MOVE 123456PT1 Moves the arm to point1 above the object 80 MOVE 73 Opens the gripper to 3 inches 90 DMOVE 3 1 Moves the arm down 1 inch along the zaxis 100 DMOVE 715 Closes the gripper by 15 inches 110 DMOVE 3 1 Moves up 1 inch along the zaxis to lift the object 120 MOVE JX JY JZ JR JP JY PT2 Moves the arm to point2 130 DMOVE JZ 3 Moves the arm down 3 inches along the zaxis to place the object 140 MOVE JG3 Opens the gripper to 3 inches 150 DMOVE JZ 11 Moves the arm up 11 inches along the zaxis 160 MOVE ARM PT3 Moves the arm to point3 170 END 116 Robot Applications Robots are best suited for applications involving repetitive tasks jobs requiring capabilities and precision beyond those of humans and working in hazardous environments Robots have already been used in many industries and for many purposes They have excelled when they can perform better than humans or at lower costs For example a welding robot can probably weld better than a human welder in routine applications because it can move more uniformly and consistently along a prescribed path without needing protective goggles and clothing ventilation or other necessities As a result the robot can be more productive and bet ter suited for the job as long as the task is set up for the robot nothing happens to the setup and the job is not too complicated Similarly a robot exploring the ocean floor requires far less attention than a human diver can stay underwater for long periods of time can go to very great depths and still survive the pressure and yet does not require oxygen The following is a list of some common robotic applications The list is not complete by any stretch of the imagination There are many other uses as well and other applications find their way into the industry and the society all the time Fundamentals 17 Machine loading Robots supply other machines with parts or remove the processed parts from other machines Figure 19 In this type of work the robot may not even perform any operation on the part but rather facilitates material and parts handling and loading other machines within the context of a task Pick and place operations The robot picks up parts and places them elsewhere Figure 110 This may include palletizing placement of cartridges simple assembly where two parts are put together such as pla cing tablets into a bottle placing parts in an oven and removing the treated parts from the oven or other similar routines Welding The robot along with proper setups and a welding end effector is used to weld parts together This is one of the most common applications of robots in the auto industry Due to their consistent movements robotic welds are very uniform and accurate Welding robots are usually large and powerful Figure 111 Figure 19 Robots performing loading and unloading of parts Source Reproduced with permission from Staubli a b Figure 110 a A parallel robot stacking cookies b A serial robot handling chocolate bars on a conveyor belt Source Reproduced with permission from Fanuc Robotics and Yaskawa Electric Introduction to Robotics 18 Painting is another very common application of robots especially in the automobile industry Since main taining a ventilated but clean paint area suitable for humans is difficult to achieve and because compared to humans robotic operations are more consistent painting robots are very wellsuited for their job Inspection of parts circuit boards and other similar products is also a very common application for robots In general robots are one component of an inspection system that may include a vision system an Xray device an ultrasonic detector or other similar devices Figure 112 In one application a robot was equipped with an ultrasonic crack detector was given the CAD data about the shape of an airplane fuselage and wings and was used to follow the airplanes body contours and check each joint weld or rivet In a similar appli cation a robot would search for and find the location of each rivet detect and mark the rivets with fatigue Figure 111 A robot welding parts together Source Reproduced with permission from Kuka Robotics Figure 112 A robot engaged in sorting and inspection of manufactured parts Source Reproduced with permission from Fanuc America Corporation Fundamentals 19 cracks drill them out and move on The technicians would insert and install new rivets Robots have also been extensively used for circuit board and chip inspection In most applications like this including part iden tification the characteristics of the part such as the circuit diagram of a board the nameplate of a part and so on are stored in the system in a data library The system uses this information to match the part with the stored data Based on the result of the inspection the part is either accepted or rejected Sampling with robots is used in the agriculture industry as well as in many other industries Sampling can be similar to pickandplace and inspection except that it is performed only on a certain number of products Assembly tasks usually involve many operations For example the parts must be located and identified they must be carried in a particular order with many obstacles around the setup and they must be fit together and then assembled Many of the fitting and assembling tasks are complicated and may require pushing turn ing bending wiggling pressing snapping tabs to connect the parts and other operations Slight variations in parts and their dimensions due to larger tolerances also complicate the process since the robot has to know the difference between variations in parts and wrong parts Figure 113 shows a Sawyer robot assembling an electronic circuit and a group of KUKA robots engaged in assembling a product Manufacturing by robots may include many different operations such as material removal drilling debur ring laying glue cutting and so on It also includes insertion of parts such as electronic components into circuit boards installation of boards into electronic devices and other similar operations Insertion robots are very common and are extensively used in the electronic industry Figure 114 shows a robot engaged in manufacturing Medical applications are also becoming increasingly common Examples include Intuitives da Vinci sur gical robot Strykers Mako surgical robot and many others under development at research universities 1417 Based on our earlier definition surgical robots are not really robots because they are actually oper ated by a surgeon rather than operating on their own No robot knows how to perform surgery yet However these precision robots assist surgeons in performing surgery Because of their accuracy these robots can operate through much smaller incisions with more precise motions and can perform tasks such as cutting a bone drilling holes reaming for joint replacement and much more With the advanced haptic feedback provided by the robot the surgeon can feel exactly as if they are doing the surgery However since the doctor does not have to be present in the operating room conceivably they can operate remotely an extremely important advantage that these robots provide In addition these robots have other capabilities that are a b Figure 113 a A Sawyer robot inserting electronic parts into a circuit with its specialized end effector Source Courtesy of Rethink Robotics GmbH b A group of KUKA robots on an assembly line Source Reproduced with permission from Kuka Robotics Introduction to Robotics 20 beyond those of surgeons For example the CATscan image of a bone can be sent to the robot directly allowing it to follow the bones contour more precisely The da Vinci robot possesses four arms three that hold instruments one more than a surgeon could and one to hold a 3D imaging scope that displays the surgical area to a surgeon behind a monitor Figure 115 Assisting disabled individuals has also been tried with interesting results Robots are well suited to help the disabled and elderly in many different ways and many humanoid robots under development can be excel lent choices for this purpose In addition many exoskeleton devices have been developed to help paraplegic persons walk Examples include the ReWalk walker by ARGO Medical Technologies 18 which helps a par alyzed individual get up and walk and the EksoGT suit that helps a patient with rehabilitation and correction of posture during recovery Figure 116 Like surgical robots these devices are not really robots but they include much intelligence and autonomy Work has also been done on reading brain signals to help a disabled person move with a robotic skeleton 19 Another very different and yet exceptional application of robots is in providing a nurturing environment for kids with special needs RoboKinds Milo robot and Blue Frogs Buddy robot are examples of robots that have been designed to have a face with changing expressions that can better relate to autistic children and adults and make friends with them in order to help them with social interactions 20 21 Figure 114 A robot engaged in a manufacturing task Source Reproduced with permission from Staubli Robotics Figure 115 The da Vinci surgical system Source 2019 Intuitive Surgical Fundamentals 21 The fingerspelling hand Figure 117 designed for communication with deafblind individuals is capable of making hand gestures that spell all the letters of the alphabet With its 14 servomotors the hand is mounted on an arm and can be held with one hand while the other hand reads the letters Letters typed in a computer emails or text are coded and sent to the hand Figure 116 The EksoGT rehabilitation suit Source Reproduced with permission from EksoBionic Figure 117 Fingerspelling hand for communication with deafblind individuals Designed and built by Kendall Searing Cal Poly San Luis Obispo Supported by the Smith Kettlewell Eye Research Institute Introduction to Robotics 22 Hazardous environments are well suited for robotics Because of their inherent danger in these environ ments humans must be wellprotected However robots can access traverse maintain and explore these areas without the same level of concern Servicing a radioactive environment for example is easier with a robot than a human In 1993 an eightlegged robot called Dante was supposed to reach the lava lake of the constantly erupting volcano of Mount Erebus in Antarctica and study its gases 22 Robots were also used to clean up the Fukushima nuclear power plant in Japan after it was damaged by the tsunami of 2011 A variety of minedetecting and bombdetonating robots have also been put to use with the idea that a robot may be expendable whereas a human is not One such robot uses vibrating ultrasonic pods to identify underground mines therefore eliminating the need for human searches 23 Similarly a crustaceanlooking lobster robot was developed to search ocean bottoms for mines and other weapons 24 Inaccessible locations such as space underwater and mines can also be serviced or explored by robots So far it is still impractical to send a human to other planets even Mars but there have been a number of rovers Figure 118 that have already landed and explored it 25 In the last few years underwater robots have also looked for found and explored sunken ships in deep oceans Underwater robots have also been used to find crashed airplanes and to work on deepwater oil wells In a project sponsored by the Defense Advanced Research Projects Agency DARPA the Aircrew Labor InCockpit Automation System ALIAS was tested to land a simulated Boeing 737 aircraft The system using its vision system and the aircrafts autopilot fully actuated the landing procedure 26 Robots in agriculture can be very useful especially in places were labor shortage or environmental con ditions are important issues Robotic pickers have been developed and tested around the world and are becoming more common This includes orange pickers strawberry pickers and so on 27 Geneticists have developed dwarf trees and longstem strawberries that hang on the side to facilitate robotic picking 117 Other Robots and Applications Since the first edition of this book was published many new robots and issues have appeared Such is the nature of this active field Therefore you should expect that there will be applications and robots that are not included in this edition either However the following are just a sample of some systems that show a trend and future possibilities Figure 118 NASA Sojourner Source Courtesy NASAJPLCaltech Fundamentals 23 A large number of humanoid robots have been developed that are meant to mimic humans in different ways for many different purposes from domestic maids to factory workers to assisting military personnel Robots such as Hondas ASIMO BlueBotics Gilbert Nestles Nesbot Anybotss Monty Aldebaran NAO Boston Dynamicss Atlas Figure 119 and many others are intelligent humanoid robots with humanlike features and behavior Atlas includes an advanced controlandbalance system that enables it to coordinate the motions of its extremities and torso in wholebody mobile manipulation to keep its balance when jostled and to get up if tipped over It also includes a stereo vision system range finders and other sensors that enable it to see its environment and traverse rough terrain ASIMO walks runs walks up and down a staircase and interacts with people Nesbot brings coffee to workers who have ordered it online 28 Monty loads a dish washer and does other chores while Robomower mows your lawn while you read 29 A number of different robots have also been designed and used for emergency services during natural and humancaused disasters 30 These robots equipped with special sensors are capable of looking for live humans and animals buried under rubble and reporting their locations to rescuers Yaskawa Electric SDA10 dualarm robots Figure 120 have 15 axes of motion The two arms can move independently or in a coordinated manner They can transfer a part from one gripper to the other without the need to set it down The Kawasaki duAro robots dual arms are SCARA type and move in a coordinated manner they can transfer and handle parts together or move independently In addition they are designed to be the size of Figure 119 Atlas humanoid robot Source Image courtesy of Boston Dynamics Introduction to Robotics 24 a human Therefore they can be integrated into an assembly line or workspace without the need to change anything this robot is also a collaborative robot see Section 118 Exoskeletal assistive devices although not robots are enablers They enable a human to carry large loads for extended periods of time or to exert large forces in awkward positions In fact there is a certain synergy between these devices and assistive devices to help disabled individuals walk Figure 121 shows EksoVest a nonpowered upperbody exoskeleton device that is worn by an individual it elevates and supports the Figure 120 Dualarm robots Source Reproduced with permission from Yaskawa Electric and from Kawasaki Robotics USA Inc Figure 121 The EksoVest suit Source Reproduced with permission from Ekso Bionic Fundamentals 25 arm and assists in tasks above the chest and overhead teachers know about shoulder problems caused by writing on the board in this manner Other devices also help military personnel carry large loads for extended periods of time 31 Figure 122 shows a largescale quadruped allterrain exoskeletal antirobot suit called Prosthesis by Furrion designed to augment human skill and strength with applications ranging from competitive sports to search and rescue to materials handling and more As discussed earlier based on the strict definition of a robot Prosthesis is not really a robot because it is driven by an operator pilot But like other nonrobots such as surgical robots and exoskeletals it is based on the same analysis and design principles Prosthesis has 12 actuators with 8 DOF in the legs 4 legs with 2 joints each controlled by the pilot through the exoskeletal interface and 4 DOF for the big tusks fore and aft which are controlled independently from the cockpit using 2 joysticks The tusks can be deployed or retracted to guard against falling over or to right the machine after falling The pilot wears an exoskeletal suit with which Prosthesis is driven The pilots shoulders control the swing of the outer legs at the outer hips The elbows control the bend of the outer legs at the knees The pilots hips control the swing of the inner legs at the hips and the knees control bend of the inner legs at the knees The motions of Prosthesis make it feel like a gorilla moving on its four legs The pilots state that With enough practice it just starts to feel like you have an eight and a half thousand pound body and a 200 horsepower heart Prosthesis weighs nearly 3900 kg 8600 lbs It is 4 m high 55 m wide and 51 m long and it has about 200 kg 440 lbs of lithium ion batteries that can power it for up to an hour The actuators are hydraulic with electronically controlled valves Its proprietary control system includes a humanintheloop element with 11 positional parity between the pilot and Prosthesis and 50100 times amplification of pilot strength 32 Other monstersized devices include a humanoid bipedal robot called Method2 a 13 ft 15 ton robot that walks like a human driven by an operator inside of it 33 and NASAs robotic titan which is designed to help in the manufacture of massive composite parts for rockets where exaggerated sizes and weights play important role 34 There are also more humanoidtype robots on the factory floor interacting and working with others As time goes on better robots better communication skills and moresophisticated artificial intelligence will make coexistence between workers and robots more realistic 35 36 This includes a robot takeover of infra structure maintenance and inspection duties such as the use of drones for offshore oilplatform inspection and robotic interior pipeline inspection 37 In addition many companies are testing simple mobile robots to do mundane and routine tasks from mov ing items in warehouses and delivering to workstations to moresophisticated package delivery to customers Figure 122 The Prosthesis exoskeletal suit Source Jonathan Tippett Prosthesiss designer and inventor produced by Furrion ExoBionic of which Tippett is cofounder and CTO Photo credit Sam Carter Introduction to Robotics 26 38 These are primarily 2D mobile robots with the capability to pick up and place items from shelves and tables but with the intelligence to know their way around a warehouse or factory environment and to find items by codes such as a barcode Figure 123 At the other end of the spectrum there are also some very tiny robots for other applications For example RoboFly is a flying robot slightly larger than a real fly weighing about 190 mg which can fly on its own without a battery It develops its power from a solar panel powered by a laser beam that is projected on it 39 A cellsized robot that can sense its environment is meant to travel through the body or a pipeline and look for problems 40 Researchers at the University of Texas in San Antonio are developing a nan oscale spherical robot that is 120 nanometers in size and is controlled remotely through electromagnetic fields The intention is for the robot to deliver drugs or perform operations at the cellular scale in places where larger robots or drugs cannot reach 41 As mentioned earlier in addition to humanoid robots other lifeform robots such as insects creatures animals and fish have been used for a variety of purposes Some of these are designed and studied for their robotic aspects others for specific applications and yet others for the study of the animals behavior For example in one study small robotic roaches were doused with the roachs sex hormone Real roaches that cannot see very well follow the robotic roach Normally they tend to congregate in dark places however researchers could alter the behavior of roaches by sending the robotic roach to unexpectedly lighter places The real roaches would follow the robotic roaches against their instinct 42 Other insect robots have also been designed for applications from pure research to entertainment and from civilian to military uses They mimic sixlegged insects eightlegged insects flying insects swarms of insects and more 4345 Developed at BenGurion University and inspired by SpiderMan Spiderbot is an insect robot that launches four magnetic grapplers that stick to the ceiling by which it pulls itself Figure 123 A mobile transport robot Source Reproduced with permission from Locus Robotics Fundamentals 27 up It then releases the magnets one at a time retracts them and launches again to a new point 46 Other applicationoriented lifeforms include wormlike robots snakelike robots robots that swim like fish a lobsterlike robot a honeybee robot birdlike robots dinosaur robots a reconfigurable robot that flies crawls and navigates as well as unidentified life forms 4752 Figure 124 shows Spot a 30 kg robot in the form of a dog It has the ability to pick up and handle objects with its 5DOF arm and comes with perception censors including stereo vision depth cameras and position and force sensors that help it with its navigation and manipulation It can open doors and balance itself if pushed around Unlike its predecessor BigDog which had an onboard engine Spot is all electric and can go for about 15 hours on a charge Animatronics refers to the design and development of systems used in animated robotic figures and machines that look and behave like humans and animals Examples include animatronic lips eyes and hands 53 54 As moresophisticated animatronic components become available the action figures they replace become increasingly real Microelectromechanicalsystems MEMS have also been integrated into robotic design for different tasks As an example a microlevel robotic device may be sent through major veins to the heart for explor atory or surgical functions A MEMS sensor may be used to measure the levels of various elements in blood One device so far only tested on animals releases insulin from a post that pops out after it clings to the wall of an empty stomach it is eventually eliminated by the user If this device is approved for human use it has the potential to relieve diabetics from their daily injections 118 Collaborative Robots Collaborative robots also called cobots are designed to safely work and collaborate with humans Therefore it is necessary that these robots have sensors and the intelligence needed to work safely around humans or other robots and machines to prevent injuries damage or mishaps The first cobots were introduced to the market by Universal Robotics in 2008 followed by Rethink Roboticss dualarmed Baxter and later Sawyer Figure 124 Boston Dynamics Spot robot Source Image courtesy of Boston Dynamics Introduction to Robotics 28 robots Today many other companies also make collaborative robots including established companies such as FANUC America 55 Most initial cobots were designed to move at slower speeds to reduce impact forces afford the robot ample time to respond and stop when necessary and enable it to work with humans or other robots Consequently these robots were generally less productive but obviously safer and they did not have to be in a cage Some current cobots work either at higher speeds like a regular robot or at lower speeds as a cobot However due to industrial demand for speed and productivity newer cobots have speeds almost similar to those of regular robots even in collaborative mode The ISO 102182 and ISOTS 15066 standards define what is needed for safe robots as well as for collab orative robots This ranges from requiring robots to be in cages with sensors that shut down the robot in the presence of a human to collaborative robots that simply stop when they touch other objects including a human or that can be manipulated moved around by humans who are teaching them Cobots are designed to be able to determine the presence of a human around them This can be accom plished by a vision system and a camera that is mounted on the arm and can see the workspace of the robot while it moves by sensors that monitor the current to the actuating motors and measuring the increase when there is resistance against the motion by sensors in the joint axes that measure loads on the joint or other similar devices Figure 125 For dualarm robots the arms are designed to work together to prevent colli sion dropping a part when it is handled by both arms and damage to the part while transporting it see Section 215 They can also take advantage of the kinematic and kinetic equations we will develop and study later in this book to control realtime torques at the joints to prevent injuries and damage One other feature of these robots is that they are generally rounder to allow better detection and dissipation of impact forces with flat surfaces indicating other objects or humans Their actuating motors are generally completely cov ered and there are no pinch points Due to these characteristics it is easier to guide the cobots and teach them a path or trajectory that they repeat later We will discuss cobots later in other chapters 119 Social Issues We must always remember the social consequences of using robots Although there are many applications of robots where they are used because no workers can do the same job there are many other applications in which a robot replaces a human worker The worker who is replaced by a robot may lose their income If the trend continues without consideration it is conceivable that most products can be made by robots without the need for any human workers The result will be fewer workers with jobs who have the money to buy the Figure 125 Collaborative robots are designed to detect the presence of humans around them and to collaborate with them Source Reproduced with permission from Fanuc America Corporation Fundamentals 29 products the robots make Of importance is the issue of social problems that arise as increasingly more work ers are out of jobs as well as its economic consequences One of the important points of negotiations between automobile manufacturers and the United Auto Workers UAW is how many human jobs may be replaced by robots and at what rate Although no solution is presented in this book many references are available for further study of the prob lem 56 57 However as engineers who strive to make better products at lower costs and who may consider using robots to replace human workers we must always remember the consequences of this choice Our academic and professional interest in robotics must always be intertwined with its social and economic considerations On the other end of the spectrum some are raising the issue of legal rights for robots and whether or not they deserve it 58 especially when moresophisticated humanoid robots become a reality In Hollywoods The Bicentennial Man a household domestic robot is continually improved over a long period of time until it has feelings emotions and thoughts just like a human and eventually is granted the status of being a human just before dying We may still be some distance from this reality but there is no doubt it will be an issue in the future 120 Summary Many people who are interested in robotics have background information about robots and may even have interacted with robots too However it is necessary that certain ideas are understood by everyone In this chapter we discussed some fundamental ideas about robotics that enable us to better understand what they are for how they can be used and what they can do Robots can be used for many purposes including industrial applications entertainment and other specific and unique applications such as in space and underwater exploration and in hazardous environments Obviously as time goes on robots will be used for other unique applications The remainder of this book will discuss the kinematics and kinetics of robots their components such as actuators and sensors and vision systems and robot applications References 1 Automation Nation Mechanical Engineering Magazine May 2018 pp 2829 2 Productivity Predicament Mechanical Engineering Magazine September 2018 pp 2829 3 Robots on the Rise Mechanical Engineering Magazine March 2017 pp 2829 4 Taking the Tasks Mechanical Engineering Magazine April 2017 pp 2829 5 Capek Karel RUR Rossums Universal Robots translated by Paul Selver Doubleday NY 1923 6 Valenti Michael A Robot Is Born Mechanical Engineering Magazine June 1996 pp 5057 7 Robot Safety Bonney MC YF Yong editors IFS Publications Ltd UK 1985 8 Stein David Gregory S Chirikjian Experiments in the Commutation and Motion Planning of a Spherical Stepper Motor Proceedings of DETC00 ASME 2000 Design Engineering Technical Conferences and Computers and Information in Engineering Conference Baltimore Maryland September 2000 pp 17 9 Wiitala JaredM BJ Rister JP Schmiedler A MoreFlexible Robotic Wrist Mechanical Engineering July 1997 pp 7880 10 Gruver WA BI Soroka JJ Craig and TL Turner Industrial Robot Programming Languages A Comparative Evaluation IEEE Transactions on Systems Man Cybernetics 144 JulyAugust 1984 11 Bonner Susan KG Shin A Comprehensive Study of Robot Languages IEEE Computer December 1982 pp 8296 Introduction to Robotics 30 12 Gruver William BI Soroka Programming High Level Languages International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons NY 1988 pp 12031234 13 VALII Programming Manual Version 4 Unimation Inc Pittsburgh 1988 14 Brown Alan A Smooth Operator Mechanical Engineering Magazine March 2017 pp 4247 15 Intelligent Surgical Robots Mechanical Engineering Magazine September 2015 pp 36 16 McGuinn Jack senior editor These Bots Are CuttingEdge Power Transmission Engineering October 2008 pp 3236 17 Salisbury Kenneth Jr The Heart of Microsurgery Mechanical Engineering December 1998 pp 4651 18 httpwwwtimesofisraelcomusregulatorsokayisraelimaderoboticlegs 19 Sukel Kayt Mind Control Mechanical Engineering Magazine July 2017 pp 4449 20 Brown Alan FacttoFace with Autism Mechanical Engineering Magazine February 2018 pp 3439 21 Zeldovich Lina Working Hand in Claw Mechanical Engineering Magazine August 2018 pp 3641 22 Leary Warren Robot Named Dante to Explore Inferno of Antarctic Volcano The New York Times December 8 1992 p B7 23 Ultrasonic Detector and Identifier of Land Mines NASA Motion Control Tech Briefs 2001 p 8b 24 Chalmers Peggy Lobster Special Mechanical Engineering Magazine September 2000 pp 8284 25 Robot Explorers Mechanical Engineering Magazine July 2018 3035 26 A Robot in the CoPilots Seat Mechanical Engineering Magazine July 2017 p 17 27 Tibbetts John Not Too Far from the Tree Mechanical Engineering Magazine February 2018 pp 2833 28 From Simple Rules Complex Behavior Mechanical Engineering Magazine July 2009 pp 2227 29 Drummond Mike Rise of the Machines Inventors Digest February 2008 pp 1623 30 Zeldovich Lina Robots to the Rescue Mechanical Engineering Magazine March 2019 pp 3035 31 Gibson Tom Power Suit Mechanical Engineering Magazine July 2017 pp 3841 32 Mech Madness Mechanical Engineering Magazine Nov 2017 p 72 33 Monster Machine ASEEPrism Magazine February 2017 p 13 34 A Robotic Titan to Build Rocket Parts NASA Tech Briefs December 2015 p 8 35 From Torque Controlled to Intrinsically Compliant Humanoid Robots ASME Dynamic Systems and Control June 2015 pp 711 36 Brown Alan Work Buddies Mechanical Engineering Magazine June 2015 pp 3843 37 Brown Alan Something to Prove Robots Are Starting to Replace Human Technicians in Infrastructure Inspection Mechanical Engineering Magazine August 2018 pp 3035 38 Brown Alan Proving Grounds Mechanical Engineering Magazine July 2017 pp 3237 39 Microbot Wings Mechanical Engineering Magazine August 2018 pp 1011 40 CellSized Robots Sense Their Environment NASA Tech Briefs November 2018 p 50 41 Smallest Robot Targeted at Cancer Mechanical Engineering Magazine November 2018 pp 2021 42 Chang Kenneth John Scwartz Led by Robots Roaches Abandon Instincts The New York Times November 15 2007 43 Yeaple Judith A Robot Insects Popular Science March 1991 pp 5255 and 86 44 Freedman David Invasion of the Insect Robots Discover March 1991 pp 4250 45 Thakoor Sarita B Kennedy A Thakoor Insectile and Vemiform Exploratory Robots NASA Tech Briefs November 1999 pp 6163 46 Spiderbot Ben Gurion University Department of Mechanical Engineering Robotics Laboratory httpwww youtubecomwatchvuBikHgnt16E 47 OConner Leo Robotic Fish Gotta Swim Too Mechanical Engineering Magazine January 1995 p 122 48 Lipson Hod JB Pollack The Golem Project Automatic Design and Manufacture of Robotic Lifeforms httpdemocsbrandeisedugolem 49 Zeldovich L The Drone and the Honey Mechanical Engineering Magazine May 2019 pp 3237 50 Practical Robots Mechanical Engineering Magazine July 2017 pp 2223 Fundamentals 31 51 Biomorphic Gliders NASA Tech Briefs April 2001 pp 6566 52 The Flying STAR Meiri Nir and Zarrouk D Ben Gurion University of the Negev httpsyoutube xLuQifpJv8 53 Jones Adam SB Niku Animatronic Lips with Speech Synthesis AliSS Proceedings of the 8th Mechatronics Forum and International Conference University of Twente the Netherlands June 2002 54 Sanders John K SB Shooter The Design and Development of an Animatronic Eye Proceedings of DETC98 MECH 25th ASME Biennial Mechanisms Conference September 1998 55 Lawrence Carol Requiem for Rethink Robotics Mechanical Engineering Magazine February 2019 pp 3945 56 Coates VT The Potential Impacts of Robotics paper number 83WATS9 American Society of Mechanical Engineers 1983 57 Albus James Brains Behavior and Robotics Byte Books McGraw Hill 1981 58 Do They Deserve Legal Rights Mechanical Engineering Magazine April 2018 p 1 Problems 11 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown 12 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown A Figure P11 A Figure P12 Introduction to Robotics 32 13 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown Figure P13 Fundamentals 33 2 Kinematics of Serial Robots Position Analysis 21 Introduction In this chapter we will study forward and inverse kinematics of serial robots With forward kinematic equa tions we can determine where the robots end hand will be if all joint variables are known Inverse kine matics enables us to calculate what each joint variable must be to position the hand at a desired location and orientation Using matrices we first establish a method of describing objects locations orientations and movements Then we study the forward and inverse kinematics of different serial robot configurations such as Cartesian cylindrical and spherical coordinates Finally we use the DenavitHartenberg representation to derive forward and inverse kinematic equations of all possible configurations of serial robots regardless of number of joints order of joints and presence or lack of offsets and twists In Chapters 3 and 4 we continue with screwbased kinematic analysis of serial robots and with the kinematic analysis of parallel robots It is important to realize that in practice manipulatortype robots are delivered with no end effector In most cases there may be a gripper attached to the robot however depending on the actual application dif ferent end effectors are attached to the robot by the user Obviously the end effectors size and length deter mine where the end of the robot will be see Chapter 1 For a short end effector the end will be at a different location compared to a long end effector In this chapter we assume that the end of the robot is a plate to which the end effector can be attached as necessary We will call this the hand or the endplate of the robot If necessary we can always add the length of the end effector to the robot for determining the location and orientation of the end effector It should be mentioned here that a real robot manipulator for which the length of the end effector is not defined will calculate its joint values based on the endplate location and orientation which may be different from the position and orientation perceived by the user 22 Robots as Mechanisms Manipulatortype serial robots are multidegrees of freedom DOF threedimensional openloop chain mechanisms MultiDOF means that robots possess many joints allowing them to move freely within their workspace In a 1DOF system when the actuating variable is set to a particular value the mechanism is totally set and all its other variables are known For example in the 1DOF 4bar mechanism in Figure 21 when the crank is set to 120 the angles of the coupler link and the rocker arm are also known whereas in a multiDOF mechanism all input variables must be individually defined to know the remaining parameters Robots are multiDOF machines where each joint variable must be known in order to determine the location of the robots hand Robots are threedimensional machines if they are to move in space Although it is possible to have a two dimensional multiDOF robot they are not common or useful Serial robots are openloop mechanisms Unlike mechanisms that are closedloop eg 4bar mechanisms even if all joint variables are set to particular values there is no guarantee that the hand will be at the given 35 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed location This is because deflections in any joint or link change the location of all subsequent links without feedback For example in the 4bar mechanism in Figure 22a when link AB deflects as a result of load F link BO2 will also move and therefore the deflection can be detected whereas in an openloop system such as the serial robot in Figure 22b the deflections will move all succeeding members without any feedback There fore in openloop systems either all joint and link parameters must continuously be measured or the end of the system must be monitored otherwise the kinematic position of the machine is not completely known This difference can be expressed by comparing the vector equations describing the relationship between dif ferent links of the two mechanisms as follows For the 4bar mechanism O1A AB O1O2 O2B 21 For the robot O1A AB BC O1C 22 As shown if there is a deflection in link AB of the 4bar mechanism link O2B will move accordingly both sides of Eq 21 change corresponding to the changes in the links On the other hand if link AB of the robot deflects all subsequent links will move too but unless O1C is measured by other means the change will not be known To remedy this problem in openloop robots either the position of the hand is constantly measured with devices such as a camera the robot is made into a closedloop system with external means such as the use of secondary arms or laser beams 1 2 3 or as standard practice the robot links and joints are made exces sively strong to eliminate all deflections This renders the robot heavier more massive and slower and its specified payload is very low compared to what it can actually carry Parallel robots Figure 23 are closed 120 A B O1 O2 Figure 21 A 1DOF closedloop 4bar mechanism A B O1 O2 O1 A B C F F a b Figure 22 Closedloop a versus openloop b mechanisms Introduction to Robotics 36 loop and consequently can be lighter and much faster The tradeoff is muchreduced range of motions and workspace 23 Conventions Throughout this book we use the following conventions for describing vectors frames transformations etc Vectors i or î x or x p or P Vector components nx ny nz ax ay az Frames Fxyz Fnoa xyz noa Fcamera Transformations T1 T2 UT BP UTR Sine and cosine of angles S1 C1 Sθ Cα 24 Matrix Representation Matrices can be used to represent points vectors frames translations rotations transformations as well as objects and other kinematic elements We use this representation throughout the book 241 Representation of a Point in Space A point P in space Figure 24 can be represented relative to a reference frame as P axi byj czk 23 Figure 23 A typical parallel manipulator Kinematics of Serial Robots Position Analysis 37 where ax by and cz are the three coordinates of the point represented in the reference frame Obviously other coordinate representations can also be used to describe the location of a point in space 242 Representation of a Vector in Space A vector can be represented by three coordinates of its tail and its head A vector starting at point A and ending at point B can be represented by PAB BxAx i ByAy j Bz Az k Specifically if the vector starts at the origin Figure 25 then P axi byj czk 24 where ax by and cz are the three components of the vector in the reference frame In fact point P in the Section 241 is in reality represented by a vector connected to it at point P and expressed by the three com ponents of the vector The three components of the vector can also be written in matrix form as in Eq 25 This format is used throughout this book to represent all kinematic elements P ax by cz 25 z x y ax cz by P Figure 24 Representation of a point in space z x y ax cz by P Figure 25 Representation of a vector in space Introduction to Robotics 38 This representation can be slightly modified to also include a scale factor w such that if Px Py Pz are divided by w they yield ax by and cz Therefore the vector can be written as P Px Py Pz w where ax Px w by Py w cz Pz w 26 w may be any number and as it changes it can change the overall size of the vector This is similar to the zooming function in computer graphics As the value of w changes the size of the vector changes accordingly If w is bigger than 1 all vector components enlarge if w is smaller than 1 all vector components become smaller When w is 1 the size of these components remains unchanged in this case the actual vector is represented However if w 0 then ax by and cz will be infinity In this case Px Py and Pz as well as ax by and cz will represent a vector whose length is infinite but nonetheless is in the direction represented by the vector This means that a direction vector can be represented by a scale factor of w 0 where the length is not important but the direction is represented by the three components of the vector This is used throughout the book to represent direction vectors In computer graphics applications the addition of a scale factor allows the user to zoom in or out simply by changing this value Since the scale factor increases or decreases all vector lengths proportionally the size of a vector or drawing can be easily changed without the need to redraw it However our reason for this inclu sion is different and it will become apparent shortly Example 21 A vector is described as P 3i 5j 2k Express the vector in matrix form 1 With a scale factor of 2 2 If it were to describe a direction as a unit vector Solution The vector can be expressed in matrix form with a scale factor of 2 as well as with 0 for direction as P 6 10 4 2 and P 3 5 2 0 However in order to make the vector into a unit vector we normalize the length to be equal to 1 To do this each component of the vector is divided by the square root of the sum of the squares of the three components λ P2 x P2 y P2 z 6 16 and Px 3 6 16 0 487 etc Therefore Punit 0 487 0 811 0 324 0 Note that 0 4872 0 8112 0 3242 1 Kinematics of Serial Robots Position Analysis 39 Example 22 A vector p is 5 units long and is in the direction of a unit vector q described as follows Express the vector in matrix form qunit 0 371 0 557 qz 0 Solution The unit vectors length must be 1 Therefore λ q2 x q2 y q2 z 0 371 2 0 557 2 q2 z 1 qz 0 743 qunit 0 371 0 557 0 743 0 and p qunit 5 1 855 2 785 3 715 1 243 Representation of a Frame at the Origin of a FixedReference Frame A frame is generally represented by three mutually orthogonal axes such as x y and z Since we may have more than one frame at any given time we use axes x y and z to represent the fixed Universe reference frame Fxyz and a set of axes n o and a to represent another moving frame Fnoa relative to the Universe frame This way there should be no confusion about which frame is referenced The letters n o and a are derived from the words normal orientation and approach Referring to Figure 26 it should be clear that in order to avoid hitting the part while trying to pick it up the robot would have to approach it along the zaxis of the gripper In robotic nomenclature this axis is called approachaxis and is referred to as the aaxis The orientation with which the gripper frame approaches the part is called orientationaxis and is referred to as the oaxis Since the xaxis is normal to both it is referred to as the naxis Throughout this book we refer to a moving frame as Fnoa with normal orientation and approach axes x y n o a z Figure 26 The normal orientation and approachaxes of a moving frame Introduction to Robotics 40 The direction of each axis of a frame Fnoa located at the origin of a reference frame Fxyz Figure 27 is represented by its three directional cosines relative to the reference frame as in section 242 Consequently the three axes of the frame can be represented by three vectors in matrix form as F nx ox ax ny oy ay nz oz az 27 244 Representation of a Frame Relative to a Fixed Reference Frame To fully describe a frame relative to another frame both the location of its origin and the directions of its axes must be specified If a frame is not at the origin or in fact even if it is at the origin of the reference frame its location relative to the reference frame is described by a vector between the origin of the frame and the origin of the reference frame Figure 28 Similarly the position vector is expressed by its components relative to the reference frame Therefore the frame can be expressed by three vectors describing its directional unit vectors and a fourth vector describing its location as F nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 28 z y x n a ox o oy oz Figure 27 Representation of a frame at the origin of the reference frame z y x n o a p Figure 28 Representation of a frame in a frame Kinematics of Serial Robots Position Analysis 41 As shown in Eq 28 the first three vectors are directional vectors with w 0 representing the directions of the three unit vectors of the frame Fnoa while the fourth vector with w 1 represents the location of the origin of the frame relative to the reference frame Unlike the unit vectors the length of vector p is important Consequently we use a scale factor of 1 A frame may also be represented by a 3 4 matrix without the scale factors but it is not common Adding the fourth row of scale factors to the matrix makes it a 4 4 or homogeneous matrix We see why this is important shortly Example 23 The frame F shown in Figure 29 is located at 357 units with its naxis parallel to x its oaxis at 45 relative to the yaxis and its aaxis at 45 relative to the zaxis The frame can be described by F 1 0 0 3 0 0 707 0 707 5 0 0 707 0 707 7 0 0 0 1 245 Representation of a Rigid Body An object can be represented in space by a frame attached to it Since the object is permanently attached to this frame its position and orientation relative to the frame are always known regardless of how complicated it might be As a result so long as the frame can be described in space the objects location and orientation relative to the fixed frame will be known Figure 210 As before a frame can be represented by a matrix z y x n o a p 45 45 Figure 29 An example of representation of a frame z x y n o a p Figure 210 Representation of an object in space Introduction to Robotics 42 where the origin of the frame and the three vectors representing its orientation relative to the reference frame are expressed Therefore Fobject nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 29 As was discussed in Chapter 1 a point in space has only 3 degrees of freedom DOF it can only move along the three reference axes However a rigid body in space has 6 DOF meaning that not only can it move along the x y and zaxes but it can also rotate about these three axes Consequently all that is needed to completely define an object in space is six pieces of information describing the location of the origin of the object in the reference frame and its orientation about the three axes However as can be seen in Eq 29 12 pieces of information are given 9 for orientation and 3 for position this excludes the scale factors on the last row of the matrix because they do not add to this information Obviously there must be some constraints present in this representation to limit the pieces of information to six There fore we need 6 constraint equations to reduce the pieces of information from 12 to 6 The constraints come from the known characteristics of a frame that have not been utilized yet that The three unit vectors n o a are mutually perpendicular and Each unit vector representing directional cosines must be equal to 1 These constraints translate into the following six constraint equations 1 n o 0 the dot product of n and ovectors must be zero 2 n a 0 3 a o 0 4 n 1 the magnitude of the lenght of the vector must be 1 5 o 1 6 a 1 210 As a result the values representing a frame in a matrix must satisfy these equations Otherwise the frame will not be correct However a dot product is a scalar To ensure that the righthand rule for the three direc tion vectors is maintained the dot products in Eq 210 can be replaced by a cross product as n o a 211 Since Eq 211 includes the correct righthand rule relationship too it is recommended that this equation be used to determine the correct relationship among the three vectors It should be mentioned that since the calculation of lengths requires taking square roots we must make sure that we only choose values that satisfy the righthand rule Example 24 For the following frame find the values of the missing elements and complete the matrix representation of the frame F 0 5 0 707 3 0 2 0 0 0 1 Kinematics of Serial Robots Position Analysis 43 Solution Obviously 532 represent the position of the origin of the frame and do not affect the constraint equa tions Notice that only three values for directional vectors are given This is all that is needed Using Eq 210 we get nx ox ny oy nz oz 0 or nx 0 0707 oy nz oz 0 nx ax ny ay nz az 0 or nx ax 0707 ay nz 0 0 ax ox ay oy az oz 0 or ax 0 ay oy 0 oz 0 nx 2 ny 2 nz 2 1 or nx 2 07072 nz 2 1 ox 2 oy 2 oz 2 1 or 02 oy 2 oz 2 1 ax 2 ay 2 az 2 1 or ax 2 ay 2 02 1 Simplifying these equations yields 0707 oy nzoz 0 nxax 0707 ay 0 ayoy 0 nx 2 nz 2 05 oy 2 oz 2 1 ax 2 ay 2 1 Solving these six equations yields nx 0707 nz 0 oy 0 oz 1 ax 0707 and ay 0707 Notice that both nx and ax must have the same sign The reason for multiple solutions is that with the given parameters it is possible to have two sets of mutually perpendicular vectors in opposite direc tions The final matrix is F1 0 707 0 0 707 5 0 707 0 0 707 3 0 1 0 2 0 0 0 1 or F2 0 707 0 0 707 5 0 707 0 0 707 3 0 1 0 2 0 0 0 1 As you can see both matrices satisfy all the requirements set by the constraint equations but only F1 follows the righthand rule It is important to realize that the values representing the three direction vectors are not arbitrary but are bound by these equations Therefore you may not randomly use any desired values in the matrix The problem may also be solved using n o a or i j k nx ny nz ox oy oz axi ayj azk or i nyoz nzoy j nxoz nzox k nxoynyox axi ayj azk 212 Substituting the values into this equation yields i 0 707oz nzoy j nxoz k nxoy axi ayj 0k Solving the three simultaneous equations results in 0 707oz nzoy ax nxoz ay nxoy 0 Introduction to Robotics 44 which replace the three equations for the dot products Together with the three unitvector length constraint equations there are six equations Note that using the crossproduct constraint equation results only in F1 Example 25 Find the missing elements of the following frame representation F 0 3 0 5 9 0 7 0 0 0 1 Solution n2 x n2 y n2 z 1 n2 x 0 25 1 nx 0 866 n o 0 0 866 0 0 5 oy 0 oz 0 oy 0 o 1 oz 1 n o a i 0 5 j 0 866 k 0 axi ayj azk ax 0 5 ay 0 866 az 0 25 Homogeneous Transformation Matrices For a variety of reasons it is best to keep matrices in square form either 3 3 or 4 4 First as we see later it is much easier to calculate the inverse of square matrices than rectangular matrices Second in order to mul tiply two matrices their dimensions must match such that the number of columns of the first matrix must be the same as the number of rows of the second matrix as in m n and n p which results in a matrix of m p dimensions If two matrices A and B are square with m m and m m dimensions we may multiply A by B or B by A both resulting in m m dimensions However if the two matrices are not square with m n and n p dimensions respectively A can be multiplied by B but B may not be multi plied by A and the result of AB has a dimension different from A and B Since we will have to multiply many matrices together in different orders to find the equations of motion of the robots we need to have square matrices In order to keep representation matrices square if we represent both orientation and position in the same matrix we add the scale factors to the matrix to make it 4 4 If we represent the orientation alone we may either drop the scale factors and use 3 3 matrices or add a fourth column with zeros for position in order to keep the matrix square Matrices of this form are called homogeneous matrices and we refer to them as F nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 213 Kinematics of Serial Robots Position Analysis 45 26 Representation of Transformations A transformation is defined as making a movement in space When a frame a vector an object or a moving frame moves in space relative to a fixed reference frame we represent this motion in a form similar to a frame representation This is because a transformation is a change in the state of a frame representing the change in its location and orientation therefore it can be represented like a frame A transformation may be in one of the following forms A pure translation A pure rotation about an axis A combination of translations andor rotations In order to see how these can be represented we study each one separately 261 Representation of a Pure Translation If a frame representing a point a vector or an object moves in space without any change in its orientation the transformation is a pure translation In this case the directional unit vectors remain unchanged only the location of the origin of the frame relative to the reference frame changes as shown in Figure 211 The trans formation T representing a pure translation simply is T Trans dxdydz 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 214 where dx dy and dz are the three components of a pure translation vector d relative to the x y and zaxes of the reference frame The first three columns represent no rotational movement equivalent of a 1 while the last column represents the translation The new location of the frame relative to the fixed reference frame can be found by adding the translation vector to the vector representing the original location of the origin of the frame In matrix form the new frame representation may be found by premultiplying the frame with a matrix representing the transforma tion The new location of the frame is Fnew 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 nx ox ax px dx ny oy ay py dy nz oz az pz dz 0 0 0 1 215 z y x p d n o a n o a Figure 211 Representation of a pure translation in space Introduction to Robotics 46 This equation is also symbolically written as Fnew Trans dxdydz Fold 216 First as you see premultiplying the frame matrix by the transformation matrix yields the new location of the frame Second notice that the directional vectors remain the same after a pure translation but the new location of the frame is at d p Third notice how homogeneous transformation matrices facilitate the mul tiplication of matrices resulting in a matrix with the same dimensions as before Example 26 A frame F is moved 3 units along the xaxis and 2 units along the zaxis of the reference frame Find the new location of the frame F 0 527 0 574 0 628 8 0 369 0 819 0 439 10 0 766 0 0 643 6 0 0 0 1 Solution Using Eq 215 or 216 we get Fnew Trans dxdydz Fold Trans 302 Fold 1 0 0 3 0 1 0 0 0 0 1 2 0 0 0 1 0 527 0 574 0 628 8 0 369 0 819 0 439 10 0 766 0 0 643 6 0 0 0 1 0 527 0 574 0 628 11 0 369 0 819 0 439 10 0 766 0 0 643 8 0 0 0 1 262 Representation of a Pure Rotation about an Axis To simplify the derivation of rotations about an axis lets first assume that the frame is at the origin of the reference frame and is parallel to it We later expand the results to other rotations as well as combinations of rotations Lets assume that a frame Fnoa located at the origin of the reference frame Fxyz rotates an angle θ about the xaxis of the reference frame Lets also assume that attached to the rotating frame Fnoa is a point p with coordinates px py and pz relative to the reference frame and pn po and pa relative to the moving frame As the frame rotates about the xaxis point p attached to the frame will also rotate with it Before rotation the coordinates of the point in both frames are the same remember that the two frames are at the same location and are parallel to each other After rotation the pn po and pa coordinates of the point remain the same in the rotating frame Fnoa but px py and pz will be different in the Fxyz frame Figure 212 We want to find the new coordinates of the point relative to the fixed reference frame after the moving frame has rotated Now lets look at the same coordinates in 2D as if we were standing on the xaxis The coordinates of point p are shown before and after rotation in Figure 213 The coordinates of point p relative to the reference frame are px py pz while its coordinates relative to the rotating frame to which the point is attached remain as pn po and pa Kinematics of Serial Robots Position Analysis 47 Figure 213 shows that the value of px does not change as the frame rotates about the xaxis but the values of py and pz do change Verify that px pn py l1l2 po cosθpa sinθ pz l3 l4 po sinθ pa cosθ 217 and in matrix form px py pz 1 0 0 0 cosθ sinθ 0 sinθ cosθ pn po pa 218 z y x z y x n o a p py px pz p px py pz a n o θ θ Before rotation After rotation Figure 212 Coordinates of a point in a rotating frame before and after rotation y z o a p l1 l2 l3 l4 pz pa po pa po py θ θ Figure 213 Coordinates of a point relative to the reference frame and rotating frame as viewed from the xaxis Introduction to Robotics 48 This means that the coordinates of the point p or vector p in the rotated frame must be premultiplied by the rotation matrix as shown to get the coordinates in the reference frame This rotation matrix is only for a pure rotation about the xaxis of the reference frame and is denoted as pxyz Rot xθ pnoa 219 Notice that the first column of the rotation matrix in Eq 218 representing the naxis has 100 values indicating that the coordinate along the xaxis has not changed To simplify writing of these matrices it is customary to designate Cθ to denote cosθ and Sθ to denote sinθ Therefore the rotation matrix may be also written as Rot xθ 1 0 0 0 Cθ Sθ 0 Sθ Cθ 220 You may want to do the same for the rotation of a frame about the y and zaxes of the reference frame Verify that the results are Rot yθ Cθ 0 Sθ 0 1 0 Sθ 0 Cθ and Rot zθ Cθ Sθ 0 Sθ Cθ 0 0 0 1 221 Equation 219 can also be written in a form that assists in easily following the relationship between dif ferent frames Denoting the transformation as UTR the transformation of R relative to U for Universe denoting pnoa as Rp p relative to frame R and denoting pxyz as Up p relative to frame U Eq 219 simplifies to Up UTR Rp 222 As you see canceling the Rs yields the coordinates of point p relative to U The same notation is used throughout this book to relate to multiple transformations Example 27 A point p2 3 4T is attached to a rotating frame The frame rotates 90 about the xaxis of the reference frame Find the coordinates of the point relative to the reference frame after the rota tion and verify the result graphically Solution Of course since the point is attached to the rotating frame the coordinates of the point relative to the rotating frame remain the same after the rotation The coordinates of the point relative to the reference frame are px py pz 1 0 0 0 C90 S90 0 S90 C90 pn po pa 1 0 0 0 0 1 0 1 0 2 3 4 2 4 3 As shown in Figure 214 the coordinates of point p relative to the reference frame after rotation are 2 4 3 as obtained by the above transformation Kinematics of Serial Robots Position Analysis 49 263 Representation of Combined Transformations Combined transformations consist of a number of successive translations and rotations about the fixed ref erence frame axes or the moving current frame axes Any transformation can be resolved into a set of transla tions and rotations in a particular order For example we may rotate a frame about the xaxis then translate about the x y and zaxes and then rotate about the yaxis in order to accomplish the desired transforma tion As we see later this order is very important such that if the order of two successive transformations changes the result may be completely different To see how combined transformations are handled lets assume that a frame Fnoa is subjected to the fol lowing three successive transformations relative to the reference frame Fxyz 1 Rotation of α degrees about the xaxis 2 Followed by a translation of l1l2l3 relative to the x y and zaxes respectively 3 Followed by a rotation of β degrees about the yaxis Also lets say that a point pnoa is attached to the rotating frame at the origin of the reference frame As the frame Fnoa rotates or translates relative to the reference frame point p attached to it moves with it and the coordinates of the point relative to the reference frame change After the first transformation as we saw in the previous section the coordinates of point p relative to the reference frame can be calculated by pxyz 1 Rot xα pnoa 223 where pxyz1 is the coordinates of the point after the first transformation relative to the reference frame The coordinates of the point relative to the reference frame at the conclusion of the second transformation are pxyz 2 Trans l1l2l3 pxyz 1 Trans l1l2l3 Rot xα pnoa 224 Similarly after the third transformation the coordinates of the point relative to the reference frame are pxyz pxyz 3 Rot yβ pxyz 2 Rot yβ Trans l1l2l3 Rot xα pnoa As you see the coordinates of the point relative to the reference frame at the conclusion of each transfor mation are found by premultiplying the coordinates of the point by each transformation matrix Of course as shown in Appendix A the order of matrices cannot be changed this order is very important Also notice that for each transformation relative to the reference frame the matrix is premultiplied Consequently the order of matrices written is the opposite of the order of transformations performed Example 28 A point p7 3 1T is attached to a frame Fnoa and is subjected to the following transformations 1 Rotation of 90 about the zaxis 2 Followed by a rotation of 90 about the yaxis 3 Followed by a translation of 4 3 7 z y x n o a p z y x n p o a Figure 214 Rotation of a frame relative to the xaxis of the reference frame Introduction to Robotics 50 Find the coordinates of the point relative to the reference frame at the conclusion of transformations Solution The matrix equation representing the transformation can be found through premultiplying by each transformation as pxyz Trans 4 37 Rot y90 Rot z90 pnoa 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 7 3 1 1 5 4 10 1 The first transformation of 90 about the zaxis rotates the Fnoa frame as shown in Figure 215 fol lowed by the second rotation about the yaxis followed by the translation relative to the reference frame Fxyz The point p in the frame can then be found relative to the Fnoa as shown The final coordi nates of the point can be traced on the x y zaxes to be 4 1 5 3 7 4 and 7 3 10 Be sure to follow this graphically Example 29 In this case assume the same point p7 3 1T attached to Fnoa is subjected to the same transformations but the transformations are performed in a different order as shown 1 A rotation of 90 about the zaxis 2 Followed by a translation of 4 37 3 Followed by a rotation of 90 about the yaxis Find the coordinates of the point relative to the reference frame at the conclusion of transformations Solution The matrix equation representing the transformation is pxyz Rot y90 Trans 4 37 Rot z90 pnoa 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 7 3 1 1 8 4 1 1 z y x n2 o2 a2 z y x n3 o3 a3 4 3 7 p 7 3 1 z y x n1 a1 o1 After the first transformation After the second transformation After the third transformation Figure 215 Effects of three successive transformations Kinematics of Serial Robots Position Analysis 51 As you see in Figure 216 although the transformations are exactly the same as in Example 28 since the order of transformations is changed the final coordinates of the point are completely different In this case although the first transformation creates exactly the same change in the frame the second transformation moves the rotating frame Fnoa outward As a result of the third transformation this frame will rotate about the yaxis therefore rotating downward The location of point p attached to the frame is also shown Verify that the coordinates of this point relative to the reference frame are 7 1 8 3 7 4 and 4 3 1 which is the same as the analytical result 264 Transformations Relative to the Current Moving Frame All transformations we have discussed so far have been relative to the fixed reference frame This means that all translations rotations and distances except for the location of a point relative to the moving frame have been measured relative to the reference frame axes However it is possible to make transformations relative to the axes of a moving or current frame This means that for example a rotation of 90 may be made relative to the naxis of the moving frame also referred to as the current frame and not the xaxis of the reference frame To calculate the changes in the coordinates of a point that is attached to the current frame relative to the reference frame the transformation matrix is postmultiplied instead Note that since the position of a point or an object attached to a moving frame is always measured relative to that moving frame the position matrix describing the point or object is also always postmultiplied Example 210 Assume that the same point as in Example 29 is now subjected to the same transfor mations but all relative to the current moving frame as 1 A rotation of 90 about the aaxis 2 Then a translation of 4 37 along n o aaxes 3 Followed by a rotation of 90 about the oaxis Find the coordinates of the point relative to the reference frame after the transformations are completed Solution In this case since the transformations are made relative to the current frame each transformation matrix is postmultiplied As a result the equation representing the coordinates is z y x z y x n1 o1 a1 n2 o2 a2 4 3 7 z y x 3 n3 o3 a3 p 7 7 After the first transformation After the second transformation After the third transformation Figure 216 Changing the order of transformations will change the final result Introduction to Robotics 52 pxyz Rot a90 Trans 4 37 Rot o90 pnoa pxyz 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 7 3 1 1 0 5 0 1 As expected the result is completely different from the other cases both because the transformations are made relative to the current frame and because the order of the matrices is now different Figure 217 shows the results graphically Notice how the transformations are accomplished relative to the current frames Notice how the 731 coordinates of point p in the current frame results in 050 coordinates relative to the reference frame 265 Mixed Transformations Relative to Rotating and Reference Frames It is of course possible to also perform mixed transformations relative to the reference and current frames In that case pre and postmultiplying the frame of interest by corresponding transformations results in the total transformation Postmultiplying the transformation by the coordinates of point p in the frame yields the location of the point relative to the reference frame Example 211 A frame B was rotated about the xaxis 90 followed by a translation about the current oaxis of 2 inches followed by a rotation about the aaxis of 90 and a translation along the current y axis of 3 inches a Write an equation that describes the motions b Find the final location of a point Bp 132 T relative to the reference frame Solution In this case transformations alternate relative to the reference and current frames a Starting with frame B and pre or postmultiplying each motions matrix accordingly we get UTB Trans 030 Rot x90 B Trans 020 Rot a90 z y x n1 o1 a1 z y x n2 o2 a2 z y x n3 o3 a3 p After the first transformation After the second transformation After the third transformation Figure 217 Transformations relative to the current frames Kinematics of Serial Robots Position Analysis 53 b Substituting the matrices and multiplying them we get Up UT B Bp 1 0 0 0 0 1 0 3 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 2 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 3 2 1 3 1 3 1 Example 212 A frame F was rotated about the oaxis 90 followed by a rotation about the yaxis of 30 followed by a translation of 3 units along the aaxis and finally a rotation of 90 along the xaxis Find the transformed frame Fold 0 0 1 3 1 0 0 2 0 1 0 6 0 0 0 1 Solution The following set of matrices written in the proper order to represent transformations relative to the reference frame or the current frame describes the total transformation and the new frame Starting with the frame F we find Fnew Rot x90 Rot y30 Fold Rot o 90 Trans 003 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 866 0 0 5 0 0 1 0 0 0 5 0 0 866 0 0 0 0 1 0 0 1 3 1 0 0 2 0 1 0 6 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 0 866 0 5 0 5 6 0 5 0 866 0 3 7 0 0 1 1 0 0 0 1 Verify graphically that this is true 27 Inverse of Transformation Matrices As was mentioned earlier there are many situations where the inverse of a matrix is needed in robotic anal ysis as the following example shows Suppose the robot in Figure 218 is to be moved to part P in order to drill a hole in the part The robots base position relative to the reference frame U is described by a frame R the robots hand is described by frame H and the end effector lets say the end of the drill bit that will be used to drill the hole is described by frame E The parts position is described by frame P The location of the point Introduction to Robotics 54 where the hole will be drilled can be related to the reference frame U through two independent paths one through the part one through the robot Therefore the following equation can be written UT E UTR RT H HTE UT P PT E 225 The location of point E on the part can be achieved by moving from U to P and from P to E or by a trans formation from U to R from R to H and from H to E In reality the transformation of frame R relative to the Universe frame UTR is known since the location of the robots base must be known in any setup For example if a robot is installed in a workcell the location of the robots base is known since it is bolted to a table Even if the robot is mobile or attached to a conveyor belt its location at any instant is known because a controller must be following the position of the robots base at all times The HTE or the transformation of the end effector relative to the robots hand is also known since any tool used at the end effector is a known tool and its dimensions and configuration are known UTP or the transformation of the part relative to the Universe is also known since we must know where the part is located if we are to drill a hole in it This location is known by putting the part in a jig through the use of a camera and vision system through the use of a conveyor belt and sensors or other similar devices PTE is also known since we need to know where the hole is to be drilled on the part Consequently the only unknown transformation is RTH or the transformation of the robots hand relative to the robots base This means we need to find the robots joint variables angles of revolute joints and lengths of prismatic joints of the robot in order to position the end effector at the hole for drilling Consequently it is necessary to cal culate this transformation which tells us what needs to be accomplished The transformation is later used to actually solve for joint angles and link lengths To calculate this matrix unlike in an algebraic equation we cannot simply divide the right side by the left side of the equation We need to pre or postmultiply by inverses of appropriate matrices to eliminate them As a result we have UT R 1 UT R RTH HT E HT E 1 UTR 1 UTP PTE HT E 1 226 or since UTR 1 UTR I and HT E HTE 1 I the left side of Eq 226 simplifies to RTH and we get RTH UT R 1UT P PT E HT E 1 227 H E P U R Figure 218 The Universe robot hand part and end effector frames Kinematics of Serial Robots Position Analysis 55 We can check the accuracy of this equation by realizing that HT E 1 is the same as ETH Therefore the equation can be rewritten as RTH UT R 1UTP PT E HT E 1 RT U UTP PTE ETH RTH 228 It is now clear that we need to be able to calculate the inverse of transformation matrices for kinematic analysis as well In order to see what transpires lets calculate the inverse of a simple rotation matrix about the xaxis Please review the process for calculation of square matrices in Appendix A The rotation matrix about the xaxis is Rot xθ 1 0 0 0 Cθ Sθ 0 Sθ Cθ 229 Recall that the following steps must be taken to calculate the inverse of a matrix 1 Calculate the determinant of the matrix 2 Transpose the matrix 3 Replace each element of the transposed matrix by its own minor adjoint matrix 4 Divide the adjoint matrix by the determinant Applying the process to the rotation matrix we get det Rot xθ 1 C2θ S2θ 0 1 Rot xθ T 1 0 0 0 Cθ Sθ 0 Sθ Cθ Now we calculate each minor As an example the minor for the 22 element is Cθ0 Cθ the minor for the 11 element is C2θ S2θ 1 and so on As you notice for the rotation matrix the minor for each element is the same as the element itself Therefore Adj Rot xθ Rot xθ T minor Rot xθ T Since the determinant of the original rotation matrix is 1 dividing the AdjRotx θ matrix by the deter minant yields the same matrix Consequently the inverse of a rotation matrix about the xaxis is the same as its transpose or Rot xθ 1 Rot xθ T 230 Of course you would get the same result with the second method mentioned in Appendix A A matrix with this characteristic is called a unitary matrix It turns out that all rotation matrices are unitary matrices There fore all we need to do to calculate the inverse of a rotation matrix is to transpose it Verify that rotation matrices about the y and zaxes are also unitary in nature Be aware that only rotation matrices are unitary if a matrix is not a simple rotation matrix it may not be unitary The preceding result is true only for a simple 3 3 rotation matrix For a homogenous 4 4 transformation matrix it can be shown that the inverse of the matrix can be written by dividing the matrix into two portions The rotation portion of the matrix can be simply transposed as it is still unitary The position portion of the homogeneous matrix is the negative of the dot product of the pvector with each of the n o and avectors as follows Introduction to Robotics 56 T nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 and T 1 nx ny nz p n ox oy oz p o ax ay az p a 0 0 0 1 231 As shown the rotation portion of the matrix is simply transposed the position portion is replaced by the negative of the dot products and the last row scale factors is not affected This is very helpful since we will need to calculate inverses of transformation matrices but direct calculation of 4 4 matrices is a lengthy process Example 213 Calculate the matrix representing Rot x40 1 Solution The matrix representing a 40 rotation about the xaxis is Rot x40 1 0 0 0 0 0 766 0 643 0 0 0 643 0 766 0 0 0 0 1 The inverse of this matrix is Rot x40 1 1 0 0 0 0 0 766 0 643 0 0 0 643 0 766 0 0 0 0 1 Since the position vector of the matrix is zero its dot product with the n o and avectors is also zero Example 214 Calculate the inverse of the given transformation matrix T 0 5 0 0 866 3 0 866 0 0 5 2 0 1 0 5 0 0 0 1 Solution Based on the previous discussion the inverse of the transformation is T 1 0 5 0 866 0 3 0 5 2 0 866 5 0 0 0 1 3 0 2 0 5 1 0 866 0 5 0 3 0 866 2 0 5 5 0 0 0 0 1 0 5 0 866 0 3 23 0 0 1 5 0 866 0 5 0 1 598 0 0 0 1 You may want to verify that TT 1 is an identity matrix Kinematics of Serial Robots Position Analysis 57 Example 215 In a robotic setup a camera is attached to the fifth link of a 6DOF robot It observes an object and determines its frame relative to the cameras frame Using the following information deter mine the necessary motion the end effector must make to get to the object 5Tcam 0 0 1 3 0 1 0 0 1 0 0 5 0 0 0 1 5TH 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 camTobj 0 0 1 2 1 0 0 2 0 1 0 4 0 0 0 1 HTE 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 Solution Referring to Eq 225 we can write a similar equation to relate the different transformations and frames to each other as RT5 5T H HTE ETobj RT 5 5Tcam camTobj Since RT5 appears on both sides of the equation we can simply neglect it All other matrices with the exception of ETobj are known Then ETobj HT E 1 5T H 1 5Tcam camTobj ET H HT 5 5Tcam camTobj where HT E 1 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 5T H 1 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 Substituting the matrices and the inverses in the equation representing ETobj results in ETobj 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 0 0 1 3 0 1 0 0 1 0 0 5 0 0 0 1 0 0 1 2 1 0 0 2 0 1 0 4 0 0 0 1 1 0 0 2 0 1 0 1 0 0 1 4 0 0 0 1 Example 216 The following transformation matrix F is the result of two rotations one was θ about the zaxis but it is unclear whether this was the first or second rotation Determine the axis of rotation of α and whether it was performed first or second T Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα Solution To do this we need to decouple the two rotations by premultiplying the transformation by Rot zθ 1 But since we do not know the order of rotations we first assume the rotation were about the reference frame and that the rotation about the zaxis was performed first We write Introduction to Robotics 58 T Rot α Rot zθ T Rot zθ 1 Rot α Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα Cθ Sθ 0 Sθ Cθ 0 0 0 1 C2θ S2θCα SθCθSθCθCα SθSα SθCθSθCθCα S2θ C2θCα CθSα SθSα SαCθ Cα Obviously this is not a satisfactory answer Assuming that rotation about the zaxis was performed second we write T Rot zθ Rot α Rot zθ 1 T Rot α Cθ Sθ 0 Sθ Cθ 0 0 0 1 Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα C2θ S2θ SθCθCα SθCθCα SθCθSαSθCθSα SθCθ SθCθ S2θCα C2θCα S2θSαC2θSα 0 Sα Cα 1 0 0 0 Cα Sα 0 Sα Cα This is clearly a first rotation about the xaxis or a second rotation about the naxis 28 Forward and Inverse Kinematics of Robots Suppose we have a robot whose configuration is known This means that all the link lengths and joint angles are known Calculating the position and orientation of the hand of the robot is called forward kinematic anal ysis In other words if all robot joint variables are known using forward kinematic equations we can calculate where the robot is at any instant However if we want to place the hand of the robot at a desired location and orientation we need to know how much each link length or joint angle must be such that at those values the hand will be at the desired position and orientation This is called inverse kinematic analysis This means that instead of substituting the known robot variables in the forward kinematic equations of the robot we need to find the inverse of these equations to enable us to find the necessary joint values to place the robot at the desired location and orientation In reality the inverse kinematic equations are far more important to enable the robot controller to calculate the joint values using these equations and to run the robot to the desired position and orientation Later we first develop the forward kinematic equations of robots then using these equations we derive the inverse kinematic equations You may recall from Chapter 1 that in order to position and orient a rigid body in space we attach a frame to the body and specify the position of the origin of the frame and the orientation of its 3 axes This requires a total of 6 DOF or alternately six pieces of information to completely define the position and orientation of the body Here too if we want to define or find the position and orientation of the hand of a robot in space we attach a frame to it and define the position and orientation of the hand frame of the robot For a particular Kinematics of Serial Robots Position Analysis 59 configuration of the links and joints of a robot a particular set of equations relate the hand frame to the reference frame Figure 219 shows a hand frame the reference frame and their relative positions and orien tations The undefined connection between the two frames is related to the configuration of the robot Of course there are many different possibilities for this configuration and we will later see how we can develop the equations relating the two frames depending on the robot configuration In order to simplify the process we analyze the position and orientation issues separately First we develop the position equations and then the orientation equations Later we combine the two for a complete set of equations Finally we will see about the use of the DenavitHartenberg representation which is an encom passing representation for any robot configuration 29 Forward and Inverse Kinematic Equations Position In this section we study the forward and inverse kinematic equations for position As was mentioned earlier the position of the origin of a frame attached to a rigid body has 3 DOF and hence it can be completely defined by three pieces of information in any customary coordinate system including Cartesian coordinates three linear motions Cylindrical coordinates two linear motions and one rotation Spherical coordinates two rotations and one linear motion Articulated coordinates three rotations We consider all four possibilities 291 Cartesian Gantry Rectangular Coordinates In this case there are three linear motions along the x y and zaxes In a Cartesian robot all actuators are linear such as a hydraulic ram or a linear power screw and the positioning of the hand of the robot is accom plished by moving the three linear joints along the 3 axes Figure 220 A gantry robot is a Cartesian robot usually attached to a gantry frame upside down Of course since there are no rotations the transformation matrix representing this motion to point p is a simple translation matrix Remember that here we are only concerned with the position of the origin of the frame and not its orientation which we will see next The transformation matrix representing the forward kinematic equation of the position of the hand frame in a Cartesian coordinate system is RTp Tcart pxpypz 1 0 0 px 0 1 0 py 0 0 1 pz 0 0 0 1 232 x y z a n o Figure 219 The hand frame of the robot relative to the reference frame Introduction to Robotics 60 where RTP is the transformation between the reference frame and the origin of the hand p and Tcartpx py pz denotes Cartesian transformation matrix All that is needed for the inverse kinematic solution is simply set ting the desired position equal to p Example 217 We desire to position the origin of the hand frame of a Cartesian robot at point p 546 T Calculate the necessary Cartesian coordinate motions that need to be made Solution Setting the forward kinematic equation represented by the RTP matrix of Eq 232 equal to the desired position yields RTp 1 0 0 px 0 1 0 py 0 0 1 pz 0 0 0 1 1 0 0 5 0 1 0 4 0 0 1 6 0 0 0 1 or px 5 py 4 pz 6 292 Cylindrical Coordinates A cylindrical coordinate system includes two linear translations and one rotation The sequence is a trans lation of r along the xaxis a rotation of α about the zaxis and a translation of l along the zaxis as shown in Figure 221 Since these transformations are all relative to the Universe frame the total transformation caused by these three transformations is found by premultiplying by each matrix as follows x y z p px py pz a n o Figure 220 Cartesian coordinates x y z r l α p a o n Figure 221 Cylindrical coordinates Kinematics of Serial Robots Position Analysis 61 RTp Tcyl rαl Trans 00l Rot zα Trans r00 233 RT p 1 0 0 0 0 1 0 0 0 0 1 l 0 0 0 1 Cα Sα 0 0 Sα Cα 0 0 0 0 1 0 0 0 0 1 1 0 0 r 0 1 0 0 0 0 1 0 0 0 0 1 RTp Tcyl rαl Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 234 The first three columns represent the orientation of the frame after this series of transformations However at this point we are only interested in the position of the origin of the frame or the last column Obviously in cylindrical coordinate movements due to the rotation of α about the zaxis the orientation of the moving frame changes This orientation change will be discussed later You may restore the original orientation of the frame by rotating the n o a frame about the aaxis an angle of α which is equivalent to postmultiplying the cylindrical coordinate matrix by a rotation matrix of Rot a α As a result the frame will be at the same location but will be parallel to the reference frame again as follows Tcyl Rot a α Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 C α S α 0 0 S α C α 0 0 0 0 1 0 0 0 0 1 1 0 0 rCα 0 1 0 rSα 0 0 1 l 0 0 0 1 Clearly the location of the origin of the moving frame did not change but the orientation was restored to being parallel to the reference frame Notice that the last rotation was performed about the local aaxis in order to not cause any change in the position of the frame but only in its orientation For inverse kinematic equations we equate the position terms of Eq 234 to the desired values However as is discussed in Appendix A it is very important to determine in which quadrant the actual answer is oth erwise the result will be incorrect Throughout the book whenever possible we try to find the sine and the cosine of the angle independently and use the ATAN2 function for correct answer Unfortunately in many instances this is not possible For cylindrical coordinates we get rCα Px rSα Py α ATAN2 PyPx l Pz 235 Example 218 Suppose we desire to place the origin of the hand frame of a cylindrical robot at 4 5 6T Calculate the joint variables of the robot Solution Using Eq 235 we get l 6 rCα 5 and rSα 4 and therefore α ATAN2 45 38 7 Substituting α into either equation yields r 64 The final answer is r 64 units α 38 7 and l 6 units Introduction to Robotics 62 Example 219 The position and restored orientation of a cylindrical robot are given Find the matrix representing the original position and orientation of the robot before it was restored T 1 0 0 2 394 0 1 0 6 578 0 0 1 9 0 0 0 1 Solution Since r is always positive it is clear that Sα and Cα are positive and negative respectively Therefore α is in the second quadrant From T we get l 9 α ATAN2 6 578 2 394 110 r sin α 6 578 r 7 Substituting these values into Eq 234 yields the original orientation of the robot RTp Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 0 342 0 9397 0 2 394 0 9397 0 342 0 6 578 0 0 1 9 0 0 0 1 293 Spherical Coordinates A spherical coordinate system consists of one linear motion and two rotations The sequence we study here is a translation of r along the zaxis a rotation of β about the yaxis and a rotation of γ about the zaxis as shown in Figure 222 Since these transformations are all relative to the Universe frame the total transformation can be found by premultiplying by each matrix as follows RT P Tsph rβγ Rot zγ Rot yβ Trans 00r 236 β γ x y z p r a o n Figure 222 Spherical coordinates Kinematics of Serial Robots Position Analysis 63 RT p Cγ Sγ 0 0 Sγ Cγ 0 0 0 0 1 0 0 0 0 1 Cβ 0 Sβ 0 0 1 0 0 Sβ 0 Cβ 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 r 0 0 0 1 RTP Tsph rβγ CβCγ Sγ SβCγ rSβCγ CβSγ Cγ SβSγ rSβSγ Sβ 0 Cβ rCβ 0 0 0 1 237 The first three columns represent the orientation of the frame while the last column is the position of the origin Here too the original orientation of the final frame may be restored to make it parallel to the ref erence frame This exercise is left for the reader to find the correct sequence of movements to get the right answer The inverse kinematic equations for spherical coordinates are more complicated than the simple Car tesian or cylindrical coordinates because the two angles β and γ are coupled Lets see how this could be done through an example Example 220 Suppose that we now want to place the origin of the hand of a spherical robot at 4 5 6T Calculate the joint variables of the robot Solution Setting the components of the location of the origin of the frame from Tsph matrix of Eq 237 to the desired values we get rSβCγ 5 rSβSγ 4 rCβ 6 From the third equation we determine that the Cβ is positive but there are no independent values for Sβ Sγ Cγ and consequently we cannot use the ATAN2 function As a result there are two possible solutions for each angle Later we will have to check the final results to ensure they are correct tan γ 4 5 γ 38 7 or 218 7 then Sγ 0 625 or 0 625 and Cγ 0 781 or 0 781 and rSβ 4 0 625 6 4 or 6 4 and since rCβ 6 β 46 8 or 46 8 and r 8 77 You may check both answers and verify that they both satisfy all position equations If you also follow these angles about the given axes in 3D you get to the same point physically However you must notice that only one set of answers will also satisfy the orientation equations In other words these two answers result in the same position but at different orientations Since we are not concerned with the orientation of the hand frame at this point both position answers are correct In fact since we can not specify any orientation for a 3DOF robot anyway we cannot determine which of the two answers relates to a desired orientation Introduction to Robotics 64 294 Articulated Coordinates Articulated coordinates consist of three rotations as shown in Figure 223 We will develop the matrix rep resentation for this later when we discuss the DenavitHartenberg representation 210 Forward and Inverse Kinematic Equations Orientation Suppose the moving frame attached to the hand of the robot has already moved to a desired position in Cartesian cylindrical spherical or articulated coordinates and is either parallel to the reference frame or in an orientation other than what is desired The next step is to rotate the frame appropriately in order to achieve a desired orientation without changing its position This can only be accomplished by rotating about the current frame axes rotations about the reference frame axes change the position The appro priate sequence of rotations depends on the design of the wrist of the robot and the way the joints are assembled together We consider the following three common configurations Roll pitch yaw RPY angles Euler angles Articulated joints 2101 Roll Pitch Yaw RPY Angles This is a sequence of three rotations about the current aon axes respectively which orients the hand to a desired orientation The assumption here is that the current frame is parallel to the reference frame before the application of RPY Otherwise the final orientation of the robots hand is a combination of the previous orientation postmultiplied by the RPY To maintain the position of the frame and only rotate it to the desired orientation we postmultiply the frame by the RPY matrices Referring to Figure 224 the RPY sequence of rotations consists of Rotation of ϕa about the aaxis zaxis of the moving frame calledroll Rotation of ϕo about the oaxis yaxis of the moving frame called pitch Rotation of ϕn about thenaxis xaxis of the moving frame called yaw x y θ2 θ1 θ3 z a n Figure 223 Articulated coordinates Kinematics of Serial Robots Position Analysis 65 The matrix representing the RPY orientation change is RPY ϕaϕoϕn Rot aϕa Rot oϕo Rot nϕn CϕaCϕo CϕaSϕoSϕnSϕaCϕn CϕaSϕoCϕn SϕaSϕn 0 SϕaCϕo SϕaSϕoSϕn CϕaCϕn SϕaSϕoCϕnCϕaSϕn 0 Sϕo CϕoSϕn CϕoCϕn 0 0 0 0 1 238 This matrix represents the orientation change caused by the RPY alone The location and the final orien tation of the frame relative to the reference frame will be the product of the two matrices representing the position change and the RPY For example suppose that a robot is designed based on spherical coordinates and RPY Then the robot may be represented by RTH Tsph rβγ RPY ϕaϕoϕn The inverse kinematic solution for the RPY is more complicated than the spherical coordinates because here there are three coupled angles where we need to have information about the sines and the cosines of all three angles individually to solve for the angles To decouple these angles we premultiply both sides of Eq 238 by Rot aϕa 1 Rot aϕa 1RPY ϕaϕoϕn Rot oϕo Rot nϕn 239 Assuming that the final desired orientation achieved by RPY is represented by the n o a matrix we have Rot aϕa 1 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Rot oϕo Rot nϕn 240 Multiplying the matrices we get nxCϕa nySϕa oxCϕa oySϕa axCϕa aySϕa 0 nyCϕanxSϕa oyCϕaoxSϕa ayCϕaaxSϕa 0 nz oz az 0 0 0 0 1 Cϕo SϕoSϕn SϕoCϕn 0 0 Cϕn Sϕn 0 Sϕo CϕoSϕn CϕoCϕn 0 0 0 0 1 241 z x y a z a n o z n o a n o x y x y Rotation ϕa Rotation ϕo Rotation ϕn ϕa ϕo ϕn Figure 224 RPY rotations about the current axes Introduction to Robotics 66 Remember that the n o a components in Eq 240 represent the final desired values normally given or known The values of the RPY angles are the unknown variables Equating the different elements of the righthand and the lefthand sides of Eq 241 results in the following From the 21 elements we get nyCϕanxSϕa 0 ϕa ATAN2 nynx and ϕa ATAN2 ny nx 242 Note that since we do not know the sign of sinϕa or cosϕa two complementary solutions are possible From the 31 and 11 elements we get Sϕo nz Cϕo nxCϕa nySϕa ϕo ATAN2 nz nxCϕa nySϕa 243 And finally from the 22 and 23 elements we get Cϕn oyCϕaoxSϕa Sϕn ayCϕa axSϕa ϕn ATAN2 ayCϕa axSϕa oyCϕaoxSϕa 244 Later we use the same approach for decoupling angles in other equations Example 221 The desired final position and orientation of the hand of a Cartesian RPY robot is as follows Find the necessary RPY angles and displacements RTP nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 233 0 255 0 939 4 24 0 113 0 951 0 287 2 65 0 966 0 173 0 192 6 0 0 0 1 Solution From the equations we find two sets of answers ϕa ATAN2 nynx ATAN2 0 1130 233 26 or 206 ϕo ATAN2 nz nxCϕa nySϕa ATAN2 0 966 0 259 75 or 255 ϕn ATAN2 ayCϕa axSϕa oyCϕaoxSϕa ATAN2 0 669 0 743 42 or 222 px 4 24 py 2 65 pz 6 units Example 222 For the same position and orientation as in Example 221 find all necessary joint vari ables if the robot is cylindrical RPY Solution In this case we use RTP 0 233 0 255 0 939 4 24 0 113 0 951 0 287 2 65 0 966 0 173 0 192 6 0 0 0 1 Tcyl rαl RPY ϕaϕoϕn The righthand side of this equation now involves four coupled angles as before these must be decoupled However since the rotation of α about the zaxis for the cylindrical coordinates does Kinematics of Serial Robots Position Analysis 67 not affect the aaxis it remains parallel to the zaxis As a result the rotation of ϕa about the aaxis for RPY will simply be added to α This means that the 26 angle we found for ϕa is the summation of ϕa α see Figure 225 Using the position information given the solution from Example 221 and referring to Eq 234 we get rCα 4 24 rSα 2 65 α 32 ϕa α 26 ϕa 6 Sα 0 53 r 5 pz 6 l 6 Asin Example 2 21 ϕo 75 ϕn 42 Of course a similar solution may be found for the second set of answers 2102 Euler Angles Euler angles are very similar to RPY except that the last rotation is also about the current aaxis as shown in Figure 226 We still need to make all rotations relative to the current axes to prevent any change in the posi tion of the robot The rotations representing the Euler angles are Rotation of ϕabout theaaxis z axis of the moving frame followed by Rotation of θ about the oaxis y axis of the moving frame followed by Rotation of ψ about theaaxis z axis of the moving frame x y z r l P a o n ϕa α Figure 225 Cylindrical and RPY coordinates from Example 221 z x y a z a n o z n o a n o x y x y Rotation of ϕ about the aaxis Rotation of θ about the oaxis Rotation of ψ about the aaxis ψ θ ϕ Figure 226 Euler rotations about the current axes Introduction to Robotics 68 The matrix representing the Euler angles orientation change is Euler ϕθψ Rot aϕ Rot oθ Rot aψ CϕCθCψ SϕSψ CϕCθSψ SϕCψ CϕSθ 0 SϕCθCψ CϕSψ SϕCθSψ CϕCψ SϕSθ 0 SθCψ SθSψ Cθ 0 0 0 0 1 245 Once again this matrix represents the orientation change caused by the Euler angles alone The location and the final orientation of the frame relative to the reference frame will be the product of the two matrices representing the position change and the Euler angles The inverse kinematic solution for the Euler angles is found in a manner very similar to RPY We pre multiply the two sides of Eq 245 by Rot 1 aϕ to separate ϕ from one side and move it to the other By equating the elements of the two sides to each other we find the following equations Assuming the final desired orientation achieved by the Euler angles is represented by the n o a matrix Rot 1 aϕ nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 CθCψ CθSψ Sθ 0 Sψ Cψ 0 0 SθCψ SθSψ Cθ 0 0 0 0 1 246 or nxCϕ nySϕ oxCϕ oySϕ axCϕ aySϕ 0 nxSϕ nyCϕ oxSϕ oyCϕ axSϕ ayCϕ 0 nz oz az 0 0 0 0 1 CθCψ CθSψ Sθ 0 Sψ Cψ 0 0 SθCψ SθSψ Cθ 0 0 0 0 1 247 Remember that the n o a components in Eq 246 represent the final desired values that are normally given or known The values of the Euler angles are the unknown variables Equating the different elements of the righthand and the lefthand sides of Eq 247 results in the following From the 23 elements we get axSϕ ayCϕ 0 ϕ ATAN2 ayax or ϕ ATAN2 ay ax 248 With ϕ known all the elements of the lefthand side of Eq 247 are known From the 21 and 22 elements we get Sψ nxSϕ nyCϕ Cψ oxSϕ oyCϕ ψ ATAN2 nxSϕ nyCϕ oxSϕ oyCϕ 249 And finally from the 13 and 33 elements we get Sθ axCϕ aySϕ Cθ az θ ATAN2 axCϕ aySϕ az 250 Kinematics of Serial Robots Position Analysis 69 Example 223 The desired final orientation of the hand of a CartesianEuler robot is given Find the necessary Euler angles RT H nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 167 0 773 0 612 7 0 932 0 078 0 354 2 0 321 0 630 0 707 6 0 0 0 1 Solution From these equations we find ϕ ATAN2 ayax ATAN2 0 354 0 612 30 or 210 Realizing that both the sines and cosines of 30 and 210 can be used for the remainder ψ ATAN2 nxSϕ nyCϕ oxSϕ oyCϕ 0 8910 454 63 or 243 θ ATAN2 axCϕ aySϕaz ATAN2 7070 707 45 or 135 Unlike Example 222 for a robot of Euler cylindrical configuration it will not be easy to find the angles because there are two rotations about the aaxis The angles have to be decoupled individually In this case it is probably better to use the DenavitHartenberg technique presented in Section 212 2103 Articulated Joints Articulated joints consist of three rotations other than RPY or Euler Similar to section 294 we develop the matrix representing articulated joints in Section 212 when we discuss the DenavitHartenberg representation 211 Forward and Inverse Kinematic Equations Position and Orientation The matrix representing the final location and orientation of the robot is a combination of a positioning choice and an orientation choice For example if the robot is Cartesian and RPY the final position and ori entation of the end frame are RTH Tcart pxpypz RPY ϕaϕoϕn 251 Similarly for a spherical and Euler robot we get RTH Tsph rβγ Euler ϕθψ 252 The forward and inverse kinematic solutions for these cases are not developed here since many different combinations are possible Instead in complicated designs the DenavitHartenberg representation is recom mended We will discuss this next 212 DenavitHartenberg Representation of Forward Kinematic Equations of Robots In 1955 Denavit and Hartenberg 4 published a paper in the ASME Journal of Applied Mechanics that was later used to represent and model robots and to derive their equations of motion This technique has become a standard way of representing robots and modeling their motions and therefore is essential to learn Addi tionally the method by which frames are assigned and handled can be used in countless other applications Introduction to Robotics 70 The DenavitHartenberg DH method of representation is a very simple way of modeling robot links and joints of any configuration regardless of the sequence or complexity It can also be used to represent trans formations in any coordinates we have already discussed such as Cartesian cylindrical spherical Euler and RPY Additionally it can be used for representation of allrevolute articulated robots SCARA robots or any possible combinations of joints and links Although the direct modeling of robots with the previous techni ques is faster and more straight forward the DH representation has an added benefit as we see later analyses of differential motions and Jacobians dynamic analysis force analysis and others are based on the results obtained from DH representation 59 Robots may be made of a succession of joints and links in any order The joints may be either prismatic linear or revolute rotational move in different planes and have offsets The links may also be of any length including zero may be twisted and bent and may be in any plane We need to be able to model and analyze any robot configuration whether or not it follows any of the preceding specific coordinates To do this we assign a reference frame to each joint and use a general procedure to transform from one joint to the next one frame to the next If we combine all the transformations from the base to the first joint from the first joint to the second joint etc until we get to the last joint we will have the robots total trans formation matrix In the following sections we define a general procedure based on the DH representation to assign reference frames to each joint Then we define how a transformation between any two successive frames may be accomplished Finally we write the total transformation matrix for the robot A robot may be made of a series of links and joints in any form Figure 227 represents three successive joints and two links between them Although these joints and links are not necessarily similar to any real robot joint or link they are very general and can easily represent any joint or link in real robots The joints may be revolute or prismatic or both Although in real robots it is customary to only have 1DOF joints the joints in Figure 227 represent 1 or 2DOF joints In Figure 227a we assign joint number n to the first joint n 1 to the second joint and n 2 to the third joint There may be other joints before or after these Each link is also assigned a link number as shown Link n will be between joints n and n 1 and link n 1 is between joints n 1 and n 2 Although this seems tedious in practice it is very intuitive and simple To model the robot with the DH representation we first assign a local reference frame to each and every joint To each joint we assign a local zaxis and an xaxis although for moving frames we have used the n o and a designations for simplicity we use x y and z here We normally do not need to assign a yaxis since we always know that yaxes are mutually perpendicular to both x and zaxes In addition the Denavit Har tenberg representation does not use the yaxis at all The following is the procedure for assigning a local ref erence frame to each joint All joints without exception are represented by a zaxis If the joint is revolute the zaxis is in the direction of rotation as followed by the righthand rule for rotations If the joint is prismatic the z axis is along the direction of the linear movement In each case the index number for the zaxis of joint n is n 1 For example the zaxis representing motions about joint number n 1 is zn These simple rules allow us to quickly assign zaxes to all joints For revolute joints the rotation about the z axis represented by θ is the joint variable For prismatic joints the length of the link along the zaxis represented by d is the joint variable As shown in Figure 227a in general joints may not necessarily be parallel or intersecting As a result the zaxes may be skew lines There is always one line mutually perpendicular to any two skew lines called the common normal which is the shortest distance between them We always assign the xaxis of the local reference frame in the direction of the common normal between the previous and current axes Therefore if an represents the common normal between zn1 and zn the direction of xn is along an Similarly if the common normal between zn and zn1 is an1 the direction of xn1 will be along an1 The common normal lines between successive joints are not necessarily intersecting or collinear As a result the origins of two successive frames may also not be at the same location Based on the above we can assign coordinate frames to all joints with the following special cases Kinematics of Serial Robots Position Analysis 71 a Joint n Joint n1 Joint n2 x y z zn1 zn zn1 dn1 an an1 αn1 αn θn1 θn θn2 Linkn Linkn1 zn Parallel to zn Parallel to zn1 xn yn xn1 θn1 zn zn1 an1 xn1 dn1 xn zn zn1 an1 xn1 dn1 xn zn zn1 an1 xn1 xn zn zn1 xn1 xn αn1 zn zn1 xn1 xn zn zn1 xn1 xn b c d e f g Figure 227 The DenavitHartenberg representation of a general purpose jointlink combination Introduction to Robotics 72 If two zaxes are parallel there are an infinite number of common normals between them We pick the common normal that is collinear with the common normal of the previous joint This will sim plify the model If the zaxes of two successive joints are intersecting there is no common normal between them or it has a zero length We assign the xaxis along a line perpendicular to the plane formed by the two axes This means that the common normal is a line perpendicular to the plane containing the two zaxes which is equivalent of picking the direction of the crossproduct of the two zaxes This also simplifies the model In Figure 227a θ represents a rotation about the zaxis d represents the distance on the zaxis between two successive common normals or joint offset a represents the length of each common normal the length of a link and α represents the angle between two successive zaxes also called the twist angle Commonly only θ and d are joint variables Values a and α are known physical parameters The next step is to follow the necessary motions to transform from one reference frame to the next Assum ing we are at the local reference frame xnzn we do the following sequence of four standard motions to get to the next local reference frame xn1zn1 1 Rotate about the znaxis an angle of θn 1 Figure 227ab This will make xn parallel to xn1 This is true because an and an1 are both perpendicular to zn and rotating zn an angle of θn 1 will make them parallel and coplanar 2 Translate along the znaxis a distance of dn1 to make xn and xn1 collinear Figure 227c Since xn and xn1 were already parallel and normal to zn moving along zn will lay them over each other 3 Translate along the alreadyrotated xnaxis a distance of an1 to bring the origins of xn and xn1 together Figure 227de At this point the origins of the two reference frames will be at the same location 4 Rotate the znaxis about the xn1axis an angle of αn 1 to align the znaxis with the zn 1axis Figure 227f At this point frames n and n 1 will be exactly the same Figure 227g and we have transformed from one to the next Repeating the exact same four motions between the successive next frames n 1 and n 2 etc results in the total transformation between the reference frame and the end frame Starting with the robots reference frame we can transform to the first joint second joint etc until the end effector Note that this sequence of movements remains the same between any two frames The transformation nTn 1 called An 1 between two successive frames representing the four movements is the product of the four matrices representing them Since all transformations are relative to the current frame they are measured and performed relative to the axes of the current local frame all matrices are post multiplied The result is nTn 1 An 1 Rot zθn 1 Trans 00dn 1 Trans an 100 Rot xαn 1 Cθn 1 Sθn 1 0 0 Sθn 1 Cθn 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 dn 1 0 0 0 1 1 0 0 an 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 Cαn 1 Sαn 1 0 0 Sαn 1 Cαn 1 0 0 0 0 1 An 1 Cθn 1 Sθn 1Cαn 1 Sθn 1Sαn 1 an 1Cθn 1 Sθn 1 Cθn 1Cαn 1 Cθn 1Sαn 1 an 1Sθn 1 0 Sαn 1 Cαn 1 dn 1 0 0 0 1 253 Kinematics of Serial Robots Position Analysis 73 For example the transformation between joints 2 and 3 of a generic robot is 2T 3 A3 Cθ3 Sθ3Cα3 Sθ3Sα3 a3Cθ3 Sθ3 Cθ3Cα3 Cθ3Sα3 a3Sθ3 0 Sα3 Cα3 d3 0 0 0 1 254 We should expect to have one A matrix for each joint Calling each transformation an An1 the total trans formation between the base and the hand of the robot is RTH RT1 1T2 2T 3 n1Tn A1A2A3An 255 where n is the joint number For a 6DOF robot there could be six A matrices To facilitate the calculation of the A matrices we use a parameters table Table 21 where joint and link parameters from the schematic drawing of the robot are determined Subsequently these values are substi tuted into each A matrix In the following examples we assign frames as necessary fill out the parameters table and substitute the values into the A matrices Starting with a simple 2axis robot and moving up to a robot with six axes we apply the DH representation in the following examples to derive the forward kinematic equations for each one Many additional practical notes are discussed as well Example 224 For the simple 2axis planar robot in Figure 228 assign the necessary coordinate sys tems based on the DH representation fill out the parameters table and derive the forward kinematic equations for the robot Table 21 DH parameters table θ d a α 01 12 23 34 45 56 xU yU zU z0 z1 zH x0 x1 xH a1 a2 θ2 θ1 Figure 228 A simple 2axis articulated robot arm Introduction to Robotics 74 Solution First note that both joints rotate in the xy plane and that a frame xH zH shows the end of the robot We start by assigning the zaxes to the joints z0 is assigned to joint 1 and z1 is assigned to joint 2 Figure 228 shows both zaxes pointing out from the page as are the zU and zHaxes Notice that the 0frame is fixed and does not move the robot moves relative to it Next we assign the xaxis for each frame Since the first frame frame 0 is at the base of the robot and therefore there are no joints before it the direction of x0 is arbitrary For convenience only we may choose to assign it in the same direction as the Universe xaxis As we see later there is no problem if another direction is chosen all it means is that if we were to specify UTH instead of 0TH we would have to include an additional fixed rotation to indicate that the xU and x0axes are not parallel Since z0 and z1 are parallel the common normal between them is in the direction between the two and therefore the x1axis is as shown Table 22 shows the parameters table for the robot To identify the values follow the four necessary transformations required to go from one frame to the next according to the DH convention 1 Rotate about the z0axis an angle of θ1 to make x0 parallel to x1 2 Since x0 and x1 are in the same plane translation d along the z0axis is zero 3 Translate along the alreadyrotated x0axis a distance of a1 4 Since the z0 and z1axes are parallel the necessary rotation α about the x1axis is zero The same steps can be repeated for transforming between frames 1 and H Notice that since there are two revolute joints the unknowns are θ1 and θ2 The forward kinematic equation of the robot is found by substituting these parameters into the corresponding A matrices as follows A1 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 and A2 C2 S2 0 a2C2 S2 C2 0 a2S2 0 0 1 0 0 0 0 1 0TH A1 A2 C1C2S1S2 C1S2S1C2 0 a2 C1C2S1S2 a1C1 S1C2 C1S2 S1S2 C1C2 0 a2 S1C2 C1S2 a1S1 0 0 1 0 0 0 0 1 Referring to Appendix A we use C1C2S1S2 C θ1 θ2 C12 and S1C2 C1S2 S θ1 θ2 S12 to simplify the transformation matrix to 0T H C12 S12 0 a2C12 a1C1 S12 C12 0 a2S12 a1S1 0 0 1 0 0 0 0 1 256 Table 22 DH parameters table for Example 224 θ d a α 01 θ1 0 a1 0 1H θ2 0 a2 0 Kinematics of Serial Robots Position Analysis 75 The forward kinematic solution allows us to find the location and orientation of the robots end if values for θ1 θ2 a1 and a2 are specified We find the inverse kinematic solution for this robot later Example 225 Assign the necessary frames to the robot in Figure 229 and derive the forward kin ematic equation of the robot Solution As you see this robot is very similar to the robot from Example 224 except that another joint is added to it But notice how this small addition changes a few things in the analysis The same assignments of frames 0 and 1 are applicable to this robot but we need to add another frame for the new joint We add a z2axis perpendicular to the joint as shown Since the z1 and z2axes intersect at joint 2 the x2axis is perpendicular to both at the same location as shown remember z1 points out of the page Table 23 shows the parameters for the robot Follow the four required transformations between every two frames and make sure that you note the following The direction of the Hframe is changed to represent the motions of the gripper The physical length of link 2 is now d3 and not a2 due to the change in the direction of zH Also notice the direction of x2 which is perpendicular to both z1 and z2 Joint 3 is shown as a revolute joint In this case d3 is fixed However the joint could have been a prismatic joint in which case d3 would be a variable but θ3 would be fixed or both in which case both θ3 and d3 would be variables Remember that the rotations are measured with the righthand rule The curled fingers of your right hand rotating in the direction of rotation determine the direction of the axis of rotation along the thumb θ2 θ3 θ1 xU yU zU z0 z1 zH x0 x1 xH a1 d3 z2 x2 Figure 229 The 3DOF robot from Example 225 Table 23 DH parameters table for Example 225 θ d a α 01 θ1 0 a1 0 12 90 θ2 0 0 90 2H θ3 d3 0 0 Introduction to Robotics 76 Notice that the rotation about z1 is shown to be 90 θ2 and not θ2 This is because if we assume that the robots home position where all angles are zero is when it is horizontal there is a 90 angle between x1 and x2 see Figure 230 This is a very important factor in the analysis We need to always consider what the reset position of the robot is because all joint motions are measured from that position Remember that whether or not the robot is shown in its home position it is a machine and it moves You must visualize its motions Another important note is that at times it appears that the angle between two xaxes is zero but we know that one of them moves relative to the other as joint angles change We must take this into account when assigning values in the parameters table Robot joints move although the robot is drawn in one position Noting that sin 90 θ cos θ and cos 90 θ sin θ the matrices representing each joint transformation and the total transformation of the robot are A1 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 A2 S2 0 C2 0 C2 0 S2 0 0 1 0 0 0 0 0 1 A3 C3 S3 0 0 S3 C3 0 0 0 0 1 d3 0 0 0 1 0TH A1A2A3 C1S2S1C2 C3 C1S2S1C2 S3 C1C2S1S2 C1C2S1S2 d3 a1C1 C1C2S1S2 C3 C1C2S1S2 S3 C1S2 S1C2 C1S2 S1C2 d3 a1S1 S3 C3 0 0 0 0 0 1 Simplifying the matrix with C1C2S1S2 C12 and S1C2 C1S2 S12 we get 0T H A1A2A3 S12C3 S12S3 C12 C12d3 a1C1 C12C3 C12S3 S12 S12d3 a1S1 S3 C3 0 0 0 0 0 1 for θ1 0 θ2 0 θ3 0 0TH 0 0 1 d3 a1 1 0 0 0 0 1 0 0 0 0 0 1 and θ3 θ1 θ2 z0 z1 x0 a1 zH x1 d3 xH z2 x2 xU yU zU Figure 230 Robot from Example 224 in reset position Kinematics of Serial Robots Position Analysis 77 for θ1 90 θ2 0 θ3 0 0TH 1 0 0 0 0 0 1 d3 a1 0 1 0 0 0 0 0 1 Verify that these values do in fact represent the robot correctly by comparing the hand frame with the Universe Example 226 For the simple 6DOF robot in Figure 231 assign the necessary coordinate frames based on the DH representation fill out the accompanying parameters table and derive the forward kinematic equation of the robot Assume that all joint offsets cancel each other so that d values are zero Solution As you notice when the number of joints increases in this case to six the analysis of the forward kin ematics becomes more complicated However all principles apply the same as before Also notice that this 6DOF robot is still simplified with no joint offsets or twist angles In this example for simplicity we are assuming that joints 2 3 and 4 are in the same plane which renders their dn values zero oth erwise the presence of offsets makes the equations slightly more involved Generally offsets change the position terms but not orientation terms To assign coordinate frames to the robot we first assign zaxes to the joints followed by xaxes Follow the coordinates as shown in Figures 232 and 233 1 2 3 4 5 6 x y z Figure 231 A simple 6DOF articulate robot x y z 1 2 3 z0 x0 z1 x1 z2 x2 z3 x4 x3 z4 z5 x5 z6 x6 a2 a3 a4 4 5 6 Figure 232 Reference frames for the simple 6DOF articulate robot Introduction to Robotics 78 Figure 233 is a line drawing of the robot in Figure 231 for simplicity Notice where the origin of each frame is and why Start at joint 1 z0 represents motions about the first joint x0 is chosen to be parallel to the xaxis of the reference frame This is done only for convenience x0 is a fixed axis representing the base of the robot and does not move The movement of the first joint occurs around the z0x0 axes Next z1 to z6 are assigned to joints 26 and the end effector x1 is normal to z0 and z1 because these two axes are intersecting x2 is in the direction of the common normal between z1 and z2 x3 is in the direction of the common normal between z2 and z3 Similarly x4 is in the direction of the common normal between z3 and z4 Finally z5 and z6 are as shown because they are parallel and collinear z5 represents the motions about joint 6 while z6 represents the motions of the end effector Although we normally do not include the end effector in the equations of motion it is necessary to include the end effector frame regardless because it allows transforming out of frame z5x5 Also important to notice is the location of the origins of the first and the last frames This determines the total transformation equation of the robot You may assign other or different intermediate coordinate frames between the first and the last but as long as the first and the last frames are not changed the total transformation of the robot will be the same Notice that the origin of the first joint is not at the physical location of the joint Practically whether the actual joint is a little higher or lower will not make any difference in the robots move ments Therefore the origin can be as shown or at the base without regard to the physical location of the joint If at the base the total transformation between the base and the end effector of the robot would have included the height of the robot too whereas the way we have assigned the base frame our measurements are relative to the present 0frame We can simply add the height to our equation later in order to facilitate measuring height from the base Also notice that in reality we may choose the opposite sense for any x or z axis Although the para meters table changes and intermediate A matrices are slightly different the final transformation of the robot will be the same The choice of the sense of these vectors is arbitrary Next we follow the assigned coordinate frames to fill out the parameters of Table 24 Starting with z0x0 is a rotation of θ1 to bring x0 to x1 a translation of zero along z1 and zero along x1 to align the xs x y z z0 z1 x1 z2 x2 z3 x3 z4 x4 z5 x5 x6 a2 a3 a4 x0 z6 Figure 233 Line drawing of the reference frames for the 6DOF articulate robot Table 24 Parameters for the robot from Example 225 θ d a α 01 θ1 0 0 90 12 θ2 0 a2 0 23 θ3 0 a3 0 34 θ4 0 a4 90 45 θ5 0 0 90 56 θ6 0 0 0 Kinematics of Serial Robots Position Analysis 79 together and a rotation of α1 90 to bring z0 to z1 Remember that the rotations are measured with the righthand rule The curled fingers of your right hand rotating in the direction of rotation deter mine the direction of the axis of rotation along the thumb At this point we are at z1x1 Continue with the next joints the same way to fill out the table You must realize that like any other machine robots do not stay in one configuration as shown in a drawing You need to visualize the motions even though the schematic is in 2D For example x3 is always in the direction of a3 along the line between joints 3 and 4 As the lower arm of the robot rotates about joint 3 x3 moves as well but not x2 However x2 will move as the upper arm rotates about joint 2 This must be kept in mind as we determine the parameters θ represents the joint variable for a revolute joint and d represents the joint variable for a prismatic joint Since this is an allrevolute robot all joint variables are angles Since there are no joint offsets all d values are zero The transformations between each two successive joints can be written by simply substituting the parameters from the parameters table into the Amatrix We get A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 S2 0 C2a2 S2 C2 0 S2a2 0 0 1 0 0 0 0 1 A3 C3 S3 0 C3a3 S3 C3 0 S3a3 0 0 1 0 0 0 0 1 A4 C4 0 S4 C4a4 S4 0 C4 S4a4 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 257 Once again to simplify the final solutions we use the following trigonometric functions Sθ1Cθ2 Cθ1Sθ2 S θ1 θ2 S12 Cθ1Cθ2Sθ1Sθ2 C θ1 θ2 C12 258 The total transformation between the base of the robot where the 0frame is and the hand is RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5S6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5S6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 259 Introduction to Robotics 80 Note the following important insights It is acceptable to use additional frames to make things easier to follow However you may not have any fewer or more unknown variables than you have joints It is possible that in a robot model the same zaxis may represent both a rotation and a translation effectively two joints together This results in one A matrix having two unknowns ending up with one fewer A matrix But the results will be the same However in reality there are no practical revoluteprismatic joints in one It is better to still use two separate frames representing one unknown each The DH representation does not use a transformation along the yaxis Therefore if you find that you need to move along the yaxis to transform from one frame to another you either have made a mistake or you need an additional frame in between In reality there may be small angles between parallel zaxes due to manufacturing errors or tol erances To be able to represent these errors between seemingly parallel zaxes it is necessary to make transformations along the yaxis Therefore the DH methodology cannot represent these errors Note that frame xnzn represents link n before itself It is attached to link n and moves with it relative to frame n 1 Motions about joint n are relative to frame n 1 Obviously you may use other representations to develop the kinematic equations of a robot How ever in order to be able to use subsequent derivations that will be used for differential motions dynamic analysis and trajectory planning which are all based on the DH representation you may benefit from following this methodology So far in all of our examples in this section we derived the transformation between the base of the robot and the end effector RTH It is also possible to derive the transformation between the Universe frame and the end effector UTH In that case we need to premultiply RTH by the transformation between the base and the Universe frames or UTH UTR RTH Since the location of the base of the robot is always known this will not add to the number of unknowns or complexity of the problem The transformation UTR usually involves simple translations and rotations about the Universe frame to get to the base frame This process is not based on the DH representation it is a simple set of rotations and translations As you have probably noticed the DH representation can be used for any configuration of joints and links whether or not they follow known coordinates such as Cartesian spherical Euler etc Addi tionally you cannot use those representations if there are any twist angles or joint offsets In reality twist angles and joint offsets are very common The derivation of kinematic equations based on Car tesian cylindrical spherical RPY and Euler was presented only for teaching purposes You should normally use DH for analysis Example 227 The Stanford arm Assign coordinate frames to the Stanford arm Figure 234 and fill out the parameters table The Stanford arm is a spherical coordinate arm where the first two joints are revolute the third is prismatic and the last three wrist joints are all revolute joints The home posi tion of the arm is when it is vertical Solution To allow you to work on this before you see the solution the answer to this problem is included at the end of this chapter It is recommended that before you look at the assignment of the frames and the solution of the arm you try to do this on your own The final forward kinematic solution of the arm 5 is the product of the six matrices representing the transformation between successive joints as follows Kinematics of Serial Robots Position Analysis 81 RTHStanford 0T 6 nx ox ax px ny oy ay py nz oz ay pz 0 0 0 1 where nx C1 C2 C4C5C6S4S6 S2S5C6 S1 S4C5C6 C4S6 ny S1 C2 C4C5C6S4S6 S2S5C6 C1 S4C5C6 C4S6 nz S2 C4C5C6S4S6 C2S5C6 ox C1 C2 C4C5S6 S4C6 S2S5S6 S1 S4C5S6 C4C6 oy S1 C2 C4C5S6 S4C6 S2S5S6 C1 S4C5S6 C4C6 oz S2 C4C5S6 S4C6 C2S5S6 ax C1 C2C4S5 S2C5 S1S4S5 ay S1 C2C4S5 S2C5 C1S4S5 az S2C4S5 C2C5 px C1S2d3S1d2 py S1S2d3 C1d2 pz C2d3 260 1 2 3 4 x y z 5 6 Figure 234 Schematic drawing of the Stanford arm Introduction to Robotics 82 Example 228 Assign required frames to the 4DOF robot in Figure 235 fill out the parameters table and write the equation describing UTH Solution This example shows a robot with twist angles joint offsets and a doubleaction joint represented by the same zaxis We apply the same procedure to assign frames to each joint Table 25 shows the para meters associated with the robot Notice that z1 x0 and x3 are pointed out of the page At reset there is 90 between x0 and x1 note why it is minus and 90 between x2 and x3 The transformation between frames 2 and 3 involves both the unknown angle θ2 and the unknown length l4 The transformation between frames 3 and the hand frame does not have an unknown The transformation from xU to x0 and from zU to z0 requires a Trans 0l2 l1 followed by a Rot x 90 The total transformation for the robot is UTH UTR RTH 1 0 0 0 0 1 0 l2 0 0 1 l1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 A1A2A3AH Example 229 Assign the required frames to the 4DOF robot in Figure 236 fill out the parameters table and write the equation describing UTH l1 l5 l4 l3 l2 xU yU zU z0 z1 x0 z2 x1 x2 zH xH θ2 θ1 θ3 z3 x3 Figure 235 The 4axis robot from Example 228 Table 25 Parameters for the robot from Example 228 θ d a α 01 90 θ1 0 0 90 12 θ2 0 l3 90 23 90 θ3 l4 0 90 3H 90 l5 0 0 Kinematics of Serial Robots Position Analysis 83 Solution This example shows a robot with 45 twist angle and a doubleaction joint represented by the same z axis We apply the same procedure to assign frames to each joint Notice the location of the origin of frame 2 Axes x0 and z1 are pointed out of the page The reset position is as shown Table 26 shows the parameters associated with the robot The transformation from the Uframe to the Hframe with the chosen axes requires RotyU 180 fol lowed by RotzU 180Trans 0 l20 UTH UT R RT H 1 0 0 0 0 1 0 l2 0 0 1 0 0 0 0 1 A1A2A3AH 213 The Inverse Kinematic Solution of Robots As we discussed earlier we are actually interested in the inverse kinematic solutions with which we deter mine the value of each joint variable needed to place the robot at a desired position and orientation We have already seen the inverse kinematic solutions of specific coordinate systems In this section we learn a general procedure for solving the kinematic equations Since each robot may have a different configuration the inverse kinematic equations have to be derived specifically for it The procedure presented here can be used as a guide As you have noticed by now the forward kinematic equations have a multitude of coupled angles such as C234 This makes it impossible to find enough elements in the matrix to solve for individual sines and cosines l1 l5 l4 l3 l2 z0 z1 z2 x2 zH xH x1 yU zU U x0 45 θ3 θ2 θ1 Figure 236 The 4axis robot from Example 229 Table 26 Parameters for the robot from Example 229 θ d a α 01 90 θ1 l1 l3 90 12 90 θ2 0 l4 sin 45 90 2H θ3 l4 cos 45 l5 0 0 Introduction to Robotics 84 to calculate the angles To decouple some of the angles we may multiply the RTH matrix with individual An 1 matrices This yields one side of the equation free of an individual angle allowing us to find elements that yield sines and cosines of the angle and subsequently the angle itself We will demonstrate the procedure in the following section Example 230 Find a symbolic expression for the joint variables of the robot from Example 224 Solution The forward kinematic equation for the robot is shown as Eq 256 repeated here Assume that we desire to place the robot at a position and consequently an orientation given as n o a p vectors 0T H A1 A2 C12 S12 0 a2C12 a1C1 S12 C12 0 a2S12 a1S1 0 0 1 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 Since this robot has only 2 DOF its solution is relatively simple We can solve for the angles either algebraically or by decoupling the unknowns We will do both for comparison Remember that when ever possible we should look for values of both the sine and cosine of an angle in order to correctly identify the quadrant in which the angle falls I Algebraic solution Equating elements 21 11 14 and 24 of the two matrices we get S12 ny and C12 nx θ12 ATAN2 nynx a2C12 a1C1 px or a2nx a1C1 px C1 pxa2nx a1 a2S12 a1S1 py or a2ny a1S1 py S1 pya2ny a1 θ1 ATAN2 S1C1 ATAN2 pya2ny a1 pxa2nx a1 Since θ1 and θ12 are known θ2 can also be calculated II Alternative solution In this case we postmultiply both sides of Eq 256 by A1 2 to decou ple θ1 from θ2 We get A1 A2 A1 2 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 2 or A1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 2 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 C2 S2 0 a2 S2 C2 0 0 0 0 1 0 0 0 0 1 Kinematics of Serial Robots Position Analysis 85 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 C2nxS2ox S2nx C2ox ax pxa2nx C2nyS2oy S2ny C2oy ay pya2ny C2nz S2oz S2nz C2oz az pz a2nz 0 0 0 1 From elements 14 and 24 we get a1C1 pxa2nx and a1S1 pya2ny which is exactly what we got from the other method Knowing S1 and C1 we can find expressions for S2 and C2 2131 General Solution for Articulated Robot Arms In this section we look at a procedure that may generally be used for inverse kinematic analysis of manip ulators 5 The process is applied to the simple manipulator arm from Example 226 Although this solution is for this particular robot with the given configuration it may be adapted for other robots The final trans formation between the robot base frame and the hand frame repeated here is RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5S6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5S6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 We denote this matrix as RHS righthand side for simplicity in writing Lets once again express the desired location and orientation of the robot with RTH nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 261 To solve for the angles we premultiply these two matrices with selected A1 n matrices first with A1 1 A1 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 1 RHS A2A3A4A5A6 262 Introduction to Robotics 86 C1 S1 0 0 0 0 1 0 S1 C1 0 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A2A3A4A5A6 nxC1 nyS1 oxC1 oyS1 axC1 ayS1 pxC1 pyS1 nz oz az pz nxS1nyC1 oxS1oyC1 axS1ayC1 pxS1pyC1 0 0 0 1 C234C5C6S234S6 C234C5S6S234C6 C234S5 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 S5C6 S5S6 C5 0 0 0 0 1 263 From the 34 elements of Eq 263 pxS1pyC1 0 θ1 tan1 py px and θ1 θ1 180 264 From the 14 and 24 elements we get pxC1 pyS1 C234a4 C23a3 C2a2 pz S234a4 S23a3 S2a2 265 We rearrange the two expressions in Eq 265 and square and add to get pxC1 pyS1C234a4 2 C23a3 C2a2 2 pz S234a4 2 S23a3 S2a2 2 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 S2S23 C2C23 Referring to the trigonometric functions from Eq 258 S2S23 C2C23 cos θ2 θ3 θ2 cosθ3 C3 Therefore C3 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 266 In this equation everything is known except for S234 and C234 which we find next Knowing that S3 1C2 3 we write θ3 tan1 S3 C3 267 Kinematics of Serial Robots Position Analysis 87 Since joints 2 3 and 4 are parallel additional premultiplications by A1 2 and A1 3 will not yield useful results The next step is to premultiply by the inverses of A1 through A4 which results in A1 4 A1 3 A1 2 A1 1 nx ox ax px ny oy ay py nz oz ay pz 0 0 0 1 A1 4 A1 3 A1 2 A1 1 RHS A5A6 268 which yields C234 C1nx S1ny S234nz C234 C1ox S1oy S234oz C234 C1ax S1ay S234az C234 C1px S1py S234pz C34a2C4a3a4 C1nyS1nx C1oyS1ox C1ayS1ax 0 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz S234 C1ax S1ay C234az S234 C1px S1py C234pz S34a2 S4a3 0 0 0 1 C5C6 C5S6 S5 0 S5C6 S5S6 C5 0 S6 C6 0 0 0 0 0 1 269 From the 33 elements of the matrices in Eq 269 S234 C1ax S1ay C234az 0 θ234 tan1 az C1ax S1ay and θ234 θ234 180 270 and we can calculate S234 and C234 which are used in Eqs 266 and 267 to calculate θ3 Referring again to Eq 265 repeated here we can calculate the sine and cosine of θ2 as follows pxC1 pyS1 C234a4 C23a3 C2a2 pz S234a4 S23a3 S2a2 Since C12 C1C2 S1S2 and S12 S1C2 C1S2 we get pxC1 pyS1C234a4 C2C3S2S3 a3 C2a2 pz S234a4 S2C3 C2S3 a3 S2a2 271 Treating this as a set of two equations and two unknowns and solving for C2 and S2 we get S2 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 2 S2 3 a2 3 C2 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 C3a3 a2 2 S2 3 a2 3 272 Introduction to Robotics 88 Although this is a large equation all its elements are known and it can be evaluated Then θ2 tan1 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 273 Now that θ2 and θ3 are known θ4 θ234θ2θ3 274 Remember that since there are two solutions for θ234 Eq 270 there will be two solutions for θ4 as well From the 13 and 23 elements of Eq 269 we get S5 C234 C1ax S1ay S234az C5 C1ay S1ax 275 and θ5 tan1C234 C1ax S1ay S234az S1axC1ay 276 Note that there is no decoupled equation for θ6 As a result we have to premultiply Eq 269 by the inverse of A5 to decouple it We get C5 C234 C1nx S1ny S234nz S5 S1nxC1ny C5 C234 C1ox S1oy S234oz S5 S1oxC1oy 0 0 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 0 0 0 0 1 0 0 0 0 1 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 277 From the 21 and 22 elements of Eq 277 we get θ6 tan1 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 278 Therefore we have found six equations that collectively yield the values needed to place and orient the robot at any desired location Although this solution is only good for the given robot a similar approach may be adapted for other robots An important note here is that this solution is only possible because the last three joints of the robot are intersecting at a common point Otherwise it will not be possible to solve for this kind of solution we would have to solve the matrices directly or by calculating the inverse of the matrix and solving for the unknowns All industrial robots have intersecting wrist joints 214 Inverse Kinematic Programming of Robots The inverse kinematic equations are directly used by the robot controller to drive the robot to its destination it does not use the forward kinematic equations This is important for the practical reason that the accuracy of a Kinematics of Serial Robots Position Analysis 89 robot motion is a function of how quickly the controller calculates the joint values The faster it obtains the joint variablesthemoreaccurateisthemotionInrealityevenforfastcomputersdirectlycalculatingtheinverseofthe forward kinematic equations or substituting values into the equations and calculating joint variables by methods such as Gaussian elimination take too long For a robot to move in a predictable path trajectory say a straight line it is necessary to recalculate the joint variables many times a second Imagine that a robot needs to move in a straight line between points A and B Figure 237 If no other action is taken and the robot moves from point A to point B by changing the joint values from the present values at point A to the calculated joint values of point B called pointtopoint motion the path of the end frame is unpredictable as the robot moves all its joints at different rates until they are at the final value To make the robot follow a straight line it is necessary to break the line into many small sections and direct the robot to follow those very small sections sequentially This means that a new solution must be recalculated for each small section typically between 50 to 200 times a second taking no more than 20 to 5 ms 10 Otherwise the robot loses its claimed accuracy or will not follow the specified path The shorter the time is to calculate a new solution the more accurate is the robot As a result it is vital to eliminate as many unnecessary computations as possible to allow the controller to calculate more solutions This is why the designer must do all the mathematical manipulations beforehand and only program the controller to calculate the final solutions This is discussed in more detail in Chapter 7 For the sixaxis robot discussed earlier given the final desired location and orientation as RTHDESIRED nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 all that the controller needs to use to calculate the unknown angles is the set of inverse solutions as summar ized here θ1 tan1 py px and θ1 θ1 180 θ234 tan1 az C1ax S1ay and θ234 θ234 180 Intermediate points A B Figure 237 The path between points A and B is divided into many small sections to force the robot to follow the desired path Introduction to Robotics 90 C3 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 S3 1C2 3 θ3 tan1 S3 C3 θ2 tan1 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 θ4 θ234θ2θ3 θ5 tan1C234 C1ax S1ay S234az S1axC1ay θ6 tan1 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 279 Although this is not trivial it is much quicker to use these equations and calculate the angles than it is to invert the matrices or do Gaussian elimination Notice that all operations in this computation are simple arithmetic or trigonometric operations 215 DualArm Cooperating Robots Cooperating robots are generally defined as robots working with each other either two separate robots or a dualarmed robot as shown in Figure 238 These robots can benefit from technologies used in collaborative robots too When two robots handle a part together the sensors and ideas that make collaborative robots more flexible and safer can benefit cooperative robots by preventing collisions damage to the part or drop ping the part due to uncoordinated motions In some systems one robot acts as a master and the other Figure 238 Cooperative robots may be two robots working together or a twoarmed robot Source Reproduced with permission of Yaskawa Electric Kinematics of Serial Robots Position Analysis 91 follows its motions However the two robots may be controlled independently either by one or by two sep arate controllers Figure 239 shows two robots handling a part We assign a frame to the base of each robot a frame to the endplate of each robot and two frames at two ends of the part where it is grabbed by the robots We can write the loop equation between the part and the two robots as UTR1 R1TH1 H1TP1 P1TP2 UTR2 R2TH2 H2TP2 280 The transformations between the Universe frame and the two robot bases are known since we know where the robots are located The transformations from each hand to the part are also known because we know the length of each end effector The two frames describing the part are also known at least initially Since we also know the dimensions of the part whether rigid or not we should also know about the transformation between the two frames describing the part at all times For example imagine that the part is picked up by the two robots and is to be placed at another location at a different orientation At all times we can cal culate the relative location and orientation of the two corners of the part This leaves us with two unknown transformations R1TH1 and R2TH2 However if we define the trajectory path of one of the robots as it moves from one location and orientation to another we can determine what the second robot must do to keep up with it without dropping or damaging the part Premultiplying Eq 280 with proper inverse transforma tions we can write R2TH2 UTR2 1 UTR1 R1TH1 H1TP1 P1TP2 H2TP2 1 which simplifies to R2TH2 R2TU UTR1 R1TH1 H1TP1 P1TP2 P2TH2 281 Since all matrices on the right hand side are known R2TH2 can be calculated at all times allowing deter mination of its joint values Obviously this requires calculating the configuration of one of the robots based on the path it is to take and then the configuration of the second robot based on that or vice versa 216 Degeneracy and Dexterity 2161 Degeneracy Degeneracy occurs when the robot loses a degree of freedom and therefore cannot perform as desired 11 This occurs under two conditions i when the robots joints reach their physical limits and as a result can not move any further and ii the zaxes of two joints become collinear This means that at this instant U R1 R2 H1 H2 P1 P2 Figure 239 Dualarm robots handling a part Introduction to Robotics 92 whichever joint moves the same motion will result and consequently the controller does not know which joint to move Since in either case the total number of DOF available is less than 6 there is no solution for the robot In the case of collinear joints the determinant of the position matrix is zero as well Figure 240 shows a simple robot in a vertical configuration where joints 1 and 6 are collinear If either joint 1 or joint 6 rotates the end effector will rotate the same amount In practice it is important to direct the controller to take an emergency action otherwise the robot will stop Note that this condition occurs if the two joints produce similar motions Otherwise if one joint is prismatic and one is revolute as in joints 3 and 4 of the Stanford arm although the zaxes are collinear the robot will not be in a degenerate condition Paul 11 has shown that if sin α4 sin α5 or sin θ5 is zero the robot will be degenerate this occurs if joints 4 and 5 or 5 and 6 are parallel and therefore result in similar motions Obviously α4 and α5 can be designed to prevent the degeneracy of the robot However any time θ5 approaches zero or 180 the robot becomes degenerate 2162 Dexterity We should be able to position and orient a 6DOF robot at any desired location within its work envelope by specifying the position and the orientation of the hand However as the robot gets increasingly closer to the limits of its workspace although it is possible to locate it at a desired point it becomes impossible to orient it at desired orientations The volume of points where we can position the robot as desired but not orient it is called the nondexterous volume 217 The Fundamental Problem with the DenavitHartenberg Representation Although the DH representation has been extensively used in modeling and analysis of serial robot motions there is a fundamental flaw with this technique which many researchers have tried to solve by modifying the process 12 The fundamental problem is that since all motions are about the x and zaxes the method cannot represent any motion about the yaxis Therefore if there is any motion about the yaxis the method will fail This occurs in a number of circumstances For example suppose 2 joint axes that are supposed to be parallel are assembled with a slight deviation The small angle between the 2 axes requires a motion about the yaxis Since all real industrial robots have some degree of inaccuracy in their manufacture their inaccuracy cannot be modeled with the DH representation 1 2 3 4 5 6 x y z Figure 240 An example of a robot in a degenerate position Kinematics of Serial Robots Position Analysis 93 We now continue with the solution of the Stanford arm Example 227 continued Reference frames for the Stanford arm Figure 241 is the solution for the Stanford arm in Example 227 Figure 234 It is simplified for improved visibility Table 27 shows the corresponding parameters Note that it is assumed that the reset position is when the robot is pointed up and vertical The following is a summary of the inverse kinematic solution for the Stanford arm 5 13 θ1 tan1 py px tan1 d2 r2 d2 2 where r p2 x p2 y 282 Table 27 The parameters table for the Stanford arm θ d a α 01 θ1 0 0 90 12 θ2 d2 0 90 23 0 d3 0 0 34 θ4 0 0 90 45 θ5 0 0 90 56 θ6 0 0 0 1 4 x y z 5 6 1 4 d2 z0 x0 x1 z1 x2 z2 x3 x4 x5 x6 z4 z3 z5z6 d3 Figure 241 The frames of the Stanford arm Introduction to Robotics 94 θ2 tan1C1px S1py pz 283 d3 S2 C1px S1py C2pz 284 θ4 tan1 S1ax C1ay C2 C1ax S1ay S2az and θ4 θ4 180 if θ5 0 285 θ5 tan1C4 C2 C1ax S1ay S2az S4 S1ax C1ay S2 C1ax S1ay C2az 286 θ6 tan1 S6 C6 where S6 C5 C4 C2 C1ox S1oy S2oz S4 S1ox C1oy S5 S2 C1ox S1oy C2oz C6 S4 C2 C1ox S1oy S2oz C4 S1ox C1oy 287 Example 231 Application of the DH methodology in the design of a fingerspelling hand A fingerspelling hand was designed at Cal Poly San Luis Obispo in order to enable ordinary users to communicate with individuals who are blind and deaf The hand with its 14 DOF can form all the fingerspelling letters and numbers Figure 242 Each fingerwrist combination can be assigned a set of frames based on the DH representation in order to derive the forward and inverse kinematic equa tions of the hand These equations may be used to drive the fingers to position This application shows that in addition to modeling the motions of a robot the DH technique may be used to represent transformations rotations and movements between different kinematic elements regardless of whether a robot is involved You may also find other applications for this representation 218 Design Projects Starting with this chapter and continuing with the rest of the book we apply the current information in each chapter to the design of simple robots Since common 6DOF robots are complicated we consider simpler Figure 242 Cal Poly fingerspelling hand Supported by the SmithKettlewell Eye Research Institute Version 3 designed and built by Kendall Searing Kinematics of Serial Robots Position Analysis 95 robots with fewer DOF The intention is to design a simple robot that can possibly be built by you from readily available parts from hobby shops hardware stores and surplus dealers In this section you may consider the preliminary design of the robot and its configuration keeping in mind the possible types of actuators you may want to consider later Although we study this subject later it is a good idea to consider the types of actuators now You should also consider the types of links and joints you may want to use possible lengths types of joints and material for example wood dowels hollow aluminum or brass tubes available in hardware stores and so on 2181 StairClimbing Robot Figure 243 shows a simple robot that was designed to carry loads up and down stairs 14 15 All actuators in this robot except the wheels are prismatic You may simplify the design by eliminating some DOF although that limits the devices capabilities By sequentially moving the leg actuators up and down and extending and retracting the legs from the chassis the robot can navigate any terrain stairs or slopes while carrying a load On flat surfaces it can move on its wheels at higher speeds You may design your own robot based on your own specifications 2182 A 3DOF Robot For this project you may want to design your own preferred robot with your own preferred configuration Creativity is always encouraged However we will discuss a simple robot as a guideline for you to design and build After the configuration of the robot is finalized you should proceed with the derivation of forward and inverse kinematic equations The final result of this part of the design project is a set of inverse kinematic equations for the simple 3DOF robot that can later be used to drive the robot to desired positions You must realize that the price we pay for this simplicity is that we may specify only the position of the robot not its orientation Figure 243 A stairclimbing robot Designed by Jeremy DePangher supported by Michael Goren Introduction to Robotics 96 One of the important considerations in the design of the robot is its joints Figure 244a shows a simple design that has no joint offset d This would apparently simplify the analysis of the robot since the A matrix related to the joint would be simpler However manufacturing such a joint is not as simple as the design in Figure 244b The latter allows a larger range of motion too On the other hand although we apparently have to deal with a joint offset d with the joint design in Figure 244b you must remember that in most cases there will be a second joint with the same joint offset in the opposite direction which cancels the former in the robots overall equation As a result we assume that the joints of our robot can be built as in Figure 244b without having to worry about joint offset d We will discuss actuators in Chapter 9 However for this design project you should probably consider the use of a servomotor or a stepper motor While you are designing your robot consider what type of actuators you will use and how you will connect the actuators to the links and joints Remember that at this point you are only designing the robot configuration and that you can always change your actuators and the design of your robot When the preliminary sketch of the robot is finished assign coordinate frames to each joint fill out the parameters table for the frames develop the matrices for each transformation and calculate the final UTH Then using the methods learned in this chapter develop the inverse kinematic equations for the robot This means that using these equations if you actually build the robot you will be able to run it and control its position since the robot has 3 DOF you will not be able to control its orientation Figure 245 shows a simple design for a 3DOF robot you may use as a guide for your design In one student design the lengths of links and joint offsets were 8 2 9 2 and 9 inches respectively The links were made of Joint offset d a b Figure 244 Two simple designs for a joint xU yU zU z0 z1 z2 x2 z3 x0 x1 l1 l2 l3 l4 l5 y z x zH x3 xH Figure 245 A simple 3DOF robot design that may be used for the design project Kinematics of Serial Robots Position Analysis 97 hollow aluminum bars actuated by three DC gearmotors with encoder feedback and connected to the joints through worm gears The robot is at reset when pointed up and x0 is parallel to xU Figure 245 also shows one possible set of frames assigned to the joints The end of the robot has its own frame Frame 3 is needed to transform from frame 2 to the hand frame To correctly develop forward and inverse kinematic equations of the robot it is crucial to define the reset position of the robot where all joint angles are zero In this example the reset position is defined as the robot pointing up and x0 parallel to xU At this point there is a 90 angle between x1 and x2 Therefore the actual angle for this joint should be 90 θ2 The same is true for x0 and x1 where a 90 angle exists between the two when θ1 is zero and therefore the angle between the two is 90 θ1 Also notice the permanent angles between other frames This exercise is left for you to complete The following inverse kinematic equations for the robot relative to frame 0 are derived assuming that the 8 in distance between frames 0 and U is subtracted from the actual desired height θ1 tan1 pxpy θ3 cos1 pyC1 2 pz 2162 162 θ2 cos1 pzC1 1 C3 pyS3 18 1 C3 C1 288 Please note If cos θ1 is zero use pxS1 instead of pyC1 2183 A 3DOF Mobile Robot Another project you may consider is a mobile robot These robots are very common and are used in auton omous navigation and developing artificial intelligence for robots In general you may assume the robot is capable of moving in a plane that may be represented by translations along the x and yaxes or a translation and rotation in a polar form r θ Additionally the orientation of the robot may be changed by rotating it about the zaxis α Therefore the kinematic equations of the motion of the robot can be developed and used to control its motions A schematic representation of the robot is shown in Figure 246 See also Chapter 9 for a design project involving a singleaxle robot that may be used for this project too A popular version of such a robot is the vacuum cleaner sold in stores It is simply a 3DOF machine with capability to run around a room and vacuum Most of its ability is in its embedded program that controls the motions of the device otherwise it is a simple x y α mobile robot In the next chapters we continue with the design of your robot r x y z px α θ py Figure 246 Schematic representation of a 3DOF mobile robot Introduction to Robotics 98 219 Summary In this chapter we discussed methods for representation of points vectors frames and transformations by matrices Using matrices we discussed forward and inverse kinematic equations for specific types of robots such as Cartesian cylindrical and spherical robots as well as Euler and RPY orientation angles However the main thrust of this chapter was to learn how to represent the motions of a multiDOF serial robot in space and how to derive the forward and inverse kinematic equations of serial robots using the DH representation technique This method can be used to represent any type of robot configuration regardless of the number and type of joints or joint and link offsets or twists In the next chapters we learn about representation of robots using screwbased mechanics followed by the representation of kinematic equations of parallel robots before we study the differential motions which in effect is the equivalent of velocity analysis of robots References 1 Niku S Scheme for Active Positional Correction of Robot Arms Proceedings of the 5th International Conference on CADCAM Robotics and Factories of Future Springer Verlag pp 590593 1991 2 Puopolo Michael G Saeed B Niku Robot Arm Positional Deflection Control with a Laser Light Proceedings of the Mechatronics 98 Conference Skovde Sweden Adolfsson and Karlsen editors Pergamon Press Sep 98 pp 281286 3 Ardayfio DD Q Danwen Kinematic Simulation of Novel Robotic Mechanisms Having Closed Kinematic Chains Paper 85DET81 American Society of Mechanical Engineers 1985 4 Denavit J RS Hartenberg A Kinematic Notation for LowerPair Mechanisms Based on Matrices ASME Journal of Applied Mechanics June 1955 215221 5 Paul Richard P Robot Manipulators Mathematics Programming and Control MIT Press Cambridge Mass 1981 6 Craig John J Introduction to Robotics Mechanics and Control 4th edition Pearson Education 2017 7 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 8 Tsai LungWen Robot Analysis John Wiley and Sons 1999 9 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 10 Eman Kornel F Trajectories International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons 1988 pp 17961810 11 Paul Richard P CN Stevenson Kinematics of Robot Wrists The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3138 12 Barker Keith Improved RobotJoint Calculations NASA Tech Briefs Sep 1988 p 79 13 Ardayfio DD R Kapur SB Yang WA Watson Micras Microcomputer Interactive Codes for Robot Analysis and Simulation Mechanisms and Machine Theory vol 20 no 4 1985 pp 271284 14 Goren Michael Jeremy E Goren StairClimbing Human Transporter US Patent 7246671 July 24 2007 15 Depanger J Design and Implementation of EightLegged Robotic Transporter California Polytechnic State University San Luis Obispo 2013 Problems The isometric grid Figure 247 is provided to you for use with some of the problems in this chapter It is meant to be used as a tracing grid for drawing 3D shapes and objects such as robots frames and transforma tions You may make copies of the grid for each problem that requires graphical representation or verification of the results The grid is also available commercially Kinematics of Serial Robots Position Analysis 99 21 Write a unit vector in matrix form that describes the direction of the cross product of p 3i5j 4k and q 3i 7k 22 A vector p is 10 units long and is perpendicular to vectors q and r described here Express the vector in matrix form qunit 0 3 qy 0 5 0 runit rx 0 4 0 5 0 23 Vectors p 2i 3j 5k and q 3i 6k are given Find a vector r that is perpendicular to both 24 Will the three vectors p q and r in Problem 22 form a traditional frame If not find the necessary unit vector s to form a frame between p q and s 25 Suppose that instead of a frame a point P3 9 5T in space was translated a distance of d 478 T Find the new location of the point relative to the reference frame 26 The following frame B was moved a distance of d 426 T Find the new location of the frame relative to the reference frame Figure 247 Isometric grid Introduction to Robotics 100 B 0 1 0 2 1 0 0 5 0 0 1 8 0 0 0 1 27 For frame F find the values of the missing elements and complete the matrix representation of the frame F 0 1 4 0 0 5 1 0 7 0 0 0 1 28 Find the values of the missing elements of frame B and complete the matrix representation of the frame B 0 707 0 2 0 1 4 0 707 0 5 0 0 0 1 29 Find the values of the missing elements of frame B and complete the matrix representation of the frame B 0 766 0 643 0 3 0 8 0 1 6 0 0 0 1 210 Derive the matrix that represents a pure rotation about the yaxis of the reference frame 211 Derive the matrix that represents a pure rotation about the zaxis of the reference frame 212 Verify that the rotation matrices about the reference frame axes follow the required constraint equa tions set by the orthogonality and length requirements of directional unit vectors 213 Find the coordinates of point P9 2 8T relative to the reference frame after a rotation of 45 about the xaxis 214 Find the coordinates of point P5 9 3T relative to the reference frame after a rotation of 30 about the zaxis 215 Find the new location of point P1 2 3T relative to the reference frame after a rotation of 30 about the zaxis followed by a rotation of 60 about the yaxis Kinematics of Serial Robots Position Analysis 101 216 A point P in space is defined as BP 534 T relative to frame B which is attached to the origin of the reference frame A and is parallel to it Apply the following transformations to frame B and find AP Using the 3D grid plot the transformations and the result and verify it Also verify graphically that you would not get the same results if you applied the transformations relative to the current frame Rotate 90 about the xaxis then Translate 3 units about the yaxis 6 units about the zaxis and 5 units about the xaxis Then Rotate 90 about the zaxis 217 A point P in space is defined as BP 235 T relative to frame B which is attached to the origin of the reference frame A and is parallel to it Apply the following transformations to frame B and find AP Using the 3D grid plot the transformations and the result and verify it Rotate 90 about the xaxis then Rotate 90 about the local aaxis and then Translate 3 units about the y 6 units about the z and 5 units about the xaxis 218 A frame B is rotated 90 about the zaxis then translated 2 and 4 units relative to the n and oaxes respectively then rotated another 90 about the yaxis and finally rotated 90 about the aaxis Find the new location and orientation of the frame B 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 1 219 The frame B of problem 218 is rotated 90 about the aaxis 90 about the yaxis then translated 3 and 8 units relative to the x and yaxes respectively and then rotated another 90 about the naxis Find the new location and orientation of the frame B 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 1 220 The following frame B is rotated 30 about the oaxis 90 about the yaxis then translated 3 and 8 units relative to the x and yaxes respectively and then rotated another 90 about the xaxis Find the new location and orientation of the frame B 0 1 0 2 1 0 0 7 0 0 1 1 0 0 0 1 221 Show that rotation matrices about the y and zaxes are unitary 222 Calculate the inverse of matrix B Introduction to Robotics 102 B 1 0 2 4 2 6 1 0 2 4 6 8 1 0 0 2 223 Calculate the inverse of matrix C C 0 5 1 0 0 1 2 1 8 0 1 9 6 6 7 2 5 224 Calculate the inverse of the following transformation matrices T1 0 527 0 574 0 628 4 0 369 0 819 0 439 3 0 766 0 0 643 2 0 0 0 1 and T2 0 92 0 0 39 3 0 1 0 4 0 39 0 0 92 1 0 0 0 1 225 Write the correct sequence of movements that must be made in order to restore the original orien tation of the spherical coordinates and make it parallel to the reference frame About what axes are these rotations supposed to be 226 A spherical coordinate system is used to position the hand of a robot In a certain situation the hand orientation of the frame is later restored in order to be parallel to the reference frame and the matrix representing it is described as Tsph 1 0 0 3 1375 0 1 0 2 195 0 0 1 3 214 0 0 0 1 Find the necessary values of r β γ to achieve this location Find the components of the original matrix n o a vectors for the hand before the orientation was restored 227 Suppose that a robot is made of a Cartesian and RPY combination of joints Find the necessary RPY angles to achieve the following T 0 527 0 574 0 628 4 0 369 0 819 0 439 6 0 766 0 0 643 9 0 0 0 1 Kinematics of Serial Robots Position Analysis 103 228 Suppose that a robot is made of a Cartesian and Euler combination of joints Find the necessary Euler angles to achieve the following T 0 527 0 574 0 628 4 0 369 0 819 0 439 6 0 766 0 0 643 9 0 0 0 1 229 Assume that the three Euler angles used with a robot are 304050 respectively Determine what angles should be used to achieve the same result if RPY is used instead 230 Assume that the RPY angles used with a robot are 603045 respectively Determine what angles should be used to achieve the same result if Euler angles are used instead 231 A frame UB was moved along its own oaxis a distance of 6 units then rotated about its naxis an angle of 60 then translated about the zaxis for 3 units followed by a rotation of 60 about the zaxis and finally rotated about the xaxis for 45 Calculate the total transformation performed What angles and movements would we have to make if we were to create the same location and orientation using Cartesian and Euler configurations 232 A frame UF was moved along its own naxis a distance of 5 units then rotated about its oaxis an angle of 60 followed by a rotation of 60 about the zaxis then translated about its aaxis for 3 units and finally rotated 45 about the xaxis Calculate the total transformation performed What angles and movements would we have to make if we were to create the same location and orientation using Cartesian and RPY configurations 233 Frames describing the base of a robot and an object are given relative to the Universe frame Find a transformation RTH of the robot configuration if the hand of the robot is to be placed on the object By inspection show whether this robot can be a 3axis spherical robot and if so find α β r Assuming that the robot is a sixaxis robot with Cartesian and Euler coordinates find px py pz ϕ θ ψ UTobj 1 0 0 2 0 0 1 3 0 1 0 0 0 0 0 1 UTR 0 1 0 2 1 0 0 5 0 0 1 0 0 0 0 1 234 Frames describing the base of a robot and an object are given relative to the Universe frame Find a transformation RTH of the robot configuration if the hand of the robot is to be placed on the object Assuming that the robot is a sixaxis robot with Cartesian and RPY coordinates find px py pz ϕa ϕo ϕn UTobj 0 0 707 0 707 0 0 866 0 3535 0 3535 0 0 5 0 6123 0 6123 0 0 0 0 1 UT R 1 0 0 3 0 1 0 6 0 0 1 1 0 0 0 1 Introduction to Robotics 104 235 A 3DOF robot arm has been designed for applying paint on flat walls as shown Assign coordinate frames as necessary based on the DH representation Fill out the parameters table Find the UTH matrix 236 In the 2DOF robot shown the transformation matrix 0TH is given in symbolic form as well as in numerical form for a specific location The length of each link l1 and l2 is 1 ft Calculate the values of θ1 and θ2 for the given location 0TH C12 S12 0 l2C12 l1C1 S12 C12 0 l2S12 l1S1 0 0 1 0 0 0 0 1 0 2924 0 9563 0 0 6978 0 9563 0 2924 0 0 8172 0 0 1 0 0 0 0 1 xu yu zu l5 R zH xH l6 l4 l3 l2 l1 Figure P235 z x y x0 z1 x1 zH xH z0 θ2 θ1 Figure P236 Kinematics of Serial Robots Position Analysis 105 237 The SCARAtype robot shown is in reset position when both arms are aligned along the xaxis Assign the coordinate frames based on the DH representation Fill out the parameters table Write all the A matrices Write the UTH matrix in terms of the A matrices 238 A special 3DOF spraying robot has been designed as shown The reset position is when the arms are horizontal Assign the coordinate frames based on the DH representation Fill out the parameters table Write all the A matrices Write the UTH matrix in terms of the A matrices xU zU d5 d1 d2 d3 d4 xH zH yU Figure P237 l3 l2 l1 zU yU xU zH xH Figure P238 Introduction to Robotics 106 239 For the given 4DOF robot designed for a specific operation Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated 240 For the given specialty designed 4DOF robot Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated l1 l2 l3 l4 l5 l6 l7 l8 zH xH β xU zU yU l9 Figure P239 l1 l2 l3 l4 l5 l6 l7 xU zU yU zH xH Figure P240 Kinematics of Serial Robots Position Analysis 107 241 For the given 3DOF robot Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated 242 For the given 4DOF robot shown at reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated x y z l1 l2 l3 U l6 l4 l5 xh zh Figure P242 l1 l2 l5 l6 l7 xU zU yU zH xH l3 l4 Figure P241 Introduction to Robotics 108 243 For the given 4DOF robot shown at reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated 244 For the given 5DOF robot shown at its reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated 245 For the given 4DOF robot shown at its reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated l1 l5 l4 l3 l2 l6 zH xH θ1 θ2 θ3 xU yU Figure P243 zH l1 l4 l3 l2 xH θ4 θ3 θ1 θ5 yU zU U 45 l5 Figure P244 Kinematics of Serial Robots Position Analysis 109 246 Derive the inverse kinematic equations for the robot from Problem 240 247 Derive the inverse kinematic equations for the robot from Problem 241 l1 xU yU zU l5 l4 l3 l2 xH zH 30 Figure P245 Introduction to Robotics 110 3 Robot Kinematics with ScrewBased Mechanics 31 Introduction In Chapter 2 we studied the kinematic analysis of robots using the DenavitHartenberg approach This anal ysis can also be accomplished through screwbased mechanics According to Chasles Theorem also referred to as MozziChasles theorem the motions of a rigid body in space regardless of what it looks like can be decomposed into a translation and a rotation about a screw axis As we already saw in Chapter 2 a trans formation can be achieved by a series of rotations about the x y and zaxes and a translation along the same axes A vector in the direction composed of these motions expressed along the unit vector ŝ is the screw axis about and along which these transformations can be accomplished In this chapter we study screwbased mechanics and how it can be used to model a robot and to derive the kinematic equations of motion This technique is an alternative to the DenavitHartenberg DH method and its result are similar but it provides a different approach and insight 32 What Is a Screw A screw of any type including a common screw is really an inclined plane wrapped around a cylinder A point moving along the inclined plane will move up or down depending on the direction it is moving on the plane Since it is wrapped around the cylinder the updown motion is achieved when the point rotates around the axis of the cylinder Therefore for a righthand screw turning in the direction of curled fingers of the righthand will cause a forward motion and vice versa The translation along the axis of the cylinder caused by one rotation is called pitch Figure 31 Pitch Screw axis Figure 31 A screw axis representing rotations and translations 111 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed There are two interesting states that can help us If the pitch goes to zero the rotation about the axis will not cause an advance on the axis In this case this represents a pure rotation about the axis This can represent a revolute joint If the pitch is infinite the advance along the axis caused by one rotation will be infinite therefore representing a pure translation along the axis of the screw This can represent a prismatic joint Additionally imagine that the nut on the screw has an extension attached to it as shown in Figure 31 In that case whether the pitch is zero or infinite the extension can represent a linkage or an offset We will use these in our modeling and development of kinematics equations of motion The total transformation through a screw can be divided into two separate and independent components i a rotation of zero pitch around the axis of the screw plus ii a pure translation along the axis of the screw We first derive the equations representing a rotation followed by a general transformation 33 Rotation about a Screw Axis The following derivation will give us a way to calculate the transformation matrix for a rotation about an arbitrary axis in space through the origin of a fixed frame We will later adapt it to a screw axis that does not necessarily go through the origin Figure 32 shows a fixed frame as well as a frame S that is coincident with the fixed frame and a screw axis denoted by its unit vector ŝ that goes through the origin O P1 and P2 show a point rotating in a plane per pendicular to the screw axis before and after a rotation of an angle θ about the axis We can write OP2 OC CN NP2 31 We will derive each one of these vectors separately before adding them In doing so we try to derive all the vectors in terms of OP1 With that having the values of the rotation angle θ the translation along the screw axis t and the location of P1 is all that is needed to calculate the location of P2 1 OC As shown in Figure 32b vector OC is the same as the projection of OP1 onto screw axis OC Using a dot product and knowing this projection is in the direction of the screw axis ŝ we get OC s OP1 s 32 a b c O C P1 ˆs P2 P1 N C x y z O P1 C P2 θ N ˆs S Figure 32 Rotation about a screw axis through the origin of the reference frame Introduction to Robotics 112 Note The dot product OP1 s is a scalar whose length is the projection of OP1 along ŝ Multiplying it by the unit vector ŝ expresses the vector in that direction 2 CN We know CN CP2 cosθ CP1 cosθ is in the direction of CP1 We also know that CP1 OP1 OC Substituting Eq 32 in this equation we get CP1 OP1 s OP1 s Therefore CN OP1 s OP1 s cosθ 33 3 NP2 From Figure 32c we know NP2 CP2 sinθ CP1 sinθ This can be written as a cross product of CP1 and ŝ the magnitude is CP1 sin θ and its direction is perpendicular to both vectors or NP2 s CP1 sinθ 34 The cross product of ŝ and OP1 is perpendicular to both and in the direction of NP2 and is equal to s OP1 s OC CP1 s OC s CP1 s CP1 35 because s OC 0 Substituting Eq 35 into Eq 34 yields NP2 s CP1 sinθ s OP1 sinθ 36 Now that we have derived the three components in terms of OP1 substituting Eqs 32 33 and 36 into Eq 31 we get OP2 s OP1 s OP1 s OP1 s cosθ s OP1 sinθ or OP2 s OP1 s 1cosθ OP1 cosθ s OP1 sinθ 37 Equation 37 is known as Rodrigues rotation formula It relates the spatial location of a point after rotating about a screw axis Let OP1 P1xP1yP1z T and OP2 P2xP2yP2z T each describing the position of points P1 and P2 in Figure 32 The transformation can be written as P2x P2y P2z P1 T P2 P1x P1y P1z 38 To see what this transformation is we expand each term of Eq 37 as follows OP1 s P1xP1yP1z T sxsysz T P1xsx P1ysy P1zsz s OP1 s 1cosθ sx sy sz P1xsx P1ysy P1zsz 1cosθ P1xs2 x P1ysxsy P1zsxsz P1xsxsy P1ys2 y P1zsysz P1xsxsz P1ysysz P1zs2 z 1cosθ Robot Kinematics with ScrewBased Mechanics 113 and OP1 cosθ P1x P1y P1z cosθ and s OP1 sinθ sx sy sz P1x P1y P1z sinθ syP1z szP1y sxP1z szP1x sxP1ysyP1x sinθ Combining these equations and forming them into a matrix results in P2x P2y P2z s2 x 1cosθ cosθ sxsy 1cosθ sz sinθ sxsz 1cosθ sy sinθ sysx 1cosθ sz sinθ s2 y 1cosθ cosθ sysz 1cosθ sx sinθ szsx 1cosθ sy sinθ szsy 1cosθ sx sinθ s2 z 1cosθ cosθ P1x P1y P1z Therefore the transformation matrix is P1 T P2 s2 x 1Cθ Cθ sxsy 1Cθ szSθ sxsz 1Cθ sySθ sysx 1Cθ szSθ s2 y 1Cθ Cθ sysz 1Cθ sxSθ szsx 1Cθ sySθ szsy 1Cθ sxSθ s2 z 1Cθ Cθ 39 Note that this matrix only requires the screw axis ŝ and angle of rotation θ Also note that this is a 3 3 matrix only representing the rotation Obviously we can simply add scale factors to the vectors and a trans lation vector to the matrix to make it a 4 4 homogeneous matrix Example 31 Assume that the screw axis in Figure 33 is at 60 from the yaxis in the yz plane described as s 00 50 866 T Point P is attached to the axis with coordinates P 011 T Point P is rotated θ 90 about the screw axis Find the new coordinates of the point Solution Using Eqs 38 and 39 and substituting the values of the screw axis directional cosines and the angle of rotation we can calculate the new location of the point at x y z O a b P1 θ P2 ˆs n S o a n o a l P1 m l 60 Figure 33 Rotation about a screw axis through the origin of the reference frame from Example 31 Introduction to Robotics 114 P2x P2y P2z P1 T P2 P1x P1y P1z 0 0 866 0 5 0 866 0 25 0 433 0 5 0 433 0 75 0 1 1 0 366 0 683 1 183 For comparison we can calculate the new location P2 using rotation and translation transformation matrices The values of l and m in Figure 33b can be found by Py l cos60 m sin60 1 Pz l sin60m cos60 1 or l 1 366 m 0 366 Note that the transformations involved in getting to P2 include a rotation of 60 about the xaxis a translation along the current oaxis of 1366 a rotation of 90 about the current oaxis and the location of point P along the aaxis of 0 366 We get P2 Rot x60 trans 01 3660 Rot o90 P1 or P2x P2y P2z 1 1 0 0 0 0 0 5 0 866 0 0 0 866 0 5 0 0 0 0 1 1 0 0 0 0 1 0 1 366 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 366 1 0 366 0 683 1 183 1 which is exactly what we found using the screw transformation equation Next we will examine the case where the screw axis does not go through the origin of the fixed frame and may include a translation This will allow us to relate to transformations about successive screw axes 34 Homogenous Transformations about a General Screw Axis Figure 34 shows a screw axis ŝ with its origin at point S that is not coincident with the origin of the fixed frame Points P1 and P3 indicate the initial and final locations of a point that has moved on the screw axis As indicated before based on Chasles theorem this transformation can be resolved into a pure rotation of an angle θ about the screw axis from P1 to P2 plus a pure translation of t along the screw axis to P3 θ and t are the screw parameters and are all we need to define the transformation From Figure 34 and noting that P2P3 ts we write OP1 OS SP1 SP1 OP1OS 310 and OP3 OS SP2 ts 311 Note that OP1 and OP2 in Figure 33 are equivalent to SP1 and SP2 in Figure 34 Replacing OP1 and OP2 with SP1 and SP2 in Eq 37 and substituting it and Eq 310 into Eq 311 we get OP3 OS ts s OP1 OS s 1Cθ OP1 OS Cθ s OP1 OS Sθ 312 Robot Kinematics with ScrewBased Mechanics 115 We can relate points OP1 P1xP1yP1z T and OP3 P3xP3yP3z T through a transformation matrix as before and write P3x P3y P3z P1 T P3 P1x P1y P1z 313 Note that since we added a translation we extend the transformation matrix to a homogenous 4 4 matrix Using a process similar to that in Section 33 to manipulate the vectors and gather similar elements in a 4 4 matrix we get P1 T P3 s2 x 1Cθ Cθ sxsy 1Cθ szSθ sxsz 1Cθ sySθ T14 sysx 1Cθ szSθ s2 y 1Cθ Cθ sysz 1Cθ sxSθ T24 szsx 1Cθ sySθ szsy 1Cθ sxSθ s2 z 1Cθ Cθ T34 0 0 0 1 314 where T14 tsxOSx T111 OSyT12OSzT13 T24 tsyOSxT21OSy T221 OSzT23 T34 tsz OSxT31OSyT32OSz T331 315 Note how the orientation of P3 is calculated through Eq 314 which is only affected by the direction of the screw axis ŝ and the angle of rotation θ and that the position is found by Eq 315 which is affected by the location of the origin of the screw axis the direction of the screw axis the angle of rotation θ the translation along the screw axis and of course the location of P1 The values of the last column of the transformation as given by Eq 315 require the values of T11 through T33 which are already calculated x y z O S n o a Rs P1 C P2 N ˆs ˆs P3 t r1 r3 r2 θ Figure 34 Homogeneous transformation about a general screw axis Introduction to Robotics 116 Example 32 Extending Example 31 lets assume that point S is on the screw axis and is described as OS 010 5 T while SP1 011 T remains the same as shown in Figure 35 and we add a translation of 03 units along the screw axis Find the location of P3 Solution To find the location of P3 we use Eqs 313315 as follows OP1 P1x P1y P1z OS SP1 0 1 0 5 0 1 1 0 2 1 5 P1 T P3 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 P3x P3y P3z 1 P1 T P3 P1x P1y P1z 1 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 0 2 1 5 1 0 366 1 833 1 9428 1 For comparison we can say that point P3 can be reached by the following transformations P3 Trans 010 5 Rot n60 Trans 01 3660 Rot o90 Trans 00 0 366 2P3 P3x P3y P3z 1 0 0 1 0 366 0 866 0 5 0 1 683 0 5 0 866 0 1 683 0 0 0 1 0 0 0 3 1 0 366 1 833 1 9428 1 x y z O a b P1 P2 P3 θ ˆs n S o a n o a l P1 m l S O Figure 35 The screw axis from Example 32 Robot Kinematics with ScrewBased Mechanics 117 which once again is the same as earlier Notice that the orientations do not appear to be the same because we have not included the orientation of a frame we might attach to point P1 Doing so we would get P3 P1 T P3 P1 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 1 0 0 0 0 0 5 0 866 2 0 0 866 0 5 1 5 0 0 0 1 0 0 1 0 366 0 866 0 5 0 1 833 0 5 0 866 0 1 9428 0 0 0 1 Example 33 Now lets assume that the setup from Example 32 is moved along the xaxis a distance of 02 units as shown in Figure 36 such that OS 0 210 5 T and OP1 0 221 5 T Find the location of P3 Solution Calculating the new values of T14 through T34 we get P3x P3y P3z 1 P1 T P3 P1x P1y P1z 1 0 0 866 0 5 0 816 0 866 0 25 0 433 0 5103 0 5 0 433 0 75 0 0518 0 0 0 1 0 2 2 1 5 1 0 166 1 833 1 9428 1 which shows the same result except that P3x has moved 02 units forward as expected θ x y z O P1 P2 P3 ˆs n o a l 1 02 05 Figure 36 The screw axis from Example 33 Introduction to Robotics 118 These examples show the similarities between these two techniques as well as their differences Note that in the case of screw mechanics only a small number of parameters are needed to calculate the new locations of a point regardless of whether the screw axis goes through the origin or where it is located As we will see in the next section we can extend this relationship between different screw axes each of which will represent a joint of a robot 35 Successive ScrewBased Transformations Equations 314 and 315 represent the transformations of a point on a screw axis relative to a frame Now imagine that we attach another screw axis to the present one A similar transformation matrix can represent the transformations of the second screw axis Therefore by assigning screw axes to each joint of a robot we can represent a transformation between the base and the end of the robot Figure 37 shows two screw axes ŝ1 which is fixed and ŝ2 which is moving connected together by the first link Similar to the DH representation the fixed screw axis represents the first fixed in place joint while the rest of the mechanism moves relative to it The total transformation is the combination of rotations and translations about these two or more axes independent of their order Note how each screw axis is defined by its own unit vector ŝn relative to the fixed reference frame and by a point Sn that is also defined relative to the reference frame Unlike the DH representation the screw axes are all defined relative to the reference frame not the previous frame Similarly subsequent screw axes can be attached to the second moving link and so on as shown in Figure 38 Similar to Chapter 2 denoting each transformation by a matrix An n1Tn the total transforma tion can be written as 0An A1A2 An 316 where each transformation is calculated with its own parameters Note that the orientation and location of the endplate are defined by a frame Unlike the DH method this representation uses only two frames the reference frame and the end frame Therefore x y z First link Second link θ1 θ2 S1 S2 t1 t2 ˆs2 ˆs1 Figure 37 Successive screw transformations Robot Kinematics with ScrewBased Mechanics 119 all motions are relative to the values at the reset position This means that unlike the DH represen tation where the desired joint values are subtracted from the previous joint values to calculate how much each joint must move in a screw representation all joint values are measured relative to the fixed reference frame In this representation a revolute joint is defined by its angle of rotation θi and zero pitch while a prismatic joint is defined by its pitch value ti and zero θ 36 Forward and Inverse Position Analysis of an Articulated Robot Figure 39 shows a 6axis articulated arm in its defined reset reference position All subsequent move ments about all joints will be measured relative to this position Joints are defined by screw axes ŝ1ŝ6 while the wrist is defined by the noa frame Note that we have only two frames defined the reference frame and the wrist frame Screw axes are not frames Note how all screw parameters are measured with respect to the reference frame Table 31 shows the parameters of each screw axis We use these values to calculate the transformation matrices for each screw a2 aw nw a3 xU zU ˆs3 ˆs1 ˆs5 ˆs4 ˆs2 ˆs6 a4 Figure 39 An articulated robot arm in its reset position represented by screw axes x y z S1 S2 ˆs2 ˆs1 Fixed base ˆs3 ˆs4 S3 S4 Figure 38 Successive screw axes can be used to represent a robot Introduction to Robotics 120 Notice how because the screw axis ŝ6 goes through the origin of the base frame its coordinates are 000 The orientation of the wrist frame w at reset can be represented by nw 001 T ow 0 10 T aw 100 T and its position by Pw a2 a3 a4 00 T We represent the desired target wrist position as before with Tdesired nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 Substituting the screw parameters into Eqs 314316 yields the forward kinematics equation of the robot A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 C2 0 S2 0 0 1 0 0 S2 0 C2 0 0 0 0 1 A3 C3 0 S3 a2 1C3 0 1 0 0 S3 0 C3 a2S3 0 0 0 1 A4 C4 0 S4 a2 a3 1C4 0 1 0 0 S4 0 C4 a2 a3 S4 0 0 0 1 A5 C5 S5 0 a2 a3 a4 1C5 S5 C5 0 a2 a3 a4 S5 0 0 1 0 0 0 0 1 A6 1 0 0 0 0 C6 S6 0 0 S6 C6 0 0 0 0 1 Note that these Amatrices are not similar to DH matrices because they represent transformations relative to the base reference frame and not a previous frame Multiplying A1A6 yields the total transformation between the wrist frame and the reference frame Next we analyze the position of the wrist followed by its orientation Notice that the position of the wrist not its orientation is not affected by the rotations about ŝ5 and ŝ6 and therefore we do not include A5 and A6 Table 31 Parameters table for the articulated arm in Figure 39 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 010 θ2 0 000 3 010 θ3 0 a2 0 0 4 010 θ4 0 a2 a300 5 001 θ5 0 a2 a3 a400 6 100 θ6 0 000 Robot Kinematics with ScrewBased Mechanics 121 in the transformation between the reference frame and the wrist frame although an endeffector length can be added to the position equation if desired The inverse kinematics analysis for the position of the wrist requires multiplication of only A1 through A4 followed by the position vector of the wrist joint The orientation of the wrist is affected by the rotations of the last two joints as well We have Pdesired A1A2A3A4Pw 317 As we did with the DH inverse kinematics analysis we premultiply both sides of this equation with A1 1 to decouple θ1 from the rest A1 1Pdesired A2A3A4Pw C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 Px Py Pz 1 C234 0 S234 a2C2 a3C23 a2 a3 C234 0 1 0 0 S234 0 C234 a2S2 a3S23 a2 a3 S234 0 0 0 1 a2 a3 a4 0 0 1 Therefore C1Px S1Py S1Px C1Py Pz 1 a2C2 a3C23 a4C234 0 a2S2 a3S23 a4S234 1 318 From the 21 elements we have S1Px C1Py 0 or θ1 tan1 Py Px and θ1 θ1 180 319 Equation 319 yields two answers for θ1 which may need to be checked Next by rearranging squaring and adding elements 11 and 31 of Eq 318 and remembering that S2S23 C2C23 cos θ2 θ3 θ2 C3 we get C1Px S1Pya4C234 2 Pz a4S234 2 a2C2 a3C23 2 a2S2 a3S23 2 a2 2 a3 2 2a2a3C3 Therefore θ3 cos1 C1Px S1Pya4C234 2 Pz a4S234 2a22a32 2a2a3 320 which results in two solutions θ3 and θ3 Solving the same elements 11 and 31 from Eq 318 simulta neously results in a solution for θ2 with respect to θ3 and θ234 which we will find shortly We get C1Px S1Pya4C234 a2C2 a3 C2C3S2S3 Pz a4S234 a2S2 a3 S2C3 C2S3 Solving these equations for S2 and C2 we get S2 Pz a4S234 a2 a3C3 C1Px S1Pya4C234 a3S3 a2 a3C3 2 a3S3 2 321 Introduction to Robotics 122 and C2 Pz a4S234 a3S3 C1Px S1Pya4C234 a2 a3C3 a2 a3C3 2 a3S3 2 322 Consequently θ2 ATAN2 S2C2 323 To simplify our derivations since the aaxis of the wrist is in the same orientation as ŝ6 we do not need to involve A6 among our transformations to calculate θ5 Consequently for the aaxes of the reference frame and the wrist frame we can write A1 1 ax ay az 0 desired A2A3A4A5 ax ay az 0 wrist C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 ax ay az 0 desired C234C5 C234S5 S234 S5 C5 0 S234C5 S234S5 C234 0 0 0 1 1 0 0 0 324 Note that the position vector of the transformation matrix is not of concern at this point because we do not need it in our analysis we are only concerned with the aaxis From Eq 324 we get C1ax S1ay C234C5 325 S1ax C1ay S5 326 az S234C5 327 Therefore θ5 sin1 S1ax C1ay and θ5 180θ5 328 Using Eqs 325 and 327 we can calculate θ234 as θ234 ATAN2 az C5 C1ax S1ay C5 329 To calculate θ6 we consider only the naxis of the wrist which is affected by the rotation of the last joint Once again to simplify the derivation we will only consider the orientation part of the matrices not the position vector We get A1 1 A1 2 A1 3 A1 4 nx ny nz 0 desired A5A6 nx ny nz 0 wrist A5A6 0 0 1 0 330 Robot Kinematics with ScrewBased Mechanics 123 Expanding Eq 330 we get nxC1C234 nyS1C234 nzS234 S5S6 331 nxS1 nyC1 C5S6 332 nxC1S234nyS1S234 nzC234 C6 333 Multiplying both sides of Eq 331 by S5 and Eq 332 by C5 and adding we get S6 S5 nxC1C234 nyS1C234 nzS234 C5 nxS1 nyC1 334 From Eqs 334 and 333 we find θ6 ATAN2 S6C6 Therefore all joint parameters can be calculated Example 34 Forward and inverse position analysis of the Stanford arm Figure 310 shows the Stanford arm at its assumed reset position and the screw axes and wrist frame attached to it Remem ber that Stanford arm is a spherical robot its third joint is prismatic Find the forward and inverse kinematics equations of the robot Solution Table 32 shows the screw parameters for the Stanford arm Notice that at reset the prismatic joint has a nominal value of d3 its stroke is represented by an additional pitch value of t a o z ˆs6 ˆs5 ˆs4 ˆs2 ˆs1 x n ˆs3 l2 d3 t Figure 310 The Stanford arm from Example 34 Table 32 Parameters table for the Stanford arm from Example 34 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 100 θ2 0 000 3 010 0 t l2 0 0 4 010 θ4 0 l2 0 0 5 001 θ5 0 l2 d3 0 6 010 θ6 0 l2 0 0 Introduction to Robotics 124 The wrist frame w at reset can be represented by nw 100 T ow 00 1 T aw 010 T and Pw l2d30 T We represent the desired target wrist position as before with Tdesired nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 The matrices representing the transformation are A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 1 0 0 0 0 C2 S2 0 0 S2 C2 0 0 0 0 1 A3 1 0 0 0 0 1 0 t 0 0 1 0 0 0 0 1 A4 C4 0 S4 l2 1C4 0 1 0 0 S4 0 C4 l2S4 0 0 0 1 A5 C5 S5 0 l2 1C5 d3S5 S5 C5 0 l2S5 d3 1C5 0 0 1 0 0 0 0 1 A6 C6 0 S6 l2 1C6 0 1 0 0 S6 0 C6 l2S6 0 0 0 1 To solve for the first three joint variables θ1 θ2 and t we multiply the transformations of the first three joints and the wrist and set the result equal to the desired position Pdesired A1A2A3Pw 335 Px Py Pz 1 C1 S1C2 S1S2 tS1C2 S1 C1C2 C1S2 tC1C2 0 S2 C2 tS2 0 0 0 1 l2 d3 0 1 C1l2S1C2 d3 t S1l2 C1C2 d3 t S2 d3 t 1 336 Squaring adding and simplifying the two sides of Eq 336 will yield d3 t P2 x P2 y P2 z l2 2 337 Note that d3 is the fixed length of the arm at reset which is a known quantity This equation gives two answers for the pitch value Since we now know the value of t we can calculate θ2 from θ2 sin1 Pz d3 t 338 Substituting d3 t and θ2 into Px and Py and solving for sin θ1 and cos θ1 we get S1 Pyl2PxC2 d3 t l2 2 C2 2 d3 t 2 and S1 Pxl2 PyC2 d3 t l2 2 C2 2 d3 t 2 θ1 ATAN2 S1C1 339 Robot Kinematics with ScrewBased Mechanics 125 With an approach similar to that in Section 36 the remaining three screw variables can be found The total transformation for the robot can be found by multiplying A1A2A3 and A4A5A6 where A4A5A6 C4C5C6S4S6 C4S5 C4C5S6 S4C6 l2S4S6 l2l2C4C5C6 d3C4S5 S5C6 C5 S5S6 l2S5C6 d3 1C5 S4C5C6C4S6 S4S5 S4C5S6 C4C6 l2S4C5C6 l2C4S6d3S4S5 0 0 0 1 Example 35 Figure 311 shows a 4axis robot at its reset position Derive the transformation matrix between the wrist and the reference frame Solution We assign screw axes to the joints and fill out the table of parameters as before and write the trans formation matrices and multiply to get the total transformation matrix Notice that ŝ3 represents both the revolute and prismatic joints For this robot at reset Pw l1 l3l20 T nw 0 10 T ow 00 1 T aw 100 T We find A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 C2 0 S2 l1 C21 0 1 0 0 S2 0 C2 l1S2 0 0 0 1 A3 1 0 0 t 0 C3 S3 l2 C31 0 S3 C3 l2S3 0 0 0 1 z s1 x t l1 l2 l3 nw aw ˆs3 ˆ ˆs2 y θ3 θ2 θ1 Figure 311 The robot from Example 35 Table 33 Parameters table for the robot from Example 35 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 010 θ2 0 l1 0 0 3 100 θ3 t 0 l2 0 Introduction to Robotics 126 The transformation matrix is A1A2A3 C1C2 S1C3C1S2S3 S1S3C1S2C3 C1C2t l2S1 C31 l2C1S2S3l1C1 C21 S1C2 C1C3S1S2S3 C1S3S1S2C3 S1C2tl2C1 C31 l2S1S2S3l1S1 C21 S2 C2S3 C2C3 S2tl2C2S3l1S2 0 0 0 1 340 The location and orientation of the wrist frame can be found by nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1A2A3 0 0 1 l1 l3 1 0 0 l2 0 1 0 0 0 0 0 1 For example at θ1 θ2 θ3 0 we get nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 0 1 l1 l3 t 1 0 0 l2 0 1 0 0 0 0 0 1 For θ1 90 and θ2 θ3 0 we get nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 1 0 0 l2 0 0 1 l1 l3 t 0 1 0 0 0 0 0 1 37 Design Projects You may select any of the robot projects mentioned in Chapter 2 and instead apply the screwbased mechan ics to it Notice that one important difference is the way each joint motion is controlled relative to the ref erence frame not the previous frame Otherwise the same issues will be addressed as we continue with the next chapters 38 Summary Although there are differences between the DH method and the screwbased method they are also very similar in many respects Knowing both techniques provides for better understanding of the kinematic anal ysis of robots The advantage of the DH method is its extensive development and application when it comes to differential motion analysis velocities and dynamic analysis as we see later It is also a straightforward easytoapply method that can be applied to any robot without confusion The screwbased method provides for direct control of each actuator of the robot with respect to the reset values instead of joint parameters Robot Kinematics with ScrewBased Mechanics 127 relative to the previous joint values as in DH method In certain problems the development and calculation of the inverse kinematic equations with the screwbased method are actually easier than with DH too In the next chapter we will study the kinematics of parallel robots Additional Reading 1 Craig John J Introduction to Robotics Mechanics and Control 4th edition Pearson Education 2017 2 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 3 Tsai LungWen Robot Analysis John Wiley and Sons 1999 4 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 5 Rocha CR CP Tonetto A Dias A Comparison between the DenavitHartenberg and the ScrewBased Methods Used in Kinematic Modeling of Robot Manipulators Robotics and ComputerIntegrated Manufacturing 27 pp723728 2011 Problems For the following problems you may use a copy of the following table as appropriate Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSx OSy OSz 1 2 3 31 Derive the transformation matrix and the new location of point P after a rotation of θ 90 as shown in Figure P31 32 Using the screwbased method derive the transformation matrix and the new location of point P after a rotation of i θ 45 ii θ 90 as shown in Figure P32 θ x y z l1 o l2 P ˆs Figure P31 Introduction to Robotics 128 33 Verify the results of Problem 32 using rotation and translation transformations for both i θ 45 ii θ 90 as shown in Figure 32 34 Figure P34 shows a screw axis and point P attached to it Find the new location of the point after the screw axis is rotated θ 90 35 Repeat Problem 34 but also find the new orientation of a frame attached to point P as shown in Figure P35 36 Repeat Problem 34 but assume that point P also moves up with a pitch of t 1 unit 37 Derive the transformation matrix for the screw axis in Figure P37 Verify your solution for θ 0t 0 Calculate the new location of point P for θ 90 and θ 135 θ x y z l1 o l2 P ˆs x z P l1 l2 b a 45 45 Figure P32 z 3 2 5 30 1 y z o P b x y o P ˆs 1 5 3 2 1 S a Figure P34 b a z 3 2 5 30 1 y z o P1 x y o P ˆs 1 5 3 2 1 S n o a n o Figure P35 Robot Kinematics with ScrewBased Mechanics 129 38 For the SCARA robot in Figure P38 derive the transformation matrix and the position of point P 39 For the robot in Figure P39 derive the transformation matrix and the matrix representing the orien tation and position of the wrist as the robot moves x y z l1 l2 o S t P l3 ˆs θ Figure P37 l2 z P t l3 l1 x ˆs1 ˆs2 ˆs3 θ2 θ1 l2 Figure P38 aw nw 1 x z ˆs3 ˆs1 ˆs2 l3t3 l2 l1 θ2 θ1 Figure P39 Introduction to Robotics 130 310 For the robot in Figure P310 derive the transformation matrix and the matrix representing the ori entation and position of a frame at point P as the robot moves 311 For the robot in Figure P311 derive the transformation matrix and the matrix representing the ori entation and position of a frame at the wrist as the robot moves 312 For the 3DOF robot in Figure P312 a Derive the transformation matrix relative to the 0frame The length of each arm is 9 inches b Find the equations that describe the position of point P relative to the 0frame c Find the inverse kinematics equations for θ1 θ2 θ3 aw nw z s1ˆ y P l3t3 l2t2 l4 x ˆs2 ˆs3 ˆs4 θ2 θ1 Figure P310 nw z s1ˆ l2t2 y l3 x ow θ1 θ3 ˆs2 ˆs3 Figure P311 ow aw P yU ˆs3 into the page ˆs2 into the page zU 8 z0 y0 9 9 ˆs1 Figure P312 Robot Kinematics with ScrewBased Mechanics 131 4 Kinematics Analysis of Parallel Robots 41 Introduction As discussed in Chapter 2 serial manipulators are open loop this means that if there is a deflection in a link or joint the end of the robot will move without any feedback to the base of the robot Although the loop can be closed through other means the solution is usually very expensive and time intensive Therefore manufac turers of robot manipulators severely overdesign the links and joints to eliminate deflections Additionally since in most cases the joint actuators are attached to the moving links the controller has to deal with large inertia loads Parallel robots are closed loop Not only is there feedback to the base but the structure also reduces deflec tions Therefore there is no need to overdesign manipulator components This results in much lighter mov ing parts with much less inertia lower power requirements faster speeds and better load capacity The motions of the robot require simultaneous actuation of all the limbs Additionally in most cases the actua tors are attached to the base of the robot further reducing inertia loads Similar to serial manipulator robots parallel robots may be planar or spatial and are multidegreeof freedom mechanisms Typically a parallel robot consists of a fixed platform a moving platform and multiple sets of links and joints forming kinematic loops that connect the two Generally the number of sets of links and joints dictates the number of degrees of freedom DOF Each set is actuated by an actuator that is usually mounted near the fixed platform This way the weight of the actuator is borne by the fixed platform and due to reduced inertial loads parallel robots can be much faster than serial robots However parallel manipulators have much smaller work envelopes and are less dexterous This can be a significant parameter in choosing what type of system is used On the other hand in general the forward kinematic solutions for parallel robots are much more involved than their inverse kinematic solutions Since we are generally more interested in the inverse kinematic solutions anyway this is beneficial Parallel mechanisms have been around since the 1800s The Internet is full of pictures and examples of paralleltype mechanisms including hexapods In 1949 VE Gough designed and built a parallel mechanism to test tires at Dunlop The device changed the load and the direction of application of the load on the tire to mimic load conditions to test the life of the tire In 1965 Stewart designed a 6DOF device that could be used as a flight simulator It could translate and rotate about the xyz axes and create a feeling of 3D motion search the internet for pictures of the flight simulator In 1967 Klaus Cappel applied for and received a patent for a Motion Simulator that is what we now refer to as a parallel mechanism Today many 3D parallel mechanisms are referred to as Stewart platforms or StewartGough platforms Parallel mechanisms include parallel robots but also 3D positioning systems 3D spherical joints used for wrists and hip joints 3D grinding machines 3D rapid prototyping machines and many more Figure 41 is an Omron Hornet 565 industrial parallel robot 133 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed There are many possible designs for parallel manipulators with different numbers of DOF The links and joints may be prismatic or fixed length revolute spherical and a variety of universal and planar joints that move in the fixed platform to increase the workspace 1 2 3 4 5 6 Spherical joints in par allel robots are passive joints and are used to facilitate 3D motions but they are not actively actuated or controlled Prismatic joints are slower and actuator placement may be an issue Therefore designs with rigid limbs and actuated revolute joints are preferred for industrial robots 42 Physical Characteristics of Parallel Robots Compared to serial robots parallel manipulators can be more complicated systems with a larger variety of possible configurations To better understand the issues involved we first study the following concepts about mechanisms Figure 42 shows two kinematic chains and three kinematic loops A chain consists of a number of links and joints eg a link with two spherical joints or two links attached with a revolute joint A kinematic chain Figure 41 An OmronAdept Hornet565 parallel robot Source Image provided by Omron Automation 2018 Omron All Rights Reserved A B O1 O2 C O3 a b c d e Spherical joint Spherical joint A B O1 O2 Figure 42 Kinematic chains and loops Introduction to Robotics 134 whose links are connected to each other by two paths forms a closedloop chain eg in Figure 42c O1 A B O1 O2 B Otherwise it is an openloop chain Figure 42d shows two closed loops attached together The loops in Figure 42ce are mechanisms since they are attached to the ground The mechanisms in Figure 42c d are 1DOF mechanisms they only require one input to completely describe the position of all the elements of the chain The openloop mechanism in Figure 42e has 3 DOF all three links can be moved independently The number and nature of the joints determine the DOF of a mechanism Figure 43 shows a mechanism consisting a link and two spherical joints at the ends both connected to the ground Note that the link rotates about its own axis without affecting anything This passive degree of freedom does not affect the system and should not be counted toward the total DOF of a system The same loss of degree of freedom happens in singular situations when two joints provide the same redundant motions Equation 41 referred to as the GruberKutzbach Equation allows us to calculate the number of DOF of a mechanism In this equation λ 3 for planar or spherical mechanisms and λ 6 for spatial mechanisms l is the number of links in the system including the ground j is the number of joints fi is the summation of the number of DOF of all the joints and fpassive is the total number of passive DOFs F λ lj1 fifpassive 41 where i is the number of DOF of a joint Figure 44 shows a number of different mechanisms Table 41 shows the resulting DOF for each case Note the following 1 In Figure 44d note that a spherical joint has 3 DOF Therefore f3 1 3 3 2 In Figure 44e one spherical joint is attached to the ground and the second is free to move There fore there is 1 passive DOF because both axial rotations of the spherical joints are collinear Oth erwise we will get 7 DOF for the system For this mechanism we have fi f1 f3 1 1 2 3 7 3 In Figure 44f including the ground there are only two links because the lower cylinder of the pris matic actuator is attached to the ground and part of it whereas in Figure 44g the lower cylinder rotates about the joint and therefore there are three links 4 In Figure 44i joint B counts as two joints Imagine that instead of links BC AB and O2B being attached together at B link BC was attached to a point somewhere between O2 and B while O2B remained a rigid link We would have two joints although there would still be six links 5 The StewartGough platform in Figure 44j consists of six prismatic extensible links attached to the two platforms by 12 spherical joints Each prismatic link counts as two links therefore the total number of links plus platforms is l 6 2 2 14 The total number of joints is 12 spherical and 6 prismatic or 18 and fi f1 f3 6 1 12 3 42 Spherical joint Spherical joint Figure 43 A mechanism may possess a passive degree of freedom which should not be counted toward its total DOF Kinematics Analysis of Parallel Robots 135 A parallel robot is called symmetrical if it satisfies the following requirements All loops are similar to each other have the same construction All limbs have the same number of joints that are similar The DOF of the platform equals the number of limbs a b c e d O1 f O1 g i h j O1 S S P A B C O1 O2 O3 A B O1 O2 Figure 44 The DOF of different types of mechanisms Table 41 Parameters and DOF values of the mechanisms in Figure 44 based on Eq 41 Figure 44 λ l including ground j fi fpassive DOF a 3 2 1 1 0 1 b 3 3 2 2 0 2 c 3 4 3 3 0 3 d 6 2 1 3 0 3 e 6 4 3 7 1 6 f 3 2 1 1 0 1 g 3 3 2 2 0 2 h 3 4 4 4 0 1 i 3 6 7 7 0 1 j 6 14 18 42 6 6 Introduction to Robotics 136 Otherwise the robot is said to be asymmetrical Additionally defining a kinematic chain as a series of joints and links a fully parallel robot satisfies the following conditions Every kinematic chain has only one active joint the rest are inactive No portion of a chain is linked to more than two bodies The DOF of the platform equals the number of limbs This limits the number of inverse kinematics solution to only one Otherwise the robot is not fully parallel For example if a chain consists of a prismatic link with two spherical joints at its ends as in Figure 44j for a fully parallel robot only one of the joints can be active say the prismatic joint the spherical joints only move passively as needed when the prismatic joint is extended or retracted Like serial robots parallel robots can be designed in many different configurations Parallel robots can be planar 2D or spherical and spatial 3D For symmetrical robots which we study in this chapter there are a limited number of workable configurations for 2D or 3D robots For example symmetrical planar parallel robots with 3 DOF will require three loops composed of two links and three joints each Since all joints are assumed to have 1 degree of freedom either as prismatic P or revolute R joints there can only be 7 combinations RRR RRP RPR PRR PRP PPR and RPP In each loop only one joint is actively controlled Figure 45 shows schematics of an RRR and an RPR planar robot The underlined letter specifies the active joint For spherical parallel robots the only practical joint type is revolute Therefore the loop type can only be RRR Additionally all axes of rotation should intersect at one point called the spherical center Figure 46 shows a schematic of a spherical parallel robot For 3D spatial symmetric parallel robots where all the limbs are the same we can generally assume the following The number of limbs determines the DOF of the robot threelimbed robots have 3 DOF fourlimbed robots have 4 DOF etc Figure 41 shows a 3DOF OmronAdept Hornet 565 robot with three limbs Figure 47 is a 4DOF OmronAdept Quattro 650800 robot with four limbs As long as each limb has the same number of DOF as the robot it does not matter how many links are joined together to make it In practice spherical 3DOF and cylindrical 2DOF joints are passive It is practically impossible to actively control 2 and 3DOF joints Therefore they are only used to achieve necessary DOF Only revolute or prismatic joints are actively controlled for setting the position and orientation of the mov ing platform O3 O2 O3 O1 O1 O2 Figure 45 Schematics of two possible planar parallel robots Kinematics Analysis of Parallel Robots 137 Figure 44j shows the schematic drawing of a StewartGough robot with 6 limbs each with 7 DOF minus 1 passive degree of freedom making the robot a 6DOF robot Other combinations of joints are possible too For example knowing that prismatic and revolute joints have 1 degree of freedom cylindrical and universal joints have 2 DOF and spherical joints are 3DOF joints there can be many different combinations of joints that will provide the necessary DOF for the robot For example instead of two spherical joints and one pris matic joint SPS on each limb of the StewartGough robot and remembering that one of the DOF is passive and does not count it is possible to make it with six revolute joints 6R as shown in Figure 48 with two spherical joints and one cylindrical joint SCS with 2 passive DOF with one revolute joint and two spherical joints RSS with 1 passive degree of freedom etc and achieve the same capability to position and orient the platform 1 4 Figure 46 Spherical Agile Eye and Agile Wrist parallel robotic mechanisms Source Reproduced with permission from Dr Soheil Sadeghi Figure 47 A 4DOF OmronAdept Quattro 650800 robot Source Image provided by Omron Automation 2018 Omron All Rights Reserved Introduction to Robotics 138 Most industrial parallel robots are meant for pick and place or simple assembly operations This only requires setting the x y and zcoordinates Therefore many industrial parallel robots are 3DOF and have three limbs In some cases a fourth separate motor on the fixed platform attached to a rotating toolholder in the moving platform with a linkage provides an additional rotation that makes it a 4DOF robot There are also many 4axis parallel robots with 4 set of limbs that do the same Limiting the limb design to revolute prismatic and spherical joints will also limit the number of possible designs Most industrial parallel robots only use revolute and passive spherical joints Figure 49 shows 6DOF StewartGough type platforms with type 33 63 and 66 configurations These systems all have six limbs which may be attached to the same or separate points Either way the total DOF remains the same 43 The DenavitHartenberg Approach vs the Direct Kinematic Approach The DenavitHartenberg DH representation is very general and can be used for modeling and analysis of serial and parallel robots For example imagining a generic parallel robot in Figure 410 repeated here we can assign a frame to each of the joints of each limb In this figure all joints are revolute but the same applies Figure 48 An alternative design for a 6DOF parallel robot with all revolute joints Type 33 Type 66 Type 63 Figure 49 StewartGough type 33 63 and 66 parallel robots Figures by Trent Peterson Kinematics Analysis of Parallel Robots 139 to prismatic universal cylindrical or spherical joints For cylindrical and universal joints two intersecting frames represent the variables For spherical joints three intersecting frames represent the variables As in Chapter 2 with serial robots successive frame multiplications yield transformations between frames The difference here is that since in parallel robots the kinematic loops are closed each loop representation will be 0A1 1A2 2A3 3A4 n1An nA0 I This results in a complicated but still 4 4 transformation matrix equation Simultaneously solving one matrix equation for each loop will result in a set of solutions for the unknown joint variables In order to do this it will be necessary to eliminate passive joint variables from each equation and only keep the active joint variable However DH representation of parallel robots is a very involved and timeconsuming approach As men tioned before for parallel robots the forward kinematics is generally much more difficult to do than the inverse kinematics which is exactly what we want Therefore a vectoranalysis approach is usually used to solve the kinematics of parallel robots resulting in simpler inverse kinematics solutions We will use the vectoranalysis approach for the remainder of this chapter 44 Forward and Inverse Kinematics of Planar Parallel Robots Planar parallel robots move in a plane and therefore are simpler We start our analysis of forward and inverse kinematics of parallel robots with planar robots and later analyze 3D spatial robots Conventionally and similar to serial robots the configuration of the robot is specified by the type of joints each limb has RPR indicates a revolute joint a prismatic joint and a revolute joint connected to each other by limbs The underlined letter indicates which joint is active Similarly RRR indicates three revolute joints where the first joint is actively controlled As mentioned earlier unlike with the serial robots the inverse kinematic analysis of parallel robots is easier while the forward kinematics analysis is much more involved This is to our advantage since we are generally interested in inverse kinematic solutions not the forward We want to be able to specify the position and orientation of the robot platform and calculate what the joint values should be to achieve them In the following sections we will analyze a 3RPR and a 3RRR robot z0 x1 z1 x0 z2 x4 z4 x5 z3 x3 z5 x2 Figure 410 DH frame representation for parallel robots Introduction to Robotics 140 441 Kinematic Analysis of a 3RPR Planar Parallel Robot Figure 411 shows a threelimbed RPRtype planar parallel robot Although it does not have to be so we have selected an equilateral triangular base and a moving platform for geometric simplicity All positions and orientations are measured relative to the arbitrarily located reference frame shown Vectors l1l2l3 represent the position of the fixed base of the robot Values d1 d2 d3 represent the lengths of the active prismatic joints that connect the moving platform to the base through the revolute joints Vectors c1c2c3 represent the three apexes of the moving platform relative to its center C Vector P and angle θ are the desired position and orientation of the platform relative to the fixed frame The DOF of the system can be calculated through Eq 41 F λ lj1 fifpassive 3 891 90 3 For each loop consisting of the base a limb and the platform we can write P ci li di for i 123 Since the prismatic joint is the active joint the unknown we write di P ci li 42 As shown in Figure 411b lengths c1 c2 c3 are constant but as the platform rotates about the zaxis the xand ycomponents of these values change according to the rotation matrix Rotz θ However since this is a planar robot these values cab be premultiplied by a 2D version of the rotation matrix Rot zθ Cθ Sθ Sθ Cθ x y O1 A1 P c1 c2 c3 b A2 A3 O3 O2 O n o l1 l3 l2 d3 d1 d2 c1 c2 c3 θ Figure 411 A 3RPR planar parallel robot Kinematics Analysis of Parallel Robots 141 For each loop of the planar robot Eq 42 can be expanded as dix diy Px Py Cθ Sθ Sθ Cθ cix ciy lix liy for i 123 or dix diy Px Py CθcixSθciy Sθcix Cθciy lix liy for i 123 43 Given the desired values of the location and orientation of the moving platform Px Py θ the length di of each actuator can be directly calculated from Eq 43 Calculation of the forward kinematic equations of the robot is not a trivial matter The solution is poten tially a sixthorder polynomial that yields the position and orientation of the platform given the lengths of the actuators Fortunately we do not usually need to do this but it indicates that there are potentially six solu tions for the robot As you may imagine from Figure 411 when all three actuators are at their minimum length extending the actuators may become impossible or if the platform does indeed move it may rotate in either direction and therefore it is a singularity and should be avoided Example 41 Figure 412 shows a planar 3RPR robot with a 12 in equilateral triangular base and a 3 in platform We would like to position the platform center at Px 4 in Py 5 in and θ 30 Deter mine the lengths of the three prismatic actuators that would place and orient the platform Solution From Figure 412 we get the following values l1 0 0 l2 12 0 l3 6 10 4 x y 3 12 c1 c2 c3 30 b Figure 412 The robot from Example 41 Introduction to Robotics 142 At reset position c1 1 5 0 866 c2 1 5 0 866 c3 0 1 73 Substituting into Eq 43 for each actuator we find d1x d1y 4 5 0 866 1 5 0 5 0 866 0 5 1 5 0 866 0 866 0 0 3 134 3 5 d1 4 7 in d2x d2y 4 5 0 866 1 5 0 5 0 866 0 5 1 5 0 866 0 866 12 0 6 27 5 d2 8 02 in d3x d3y 4 5 0 866 0 0 5 1 73 0 5 0 0 866 1 73 6 10 4 2 865 3 90 d3 4 84 in Calculating the lengths of each actuator for any other position or orientation only requires substitut ing the given values into Eq 43 442 Kinematic Analysis of a 3RRR Planar Parallel Robot In order to see the approach taken to solve parallel robots with revolute joints we analyze a 3RRR planar robot with three revolute joints and two links on each limb where the first revolute joint is active This allows the motor to be stationary on the frame and therefore reduces inertia load You will notice how much more involved this process is compared to the analysis of an RPR robot Figure 413 shows a planar parallel robot Although it does not have to be so we have selected an equilateral triangular base and moving platforms From Eq 41 we find the DOF of the system to be F λ lj1 fifpassive 3 891 90 3 x y A1 A3 A2 C1 C3 C2 B1 B3 B2 α1 β1 β2 α2 α3 β3 P n o l1 l3 l2 a3 a2 a1 b1 b2 b3 O2 O1 c3 c2 c1 θ Figure 413 A 3RRR planar parallel robot Kinematics Analysis of Parallel Robots 143 Vectors l1l2l3 represent the locations of the fixed revolute joints on each limb relative to the arbitrarily located reference frame Vectors c1c2c3 represent the apexes of the moving platform relative to its center which is the point where we specify the location of the moving platform Vectors a1a2a3 and b1b2b3 rep resent the linkages of each limb In practice the limbs are usually equal but in this analysis we will allow them to be of any length The angles α1 α2 α3 represent the angles of the active joints on each limb relative to the x axis The angles β1 β2 β3 represent the second joint on each limb and are measured relative to the first link These joints are not active and therefore we try to eliminate these angles Vector P is the desired location of the center of the platform and angle θ is its orientation relative to the reference frame The angles α1 α2 α3 are the unknowns The controller drives the robot limbs to these values For each limb i 123 we can write the following vector equation li ai bi P ci or li ai Pci bi The components of vectors ai and bi are expressed in terms of angles αi and αi βi Using a 2D rotation matrix to describe the orientation of the platform the x and ycomponents of these vectors can be written as lix liy Px Py aiCαi aiSαi Cθ Sθ Sθ Cθ cix ciy biC αi βi biS αi βi 44 where cix ciy are the coordinates of the moving platform at reset We are interested in eliminating βi We rearrange Eq 44 to aiCαi lixPxcixCθ ciySθ biC αi βi aiSαi liyPycixSθciyCθ biS αi βi 45 We denote the two parentheses of Eq 45 as quantities qix qiy qix lixPxcixCθ ciySθ qiy liyPycixSθciyCθ 46 to get aiCαi qix biC αi βi aiSαi qiy biS αi βi 47 To eliminate the inactive angles βi we square and add the two sides of Eq 47 as ai2C2αi qix2 2aiqixCαi bi 2C2 αi βi ai2S2αi qiy2 2aiqiySαi bi 2S2 αi βi ai 2 qix 2 qiy 2 2ai qixCαi qiySαi bi 2 or qixCαi qiySαi Qi where Qi bi 2ai2qix2qiy2 2ai 48 Referring to Appendix A we select Method 2 for solving this equation We substitute the following trig onometric equivalents for sin αi and cos αi sinα tanα 1 tan2 α and cosα 1 1 tan2 α Introduction to Robotics 144 to get qix 1 tan2 αi qiy tanαi 1 tan2 αi Qi We square both sides of the equation and rearrange it to get tan2 αi qiy 2Q2 i tanαi 2qixqiy qix 2Q2 i 0 49 Equation 49 is a simple quadratic equation that yields two values for tan αi However since we do not know whether the answer is in the first or third quadrant we do not have individual values of sine and cosine and do not know if they are positive or negative in effect Eq 49 yields four answers for each αi However not all of these values actually work Although these equations appear to be involved all the coefficients of Eq 49 are known and can be simply calculated Rearranging Eq 47 and squaring and simplifying it will allow us to also calculate βi as follows although it is not used for controlling the robot qix biC αi βi aiCαi qiy biS αi βi aiSαi qix 2 qiy 2bi 2ai 2 2aibi cosβi Angle β can also be found from subtracting the two complementary values of α Example 42 Figure 414 shows a small planar parallel 3RRR robot We have chosen the lengths of the linkages to all be ai bi 4 in while the triangular moving platform is 3 in in length and the fixed platform is 10 in in length We want to position and orient the platform at Px 7 in Py 5 in and θ 0 Find the necessary angles of each first linkage of each limb Solution we can write the following l1 0 0 l2 10 0 l3 5 8 66 x y 3 4 10 4 625 533 2464 Figure 414 Planar 3RRR parallel robot from Example 42 Kinematics Analysis of Parallel Robots 145 At reset position c1 1 5 0 866 c2 1 5 0 866 c3 0 1 73 Using Eqs 46 48 and 49 the following values are calculated q1x 5 5 q1y 4 134 Q1 5 917 tanα1 2 430 11 α1 6 25 67 6 q2x 1 5 q2y 4 134 Q2 2 42 tanα2 0 241 34 α2 53 3 13 4 166 6 q3x 2 q3y 1 93 Q3 0 97 tanα3 0 482 28 α3 66 4 246 4 25 7 Figure 415 shows how the complementary angles relate to the desired configuration It should be mentioned that although results from either set can theoretically be mixed in reality only the sets con taining either the first or the second set of angles are practical Otherwise it may become impossible to move the robot to another point due to the present angles To see what happens when the specified desired position or location changes we will do the same but this time we will specify θ 90 Substituting the same values into Eqs 46 48 and 49 we get q1x 7 87 q1y 3 5 Q1 9 27 However we find that these values will not yield a satisfactory answer because the value of the dis criminant for α1 is negative This indicates that the robot cannot be at this position and orientation The linkages are too short x y Figure 415 Complementary configurations of linkages for Example 42 Introduction to Robotics 146 45 Forward and Inverse Kinematics of Spatial Parallel Robots In this section we will study how a similar analysis can be applied to 3D parallel robots Since there are far more possible configurations for a 3D parallel robot we will limit our studies to particular types with certain simplifying assumptions Included will be StewartGough platform and 3DOF and 4DOF parallel robots with revolute and prismatic actuators Although the general approaches to derive the inverse kinematic equa tions for these robots have similarities their solutions are different 451 Kinematic Analysis of a Generic 66 StewartGough Platform As mentioned earlier the StewartGough Platform refers to a parallel robot that has six variablelength kin ematic chains connected to a fixed platform at one end and to a moving platform at the other The spacing between all connection points on both platforms is usually equal or symmetrical although it does not have to be The joints connecting the kinematic chains to the two platforms are all spherical As shown in Section 42 the StewartGough Platform has 6 DOF allowing the user to specify the position and orientation of the mov ing platform By calculating the correct length of each prismatic joint the specified position and orientation can be achieved We assume that a fixed reference frame is placed at the geometric center of the fixed platform such that its xaxis is pointed toward the spherical joint of the first kinematic chain A1 as shown in Figure 416 The zaxis of the frame is pointed up and the yaxis is mutually perpendicular to both according to the righthand rule Similarly we attach a reference frame to the moving platform at its geometric center with its naxis pointed toward the spherical joint of the first kinematic chain B1 its aaxis perpendicular to the platform and upward and its oaxis mutually orthogonal to both according to the righthand rule The position of the moving plat form is specified by the location of the center of the moving platform relative to the fixed reference frame and its orientation by three rotations relative to the fixed reference frame Notice that there may also be a Uni verse frame from which all measurements are made for convenience For example if the robot is attached a b xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B2 B3 B4 B5 B6 d1 P b1 a1 xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B2 B3 B5 B6 d1 P b1 a1 B4 Figure 416 A 66 type Stewart platform Kinematics Analysis of Parallel Robots 147 upsidedown for its task the position may be measured from a work table In that case all positions measured relative to the Universe frame can easily be transferred to the fixed frame of the base by subtraction Figure 416 shows a robot both in its reset position as well as in a position defined by position vector P and angles θ ϕ ψ relative to the x y and zaxes Notice how the fixed and moving platforms together with the six kinematic chains form six closed loops We will use these six closed kinematic loops to derive the inverse kinematic equations of the robot Referring to Figure 416a we can write a vector equation for each loop as di P bi ai for i 16 410 where di represents the variablelength link which we want to calculate P is the position of the center of the moving platform relative to the fixed frame ai is the vector between the center of the fixed platform and spherical joint Ai and bi is the vector between the center of the moving platform and spherical joint Bi Notice that the values of P a and b are given or known and constant Equation 410 also holds true for the case when the moving platform has moved Figure 416b although the vectors have to be redefined for this position Now lets first define each of these vectors Vector P is the desired position of the center of the moving platform and is given Vectors ai are constant and fixed Although in general the spacing between the spher ical joints may be different assuming symmetry they will all be 60 Therefore we can write ai a cos i1 60 a sin i1 60 0 1 411 In case of a lack of symmetry each vector can be defined based on the given information Similarly although they do not have to be equally spaced vectors bi for the rest position can be written as bi b cos i1 60 b sin i1 60 0 1 412 However if the moving platform rotates vectors bi change Therefore we need to calculate these vectors after rotation about the fixed axis Notice that the desired orientation of the moving platform is specified and known we know the three angles of rotation relative to the axes of the fixed reference frame In order to calculate the current values of vectors bi imagine that the moving reference frame noa starts at the fixed reference frame xyz and coincident with it We rotate the moving frame about the x y and zaxes angles of θ ϕ ψ respectively before moving the frame a distance of P to achieve the desired position and orientation as specified All these transformations are relative to the fixed reference frame axes xyz Therefore the frame noa will go through a set of transformations that can be calculated by premultiplying it by the correspond ing rotation matrices as nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Rot zψ Rot yϕ Rot xθ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Introduction to Robotics 148 Substituting the appropriate rotation matrices from Chapter 2 we get nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Cψ Sψ 0 0 Sψ Cψ 0 0 0 0 1 0 0 0 0 1 Cϕ 0 Sϕ 0 0 1 0 0 Sϕ 0 Cϕ 0 0 0 0 1 1 0 0 0 0 Cθ Sθ 0 0 Sθ Cθ 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 CψCϕ CψSϕSθSψCθ CψSϕCθ SψSθ 0 SψCϕ SψSϕSθ CψCθ SψSϕCθCψSθ 0 Sϕ CϕSθ CϕCθ 0 0 0 0 1 413 Note that this rotation arrangement is one of possible 24 different arrangements If any other arrangement is used eg rotations about the z y xaxes respectively the same method can be developed for its analysis with the proper order of matrix multiplications In that case the specification of rotations will also follow the same order Using Eq 413 we can now express vectors bi within the moving platform reference frame by bix biy biz 1 new CψCϕ CψSϕSθSψCθ CψSϕCθ SψSθ 0 SψCϕ SψSϕSθ CψCθ SψSϕCθCψSθ 0 Sϕ CϕSθ CϕCθ 0 0 0 0 1 bix biy biz 1 reset 414 Since the rotation angles as well as the vectors bi at reset are all known the value of each of the vectors of bi at the desired location can be calculated The inverse kinematic relationship of Eq 410 can now be solved for each loop as dix diy diz Px Py Pz bix biy biz aix aiy aiz for i 16 415 and di dix 2 diy 2 diz 2 for i 16 416 Notice that due to the nature of parallel robots where multiple closed loops are coupled together all di for i 1 to6 must be calculated simultaneously and continually and the controller must drive the actuators simultaneously otherwise the platform will not be at the desired position or orientation Also notice that in our model we have assumed that the platforms have a zero thickness and that the spher ical joints are located exactly on the platform In reality platforms have a thickness and spherical joints depending on how they are attached have offsets To remedy these discrepancies you may modify your loop equations to include the offsets and thicknesses or subtract them from the actual specified position vectors In other words if the actual location on the platform is specified as P the thickness of the platform and the sphericaljoint offsets can be subtracted from it before substitution into equations It is important to mention here that a general StewartGough parallel robot in which all joints are separated equally at 60 is inherently unstable when the platforms are parallel because all the loops are Kinematics Analysis of Parallel Robots 149 the same It can collapse when the moving platform rotates about the zaxis and simultaneously moves down without any change of the actuator lengths P as shown in Figure 417 When the platforms are not parallel the tendency to be unstable is reduced We assumed 60 separations here to simplify the der ivation of loop equations However if the separations between successive joints on either platform are not all equal eg 40 80 vs 60 60 due to the asymmetry between the loops the system is stable Therefore a 63 and a 33 configuration are also stable We will study these configurations next Regardless the way the equations are developed for unequal separations are the same except that vectors āi and bi are at different angles Example 43 For a generic 66 StewartGough parallel robot with a 5 in and b 3 in calculate the length of each linkage for the following positions and orientations of the moving platform a θ 90 ϕ 0 ψ 0 Px 0Py 0Pz 12 in b θ 90 ϕ 0 ψ 0 Px 2Py 2Pz 12 in c θ 90 ϕ 45 ψ 0 Px 2Py 2Pz 12 in Solution For each case we substitute the given values into Eqs 410416 For all three cases we get Loop 1 2 3 4 5 6 ax 5 25 25 5 25 25 ay 0 4330 4330 0 4330 4330 az 0 0 0 0 0 0 bx 3 15 15 3 15 15 by 0 2598 2598 0 2598 2598 bz 0 0 0 0 0 0 Figure 417 A general StewartGough platform rotating and moving down without changing the lengths of the actuators Model designed by Trent Peterson Introduction to Robotics 150 For question a we get Loop 1 2 3 4 5 6 bx rotated 3 15 15 3 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 2598 2598 0 2598 2598 dx 2 1 1 2 1 1 dy 0 4330 4330 0 4330 4330 dz 12 14598 14598 12 9402 9402 d 12166 15259 15259 12166 10399 10399 For question b we get Loop 1 2 3 4 5 6 bx rotated 3 15 15 3 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 2598 2598 0 2598 2598 dx 0 1 3 4 3 1 dy 2 233 233 2 6330 6330 dz 12 14598 14598 12 9402 9402 d 12166 1482 15084 12806 11725 11378 For question c we get Loop 1 2 3 4 5 6 bx rotated 2121 2898 0777 2121 2898 0776 by rotated 0 0 0 0 0 0 bz rotated 2121 0776 2898 2121 0776 2898 dx 0879 2398 5277 4879 1602 1276 dy 2 233 233 2 6330 6330 dz 9879 1278 14898 14121 11224 9102 d 10117 1321 15975 15074 12985 1116 As you may have noticed in this analysis the unknown parameter in this case the length of the linkage for each loop is directly calculated from each loop equation Therefore the inverse kinematic solution is straight forward and easy with a limited number of solutions However in forward kinematic calculations where the lengths of linkages are specified and the position and orientation of the moving platform are wanted the solution is a function of all the linkage lengths As a result all loop equations must be solved together to Kinematics Analysis of Parallel Robots 151 find six simultaneous unknowns three position components and three orientation components which is a much more involved process 452 Kinematic Analysis of a Generic 63 StewartGough Platform A generic 63 StewartGough parallel platform is similar to a 66 platform except that each two of the lin kages are connected to the same point on the moving platform as shown in Figure 418 The analysis of this system is very similar to the 66 platform except that points B1 and B2 B3 and B4 and B5 and B6 are 120 apart We can write six loop equations similar to the 66 platforms as in Eq 410 while incorporating the new geometry Notice that in Figure 418 for the sake of symmetry and to make our equations easier we have moved the fixed reference frame by 30 Therefore point A1 is at 30 etc We can write the following represen tation for vectors ai ai a cos i1 60 30 a sin i1 60 30 0 1 a sin i 60 a cos i 60 0 1 417 Similarly for vectors bi we can write bi b cos i1 60 b sin i1 60 0 1 fori 135 418 The remaining analysis and equations developed for 66 platforms apply here too In reality due to their physical dimensions the two spherical joints cannot be at exactly the same point Therefore the equations may be modified to account for the small angle between them xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B3 B5 d1 P b1 a1 Figure 418 A generic 63 StewartGough platform Introduction to Robotics 152 Example 44 For a generic 63 StewartGough parallel robot with a 5 in and b 3 in calculate the length of each linkage for the following positions and orientations of the moving platform a θ 90 ϕ 0 ψ 0 Px 0Py 0Pz 12 in b θ 0 ϕ 90 ψ 0 Px 2Py 2Pz 12 in Solution For each case we substitute the given values into Eqs 410416 For both cases we get Loop 1 2 3 4 5 6 ax 433 433 0 433 433 0 ay 25 25 5 25 25 5 az 0 0 0 0 0 0 bx 3 3 15 15 15 15 by 0 0 2598 2598 2598 2598 bz 0 0 0 0 0 0 For question a we get Loop 1 2 3 4 5 6 bx rotated 3 3 15 15 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 0 2598 2598 2598 2598 dx 13301 133 15 283 283 15 dy 25 25 5 25 25 5 dz 12 12 146 146 9402 94019 d 1233 1233 155 1508 1013 10754 For question b we get Loop 1 2 3 4 5 6 bx rotated 0 0 0 0 0 0 by rotated 0 0 2598 2598 2598 2598 bz rotated 3 3 15 15 15 15 dx 233 233 2 633 633 2 dy 45 05 0402 2098 1902 4402 dz 9 9 135 135 135 135 d 10329 9310 13653 15057 15031 1434 Kinematics Analysis of Parallel Robots 153 Figure 49 shows a 33 StewartGoughtype platform The analysis of this type of parallel robot will be very similar to the analysis for 66 and 63 platforms where only the descriptions of the components of the ai and bi vectors are modified and the loop equations relate to the corresponding connection points This analysis is left for the reader as an exercise 453 Kinematic Analysis of a 3Axis RSSType Parallel Robot There are many popular industrial parallel robots on the market mostly 3 or 4DOF and mostly used for highspeed pickandplace or assembly operations rapid prototyping or similar tasks These robots are very fast stiff and accurate Because their actuators are all housed on the fixed platform these robots have low inertial loads Some 3DOF models include an additional motor mounted on the fixed platform which con nects to a rotating tool holder on the moving platform through a shaft with Ujoints this allows the tool holder to rotate independently of the other three actuators therefore making it into a 4DOF robot However this additional degree of freedom is external to the kinematic loops and does not affect the kinematic equa tions of motion The moving platform of a 3DOF parallel robot always remains parallel to the fixed platform with no ori entation change As a result the user can only specify the location of the center of the platform in space but there are no rotations except with the additional independent motor rotating the tool holder Figure 419 shows a typical 3DOF robot The robots three kinematic loops are RSS type Notice that the linkages con necting the actuating arms to the moving platform called outer arms are in fact double links making them parallelograms that maintain the fixed orientation of the platform Using Eq 41 repeated here we can find the DOF of the robot as F λ lj1 fifpassive where λ 6 spatial mechanism l 11 two platforms three actuating arms six outer arms j 15 fi 3 1 12 3 39 fpassive 6 six outer arms each with one passive degree of freedom F 6 11151 396 3 Figure 419 Typical 3DOF industrialtype parallel robot Source Reproduced with permission from Yaskawa Electric Introduction to Robotics 154 Figure 420 shows the schematic drawing of a 3DOF robot Due to the nature of the tasks these robots perform they are usually mounted as shown We assign a Universe reference frame attached to the fixed platform as shown Note that the xaxis is pointed toward the first actuating joint A1 The zaxis is pointed downward to facilitate the specification of height Obviously other arrangements can also work but in this frame we measure the height relative to the fixed platform downward Measuring height can also be done relative to the work table by subtracting from the distance between the origin and the table The yaxis is orthogonal to x and zaxes Similarly a moving reference frame Mnoa is attached to the moving platform with similar directions except that this frame translates with the moving platform Angles θi represent the actuation angle of each arm and are the only variables that we need to calculate to run the robot We assume that θ 0 when the arm is horizontal Notice the direction of rotation We assume symmetry therefore lengths a distance of each actuating joint from the origin of the Universe frame d the same on the moving platform l length of each actuating arm and h length of each outer arm are the same although their coordinates differ For each of the three loops we can write UM MDi UAi AiBi BiDi for i 123 419 The angle between each actuating arm and outer arm varies as the robot moves but we do not need to calculate the angle and do not want to involve it in our calculations only θ is needed for each arm Therefore we express vectors BiDi using the coordinates of the two end points of each vector by BiDi DixBix i DiyBiy j Diz Biz k 420 Rearranging Eq 419 we get BiDi UM MDi UAi AiBi for i 123 421 Notice that UM MDi terminates at point Di and UAi AiBi terminates at Point Bi Therefore Eqs 420 and 421 represent the same vectors Since the coordinates of the different points for each loop are different we will analyze each loop separately These three loops can be solved independently of each other and although the process is the same for all three each one is unique x y z U M n o a A1 A2 A3 B1 B3 D1 D3 D2 d a l h P θ3 θ1 Figure 420 A typical 3DOF RSStype parallel robot Kinematics Analysis of Parallel Robots 155 Loop 1 The desired position of the moving platform is UM P PxPyPz T and MD1 d 0 0 T We can write UD1 UM MD1 Px Py Pz d 0 0 Px d Py Pz 422 Similarly UB1 UA1 A1B1 a 0 0 l cosθ1 0 l sinθ1 a lC1 0 lS1 423 Substituting Eqs 422 and 423 into Eq 420 we get B1D1 Px dalC1 i Py j Pz lS1 k where C1 is cos θ1 and S1 is sin θ1 Simplifying this equation by denoting Q1 Px da the length of B1D1 is B1D1 2 h2 Q1lC1 2 Py 2 Pz lS1 2 Q2 1 l2 C1 22Q1lC1 P2 y P2 z l2 S1 22PzlS1 Q2 1 P2 y P2 z l22Q1lC12PzlS1 424 Rearranging Eq 424 and denoting G1 h2 Q2 1 P2 y P2 z l2 2l we get Pz sinθ1 Q1 cosθ1 G1 425 Eq 425 can now be used to calculate θ1 Please refer to Appendix A for a variety of methods to solve this equation It should be mentioned that all methods render multiple solutions and since we do not independ ently have values for the sine and cosine of the angle we cannot easily determine in which quadrant the cor rect answer falls The fact that most industrial actuators have a limited range of motion will limit the number of acceptable answers In addition if we start from the reset position where all actuating angles are zero and continue monitoring the angles as the robot moves we should be able to determine in which quadrant the correct answers fall Loop 2 The analysis of loop 2 is very similar to loop 1 except that the vectors in this loop are all rotated 120 about the zaxis and we must take this into account Note that the desired position vector UM P PxPyPz T is the same as in loop 1 For each of the remaining vectors we premultiply the vector by a rotation matrix Rot z 120 We write MD2 Rot z 120 d 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 d 0 0 0 5d 0 866d 0 Introduction to Robotics 156 UA2 Rot z 120 a 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 a 0 0 0 5a 0 866a 0 A2B2 Rot z 120 lC2 0 lS2 0 5 0 866 0 0 866 0 5 0 0 0 1 lC2 0 lS2 0 5lC2 0 866lC2 lS2 Following the same process as in loop 1 and substituting these vectors into Eqs 420 and 421 we can write B2D2 Px0 5d 0 5a 0 5lC2 i Py0 866d 0 866a 0 866lC2 j Pz lS2 k 426 We simplify Eq 426 by denoting Q21 Px0 5d 0 5a Q22 Py0 866d 0 866a to get B2D2 Q21 0 5lC2 i Q22 0 866lC2 j Pz lS2 k The length of the second outer arm h is found from this equation as B2D2 2 h2 Q21 0 5lC2 2 Q22 0 866lC2 2 Pz lS2 2 Q2 21 0 25l2 C2 2 Q21lC2 Q2 22 0 75l2 C2 2 1 732Q22lC2 P2 z l2 S2 22PzlS2 Q2 21 Q2 22 P2 z l2 Q21lC2 1 732Q22lC22PzlS2 427 Rearranging Eq 427 and denoting G21 h2 Q2 21 Q2 22 P2 z l2 l G22 Q21 1 732Q22 G23 2Pz we get G23 sinθ2 G22 cosθ2 G21 428 Please refer to Appendix A for a variety of methods to solve this equation Notice that all parameters except θ2 are known Loop 3 The loop 3 analysis is similar to that for loop 2 except that the loop rotation matrix is Rotz 120 Note that the desired position vector UM P PxPyPz T remains the same We get MD3 Rot z120 d 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 d 0 0 0 5d 0 866d 0 Kinematics Analysis of Parallel Robots 157 UA3 Rot z120 a 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 a 0 0 0 5a 0 866a 0 A3B3 Rot z120 lC3 0 lS3 0 5 0 866 0 0 866 0 5 0 0 0 1 lC3 0 lS3 0 5lC3 0 866lC3 lS3 Following the same process as in loops 1 and 2 and substituting these vectors into Eqs 420 and 421 we can write B3D3 Px0 5d 0 5a 0 5lC3 i Py 0 866d0 866a0 866lC3 j Pz lS3 k 429 We can simplify Eq 429 by denoting Q31 Px0 5d 0 5a Q32 Py 0 866d0 866a to get B3D3 Q31 0 5lC3 i Q320 866lC3 j Pz lS3 k The length of the third outer arm h can be found from this equation as B3D3 2 h2 Q31 0 5lC3 2 Q320 866lC3 2 Pz lS3 2 Q2 31 0 25l2 C3 2 Q31lC3 Q2 32 0 75l2 C3 2 1 732Q32lC3 P2 z l2 S3 22PzlS3 Q2 31 Q2 32 P2 z l2 Q31lC31 732Q32lC32PzlS3 430 Rearranging Eq 430 and denoting G31 h2 Q2 31 Q2 32 P2 z l2 l G32 Q311 732Q32 G33 2Pz we get G33 sinθ3 G32 cosθ3 G31 431 Please refer to Appendix A for a variety of methods to solve this equation Notice that all parameters except θ3 are known Although the analyses of the three loops are similar but different a simple program can calculate the actuat ing arm angles of the three loops For each new location as the robot moves continuously from the previous point to the new desired location it is possible to compare the two calculated θ values with the previous values and decide what quadrant makes sense Introduction to Robotics 158 There are other possible ways to analyze these robots The present analysis is simple and easy to implement Example 45 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at P 0012 T in Calculate the necessary angles of the actuating arms Solution A quick look at the values shows that we should expect to get the three angles at 0 indicating this is the reset position Substituting these values into equations for Q and G for each loop we find Loop 1 Loop 2 Loop 3 Q1 5 Q21 25 Q31 25 Q22 433 Q32 433 G1 5 G21 10 G31 10 G22 10 G32 10 G23 24 G33 24 Loop 1 12 sinθ15 cosθ1 5 θ1 0 134 76 Loop 2 24 sinθ2 10 cosθ2 10 θ2 0 134 76 Loop 3 24 sinθ3 10 cosθ3 10 θ3 0 134 76 Figure 421 shows the results In reality the second answer may not be valid because the actuators range of motion may not allow this value although both sets of results work However if we assume that the robot is at its reset position when all actuating angles are zero as the robot moves to other locations we can continue to monitor the results to make sure the values of actuating angles are chan ging continuously not jumping around a7 l4 h15 d2 Pz12 a7 l4 h15 Pz12 d2 13476 Figure 421 The resulting actuating angles for θ1 for Example 45 Kinematics Analysis of Parallel Robots 159 Example 46 For the same robot as in Example 45 find the actuating angles for P 1 52 59812 T in Solution Note that the given values of Px and Py indicate a position along the direction of loop 3 see Figure 420 So we should expect to have similar actuation angles for loops 1 and 2 as shown in Figure 422 Sub stituting the given values into the equations for Q and G results in the following Loop 1 Loop 2 Loop 3 Q1 65 Q21 1 Q31 1 Q22 6928 Q32 1732 G1 2 G21 4 G31 1525 G22 13 G32 4 G23 24 G33 24 Loop 1 12 sinθ16 5 cosθ1 2 θ1 20 16 143 13 Loop 2 24 sinθ2 13 cosθ2 4 θ2 20 16 143 13 Loop 3 24 sinθ3 4 cosθ3 15 25 θ3 29 35 131 73 Note how the first two equations are the same As mentioned before the robots actuators may not allow the second answers 454 Kinematic Analysis of a 4Axis RSSType Parallel Robot For a 4DOF industrialtype parallel robot we apply the same approach as in Section 453 These robots are 4RSS type with a fixed platform a moving platform four actuating arms with a revolute joint and four sets of double outer arms with spherical joints at the two ends In this case the moving platform a7 l4 h15 d2 Pz12 a7 l4 h15 Pz12 d2 Px3 Px3 Figure 422 The resulting actuating angles for θ3 for Example 46 Introduction to Robotics 160 stays parallel to the fixed platform but it can rotate about the zaxis Therefore the user specifies the values of Px Py Pz as well as a rotation of α about the zaxis Figure 423 shows a typical industrial robot and a schematic representation of it These robots are mostly used for pickandplace and assembly operations and are usually mounted as shown We assign a Universe reference frame attached to the fixed platform as shown Note that the xaxis is pointed toward the first actuating joint A1 The zaxis is pointed downward to facilitate the specification of height Obviously other arrangements can also work In this arrangement we measure the height downward relative to the fixed platform Similarly a moving reference frame Mnoa is attached to the moving platform with similar directions except that this frame translates and rotates with the moving platform Angles θi rep resent the actuation angles and are the only variables that we need to calculate to run the robot We assume that θ 0 when the arm is horizontal Notice the direction of rotation We assume symmetry there fore lengths a distance of each actuating joint from the origin of the Universe frame d the same on the moving platform l length of each actuating arm and h length of each outer arm are the same although their coordinates differ For each of the four loops we can write UM MDi UAi AiBi BiDi for i 1234 432 As before the angle between each actuating arm and outer arm varies as the robot moves but we do not need to calculate the angle and do not want to involve it in our calculations only θi is needed for each arm Similar to the 3DOF case we express vectors BiDi using the coordinates of their two end points by BiDi DixBix i DiyBiy j Diz Biz k 433 Rearranging Eq 432 we get BiDi UM MDi UAi AiBi for i 1234 434 We now analyze each loop to derive the equations needed to calculate all four actuating angles x y z θ4 θ1 α U M n o a A1 A2 A3 B1 B4 D1 D4 d a l h P A4 Figure 423 A 4DOF RSStype parallel robot and its schematic Source Robot image provided by Omron Automation 2018 Omron All Rights Reserved Kinematics Analysis of Parallel Robots 161 Loop 1 The desired position of the moving platform is UM P PxPyPz T The position of point D is a function of the position of the moving frame as well as the rotation of the moving platform Therefore MD1 Rot aα d 0 0 Cα Sα 0 Sα Cα 0 0 0 1 d 0 0 dCα dSα 0 UD1 UM MD1 Px Py Pz dCα dSα 0 Px dCα Py dSα Pz 435 Similarly UB1 UA1 A1B1 a 0 0 l cosθ1 0 l sinθ1 a lC1 0 lS1 436 Substituting Eqs 435 and 436 into Eq 433 we get B1D1 Px dCαalC1 i Py dSα j Pz lS1 k where C1 is cos θ1 S1 is sin θ1 Sα is sin α and Cα is cos α Simplifying this equation by denoting Q11 Px dCαa and Q12 Py dSα the length of B1D1 is found from B1D1 2 h2 Q11lC1 2 Q12 2 Pz lS1 2 Q2 11 l2 C1 22Q11lC1 Q12 2 P2 z l2 S1 22PzlS1 Q2 11 Q2 12 P2 z l22Q11lC12PzlS1 437 Rearranging Eq 437 and denoting G11 Q2 11 Q2 12 P2 z l2h2 2l we get Pz sinθ1 Q11 cosθ1 G11 438 Equation 438 can now be used to calculate θ1 Please refer to Appendix A for a variety of methods to solve this equation As before we need to determine which of the two solutions for each angle should be used The fact that most industrial actuators have a limited range of motion will limit the acceptable answers In addition if we start from the reset position where all actuating angles are zero and continue monitoring the angles as the robot moves we should be able to determine in which quadrant the correct answer falls It is important to mention here that unlike in serial robots individual joints of parallel robots may not be moved without moving the rest In a serial robot we may choose to move only one or many joints simul taneously However in a parallel robot all joints move together simultaneously Therefore all loops must be solved and all unknown joint parameters calculated simultaneously to move the robot Introduction to Robotics 162 Loop 2 Similar to the analysis for loop 1 we write the loop equation as follows MD2 Rot aα 0 d 0 Cα Sα 0 Sα Cα 0 0 0 1 0 d 0 dSα dCα 0 UD2 UM MD2 Px Py Pz dSα dCα 0 Px dSα PydCα Pz 439 Similarly UB2 UA2 A2B2 0 a 0 0 l cosθ2 l sinθ2 0 alC2 lS2 440 Substituting Eqs 439 and 440 into Eq 433 we get B2D2 Px dSα i PydCα a lC2 j Pz lS2 k where C2 is cos θ2 S2 is sin θ2 Sα is sin α and Cα is cos α Simplifying this equation by denoting Q21 Px dSα and Q22 PydCα a the length of B2D2 is found from B2D2 2 h2 Q21 2 Q22 lC2 2 Pz lS2 2 Q2 21 Q22 2 l2 C2 2 2Q22lC2 P2 z l2 S2 22PzlS2 Q2 21 Q2 22 P2 z l2 2Q22lC22PzlS2 441 Rearranging Eq 441 and denoting G21 Q2 21 Q2 22 P2 z l2h2 2l we get Pz sinθ2Q22 cosθ2 G21 442 Equation 442 can now be used to calculate θ2 Please refer to Appendix A for a variety of methods to solve this equation Loop 3 The analysis of loop 3 is similar to that of loops 1 and 2 as follows MD3 Rot aα d 0 0 Cα Sα 0 Sα Cα 0 0 0 1 d 0 0 dCα dSα 0 Kinematics Analysis of Parallel Robots 163 UD3 UM MD3 Px Py Pz dCα dSα 0 PxdCα PydSα Pz 443 Similarly UB3 UA3 A3B3 a 0 0 l cosθ3 0 l sinθ3 alC3 0 lS3 444 Substituting Eqs 443 and 444 into Eq 433 we get B3D3 PxdCα a lC3 i PydSα j Pz lS3 k Simplifying this equation by denoting Q31 PxdCα a and Q32 PydSα the length of B3D3 is B3D3 2 h2 Q31 lC3 2 Q32 2 Pz lS3 2 Q2 31 l2 C3 2 2Q31lC3 Q32 2 P2 z l2 S3 22PzlS3 Q2 31 Q2 32 P2 z l2 2Q31lC32PzlS3 445 Rearranging Eq 445 and denoting G31 Q2 31 Q2 32 P2 z l2h2 2l we get Pz sinθ3Q31 cosθ3 G31 446 Equation 446 can now be used to calculate θ3 Loop 4 The analysis of loop 4 is as follows MD4 Rot aα 0 d 0 Cα Sα 0 Sα Cα 0 0 0 1 0 d 0 dSα dCα 0 UD4 UM MD4 Px Py Pz dSα dCα 0 PxdSα Py dCα Pz 447 Similarly UB4 UA4 A4B4 0 a 0 0 l cosθ4 l sinθ4 0 a lC4 lS4 448 Introduction to Robotics 164 Substituting Eqs 447 and 448 into Eq 433 we get B4D4 PxdSα i Py dCαalC4 j Pz lS4 k Simplifying this equation by denoting Q41 PxdSα and Q42 Py dCαa the length of B4D4 is B4D4 2 h2 Q41 2 Q42lC4 2 Pz lS4 2 Q2 41 Q42 2 l2 C4 22Q42lC4 P2 z l2 S4 22PzlS4 Q2 41 Q2 42 P2 z l22Q42lC42PzlS4 449 Rearranging Eq 449 and denoting G41 Q2 41 Q2 42 P2 z l2h2 2l we get Pz sinθ4 Q42 cosθ4 G41 450 Equation 450 can now be used to calculate θ4 Example 47 A 4DOF industrial parallel robot with a 6 in l 3 in d 4 in and h 13 in is to be at P 0012 in and α 0 Calculate the necessary angles of the actuating arms Solution A quick look at the values shows that we should expect to get all four angles at 0 indicating this is the reset position as shown in Figure 424 Substituting these values into equations for Q and G for each loop we find a6 l3 h13 d4 Pz12 0 a6 h13 d4 Pz12 161 l3 Figure 424 The resulting actuating angles for θ1 for Example 47 Kinematics Analysis of Parallel Robots 165 Loop 1 Loop 2 Loop 3 Loop 4 Q11 2 Q21 0 Q31 2 Q41 0 Q12 0 Q22 2 Q32 0 Q42 2 G11 2 G21 2 G31 2 G41 2 Loop 1 12 sinθ12 cosθ1 2 θ1 0 161 Loop 2 12 sinθ22 cosθ2 2 θ2 0 161 Loop 3 12 sinθ32 cosθ3 2 θ3 0 161 Loop 4 12 sinθ42 cosθ4 2 θ4 0 161 Example 48 Repeat Example 47 but let Pz 10 in and the platform rotate to α 10 and α 10 Solution We find the following result for α 10 Loop 1 Loop 2 Loop 3 Loop 4 Q11 206 Q21 069 Q31 206 Q41 069 Q12 069 Q22 206 Q32 069 Q42 206 G11 921 G21 921 G31 921 G41 921 All four loop equations will be the same 10 sinθi2 06 cosθi 9 21 θi 52 8 103 9 which is expected all four actuators should move the same angle to simply rotate the moving platform without translating it We also find the following for α 10 Loop 1 Loop 2 Loop 3 Loop 4 Q11 206 Q21 069 Q31 206 Q41 069 Q12 069 Q22 206 Q32 069 Q42 206 G11 921 G21 921 G31 921 G41 921 All four loop equations will be the same 10 sinθi2 06 cosθi 9 21 θi 52 8 103 9 As you see the results are the same This is because if all four actuators move the same amount from the same position it is not possible to determine in which direction the moving platform may turn Introduction to Robotics 166 Example 49 For the robot from Example 47 let the moving platform be at P 3010 in and α 0 Calculate the necessary angles of the actuating arms Solution Substituting these values into equations for Q and G for each loop we find the following Loop 1 Loop 2 Loop 3 Loop 4 Q11 1 Q21 3 Q31 5 Q41 3 Q12 3 Q22 5 Q32 3 Q42 1 G11 833 G21 433 G31 433 G41 833 Loop 1 10 sinθ1cosθ1 8 33 θ1 61 7 130 Loop 2 10 sinθ25 cosθ2 4 33 θ2 3 76 131 Loop 3 10 sinθ35 cosθ3 4 33 θ3 3 76 131 Loop 4 10 sinθ4cosθ4 8 33 θ4 61 7 130 which is also expected due to symmetry 455 Kinematic Analysis of a 3Axis PSSType Parallel Robot The 3DOF robot in Figure 425 consists of three prismatic actuators plus outer arms connected to the actua tors and the moving platform via spherical joints This machine can be used the same as other 3DOF robots as well as for rapid prototyping Since prismatic actuators are generally much slower than rotary actuators they are more appropriate for slower tasks such as rapid prototyping Note that with the chosen coordinate system the height is measured downward from the fixed base To measure from a tabletop subtract the height from the distance between the fixed platform and the tabletop x y z U M n o a A1 A2 A3 B1 B3 D1 D3 D2 d a l h P Figure 425 A 3DOF PSStype parallel robot Kinematics Analysis of Parallel Robots 167 The solution for this robot is very similar to the solutions of RSStype robots except that since the actuators are prismatic the solution is in fact even simpler For each of the loops we can write UM MDi UAi AiBi BiDi for i 123 451 We express vectors BiDi using the coordinates of their two end points by BiDi DixBix i DiyBiy j Diz Biz k 452 Rearranging Eq 451 we get BiDi UM MDi UAi AiBi for i 123 453 We now analyze loop 1 to derive the equations needed to calculate the length of the prismatic actuator Remember that we assume at reset the length of the actuator is known we adjust the length based on the reset value Loop 1 The desired position of the moving platform is UM P PxPyPz T and MD1 d00 T We can write UD1 UM MD1 Px Py Pz d 0 0 Px d Py Pz 454 Similarly UB1 UA1 A1B1 a 0 0 0 0 l1 a 0 l1 455 Substituting Eqs 454 and 455 into Eq 453 we get B1D1 Px da i Py j Pz l1 k Simplifying this equation by denoting Q1 Px da the length of B1D1 is B1D1 2 h2 Q1 2 Py 2 Pz l1 2 Q2 1 P2 y P2 z l1 22Pzl1 456 The length of the prismatic actuator is l1 22Pzl1 Q2 1 P2 y P2 z h2 0 457 All values except l1 are known The simple quadratic equation can be solved to calculate the length of the prismatic joint Loops 2 and 3 The analyses of loops 2 and 3 are very similar to that of loop 1 except that appropriate coordinates of points Ai and Di should be incorporated This analysis is left for the reader to complete Introduction to Robotics 168 Example 410 For a 3DOF PSStype parallel robot with a 8 in d 3 in and h 14 in find the following a The minimum Pz that can be specified for the robot b The length of the first prismatic joint for P 0018 in c The length of the first prismatic joint for P 2018 in Solution Substituting the given values into Eq 457 we get a Pz min 13 in b l1 236l 153 0 l1 4 92 and 31 07 The second result indicates the length of the prismatic joint needed if it were to move down until point B was below D Obviously this is beyond the design capability of the robot and not practical c l1 236l1 137 0 l1 4 325 and 31 675 in 46 Other Parallel Robot Configurations Other configurations are also possible for parallel robots For example Figure 426a shows a 4DOF parallel robot with two arms that move in a plane similar to a SCARA robot The advantages of the robot are its high speed and low inertia Figure 426b shows a PSStype robot with beltdriven inclined linear actuators These alternatives show that it is possible to design new configurations with specific characteristics that give the robot its unique value You may want to perform a similar analysis to derive the equations of motion for these configurations as well 47 Design Projects In addition to or as an alternative to the serial robot design projects mentioned in Chapter 2 you may choose to design a parallel robot There are many different possibilities but a 66 Stewarttype parallel robot may be a very good choice because it is so easy to make You can construct this robot with 6 linear actuators a b Figure 426 Alternative designs for parallel robots a Yaskawa specialty directdrive highspeed picking robot b Macron Dynamics TriBot beltdriven robot Source Reproduced with the permission of Yaskawa Electric and from Macron Dynamics Inc Kinematics Analysis of Parallel Robots 169 12 spherical joints and 2 plates The linear actuators and the spherical joints can be readily found on the internet Plates can be constructed out of wood or metal panels Magnetic spherical joints are simple and inexpensive and can be glued or attached to the end of linear actuators and the edges of the platforms As we continue you may apply what we learn to these robots as well 48 Summary In this chapter we analyzed a number of different parallel robots There are many other possibilities For other types of parallel robots a similar approach may be taken to derive the kinematic equations of motion The techniques used in this chapter were selected to represent different ways the solution may be developed Fortunately in the case of parallel robots the inverse kinematic equations are straightforward In Chapter 5 we will study differential motions of robots which leads us to velocity analysis and control References 1 Tsai LungWen Robot Analysis John Wiley and Sons 1999 2 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 3 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 4 Simaan Nabil Analysis and Synthesis of Parallel Robots for Medical Applications research thesis The Technion Israel Institute of Technology 1999 5 Tsai LW F Tahmasebi Synthesis and Analysis of a New Class of SixDegreesofFreedom Parallel Manipulators Journal of Robotic Systems vol 10 no 5 pp 561580 1993 6 BenHorin R M Shoham Construction of a SixDegreesofFreedom Parallel Manipulator with Three Planarly Actuated Links Proceedings of the 1996 ASME Design Engineering Technical Conference and Computers in Engineering Conference August 1996 Problems 41 Figure P41 shows a planar robot with its associated dimensions and reference frame Calculate the length of each prismatic actuator for Px Py θ x y 4 12 30 P 15 2 at 71 68 Figure P41 Introduction to Robotics 170 42 Repeat Problem 41 for Px 7 Py 10 θ 45 43 Referring to Figure 414 from Example 42 the fixed platform is a triangle of 10 in in length the mov ing platform is 3 in long and the linkage arms are all 4 in long We want to position and orient the platform at Px 5 Py 2 887 θ 30 Calculate the angle of each active arm Graphically verify that your solution is correct 44 Refer to Figure 414 from Example 42 except that the reference frame is located at the geometric center of the fixed platform The fixed platform is a triangle of 10 in in length the moving platform is 3 in long and the linkage arms are all 5 in long We want to position and orient the platform at Px 2 Py 1 θ 0 Calculate the angle of each active arm Graphically verify that your solution is correct 45 Refer to Figure 414 from Example 42 except that the reference frame is located at the geometric center of the fixed platform The fixed platform is a triangle of 10 in in length Assume the moving platform is a point where all three linkages are connected coincidentally The linkage arms are all 5 in long We want to position and orient the platform at Px 3 Py 2 θ 0 Calculate the angle of each active arm Graphically verify that your solution is correct 46 A 66 StewartGoughtype platform has the following characteristics a 3 in b 3 in Calculate the length of each prismatic actuator for placing the center of the moving platform at a θ 0 ϕ 0 ψ 0 and Px 3Py 0Pz 10 in b θ 0 ϕ 0 ψ 0 and Px 3Py 5Pz 10 in 47 A 66 StewartGoughtype platform has the following characteristics a 12 in b 5 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 90 ϕ 0 ψ 0 and Px 2Py 0Pz 10 in 48 A 66 StewartGoughtype platform has the following characteristics a 15 in b 6 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 90 and Px 3Py 2Pz 12 in 49 Explain how you would solve for the inverse kinematic equation of a 66 type StewartGough platform if the joints were not separated at equal angles or the distances between the center of each platform and the joints were not the same 410 A 63 StewartGoughtype platform has the following characteristics a 3 in b 3 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 0 and Px 0Py 0Pz 10 in Verify your answer graphically 411 A small 63 StewartGoughtype positioning device has the following characteristics a 1 in b 1 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 90 ϕ 0 ψ 0 and Px 0Py 0Pz 3 in 412 A 63 StewartGoughtype positioning device has the following dimensions a 4 in b 4 in Calcu late the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 90 and Px 0Py 0Pz 6 in 413 For the positioning system of Problem 414 calculate the length of each prismatic actuator for placing the center of the moving platform at θ 45 ϕ 0 ψ 45 and Px 2Py 1Pz 6 in Kinematics Analysis of Parallel Robots 171 414 Explain how you would solve for the inverse kinematic equation of a 63 type StewartGough platform if the joints were not separated at equal angles or the distances between the center of each platform and the joints were not the same 415 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 0 Py 0 and Pz 18142 in Calculate the necessary angles of the actuating arms Verify your solution graphically 416 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 0 Py 0 and Pz 10142 in Calculate the necessary angles of the actuating arms 417 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 3 Py 0 and Pz 12 in Calculate the necessary angles of the actuating arms 418 A 3DOF industrial parallel robot with a 10 in l 6 in d 2 in and h 20 in is to be at Px 2 Py 3 and Pz 19 in Calculate the necessary angles of the actuating arms 419 A 3DOF industrial parallel robot with a 10 in l 6 in d 2 in and h 20 in is to be at Px 3 Py 3 and Pz 20 in Calculate the necessary angles of the actuating arms 420 Explain how you would solve for the inverse kinematic equation of a 3DOF parallel robot if the joints were not separated at equal angles the distances between the center of each platform and the joints were not the same or the outer arms were not the same length 421 A 4DOF industrial parallel robot with a 6 in l 3 in d 4 in and h 13 in is to be at Px 3 Py 2 Pz 11 in and α 0 Calculate the necessary angles of the actuating arms 422 A 4DOF industrial parallel robot with a 7 in l 4 in d 4 in and h 13 in is to be at Px 15 Py 25 Pz 11 in and α 15 Calculate the necessary angles of the actuating arms 423 A 4DOF industrial parallel robot with a 8 in l 4 in d 3 in and h 14 in is to be at Px 4 Py 2 Pz 11 in and α 20 Calculate the necessary angles of the actuating arms 424 A 4DOF industrial parallel robot with a 7 in l 4 in d 3 in and h 15 in is to be at Px 4 Py 4 Pz 13 in and α 0 Calculate the necessary angles of the actuating arms 425 A small 4DOF industrial parallel robot with a 3 in l 1 in d 1 in and h 5 in is to be at Px 05 Py 07 Pz 4 in and α 12 Calculate the necessary angles of the actuating arms 426 Explain how you would solve for the inverse kinematic equation of a 4DOF parallel robot if the joints were not separated at equal angles the distances between the center of each platform and the joints were not the same or the outer arms were not the same length 427 For a 3DOF PSStype parallel robot with a 7 in d 2 in and h 12 in find the following a The length of the first prismatic joint for P 0015 in b The length of the first prismatic joint for P 3015 in 428 Derive the inverse kinematic equation for loop 2 of the PSStype parallel robot 429 Derive the inverse kinematic equation for loop 3 of the PSStype parallel robot Introduction to Robotics 172 5 Differential Motions and Velocities 51 Introduction Differential motions are small movements denoted by an expression such as Δs or ds When divided by a differential time Δt or dt we find the average velocity vave ΔsΔt or instantaneous velocity v dsdt By studying differential motions we are practically studying velocity relationships In this chapter we learn about differential motions of frames relative to a fixed frame differential motions of robot joints relative to a fixed frame Jacobians and robot velocity relationships We study differential motions based on the DenavitHartenberg DH representation as well as screwbased mechanics We start with serial robots based on the DH representation and then based on screw mechanics This chapter contains a fair number of velocity relationships that you may have seen in a dynamics course If you do not remember the material well a review of it can be helpful 52 Differential Relationships First lets see what the differential relationships are To do this we will consider a simple 2DOF mechanism as shown in Figure 51 where each link can rotate independently The rotation of the first link θ1 is meas ured relative to the reference frame whereas the rotation of the second link θ2 is measured relative to the first link as we might see in a DH representation where the movements of each link of a robot are measured relative to a current frame attached to the previous link a VA VBA VB x y b x y l1 l2 o A θ2 θ1 B Figure 51 a 2DOF planar mechanism b velocity diagram 173 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed The velocity of point B can be calculated as follows vB vA vBA l1θ1 tol1 l2 θ1 θ2 tol2 l1θ1 sinθ1i l1θ1 cosθ1jl2 θ1 θ2 sin θ1 θ2 i l2 θ1 θ2 cos θ1 θ2 j 51 Writing Eq 51 in matrix form yields the following vBx vBy l1 sinθ1l2 sin θ1 θ2 l2 sin θ1 θ2 l1 cosθ1 l2 cos θ1 θ2 l2 cos θ1 θ2 θ1 θ2 52 The lefthand side of Eq 52 represents the x and y components of the velocity of point B If the elements of the righthand side of the equation are multiplied by the corresponding angular velocities of the two links the velocity of point B can be found Next instead of deriving the components of the velocity directly from the velocity relationship we try to find the same by differentiating the equations that describe the position of point B as follows xB l1 cosθ1 l2 cos θ1 θ2 yB l1 sinθ1 l2 sin θ1 θ2 53 Differentiating Eq 53 with respect to the two variables θ1 and θ2 yields dxB l1 sinθ1dθ1l2 sin θ1 θ2 dθ1 dθ2 dyB l1 cosθ1dθ1 l2 cos θ1 θ2 dθ1 dθ2 54 and in matrix form dxB dyB l1 sinθ1l2 sin θ1 θ2 l2 sin θ1 θ2 l1 cosθ1 l2 cos θ1 θ2 l2 cos θ1 θ2 dθ1 dθ2 Differential Jacobian Differential motion of B motion of joints 55 Notice the similarities between Eqs 52 and 55 Although the two equations are similar in content and form the difference is that Eq 52 is the velocity relationship whereas Eq 55 is the differential motion relationship If both sides of Eq 55 are divided by dt since dxBdt isvBx and dθ1dt isθ1 etc they represent the same relationship Similarly in a robot with many degrees of freedom the joint differential motions or velocities can be related to the differential motion or velocity of the hand using the same technique 53 The Jacobian The Jacobian is a representation of the geometry of the elements of a mechanism in time In a robot it allows the conversion of differential motions or velocities of individual joints to differential motions or velo cities of points of interest eg the end effector It also relates the individual joint motions to overall mech anism motions The Jacobian is timerelated since the values of joint angles vary in time the magnitude of the elements of the Jacobian vary in time as well As shown in Figure 52 for a simple 2DOF mechanism if joint1 of the robot moves an angle of θ depend ing on the starting location and configuration of the mechanism the magnitude and direction of the resulting motion of point B at its end will be very different This dependence on the geometry of the mechanism is expressed by the Jacobian Therefore the Jacobian is a representation of the geometry and the interrelation ship between different parts of the mechanism and where they are at any given time Clearly as time goes on and the relative positions of the different parts of the mechanism change the Jacobian will also change Introduction to Robotics 174 As noted in Section 52 the Jacobian was formed from the position equations which were differentiated with respect to θ1 and θ2 Therefore the Jacobian can be calculated by taking the derivatives of each position equation with respect to all variables Suppose we have a set of equations yi in terms of a set of variables xj as yi fi x1x2x3xj 56 The differential change in yi as a result of a differential change in xj will be δy1 f1 x1 δx1 f1 x2 δx2 f1 xj δxj δy2 f2 x1 δx1 f2 x2 δx2 f2 xj δxj δyi fi x1 δx1 fi x2 δx2 fi xj δxj 57 Equation 57 can be written in matrix form representing the differential relationship between individual variables and the functions The matrix encompassing this relationship is the Jacobian as shown in Eq 58 Therefore the Jacobian can be calculated by taking the derivative of each equation with respect to all vari ables We apply the same principle for the calculation of the Jacobian of a robot δy1 δy2 δyi f1 x1 f1 x2 f1 xj f2 x1 fi x1 fi xj δx1 δx2 δxj or δyi fi xj δxj 58 o A B A B o A B θ1 θ1 θ1 o Resulting motion Resulting motion Resulting motion Figure 52 Resulting motions of the robot are dependent on the geometry of the robot Differential Motions and Velocities 175 Differentiating the position equations of a robot relates its joint differential motions to the differential motion of the hand frame dx dy dz δx δy δz Robot Jacobian dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 or D J Dθ 59 where dx dy dz in D represent the differential motions of the hand along the x y and zaxes δx δy δz in D represent the differential rotations of the hand around the x y and zaxes and Dθ represents the dif ferential motions of the joints As mentioned earlier if these two matrices are divided by dt they represent velocities instead of differential motions In this chapter we work with the differential motions rather than velocities knowing that in all relationships by simply dividing the differential motions by dt we get the velocities Example 51 The Jacobian of a robot at a particular time is given Calculate the linear and angular differential motions of the robots hand frame for the given joint differential motions J 20 0 0 0 0 0 7 0 1 0 0 0 0 15 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Dθ 0 0 1 0 0 1 0 05 0 03 Solution Substituting these matrices into Eq 59 we get D J Dθ 20 0 0 0 0 0 7 0 1 0 0 0 0 15 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 05 0 03 0 0 1 5 0 15 0 1 0 03 dx dy dz δx δy δz 54 Differential versus LargeScale Motions In our discussion of transformations so far we only considered rotations and translations that occurred indi vidually in a sequence not simultaneously For example we would consider a rotation of θ about an axis then a translation along an axis etc But what if transformations happen continually and simultaneously To understand the difference between the two lets consider the following scenario As shown in Figure 53a imagine that a mobile robot starts at the origin moves a distance of l along a straight line then rotates θ and ends up at point A Now imagine that the robot first rotates θ and then moves in a straight line as shown in Figure 53b ending up at point B Obviously although the final orientations are the same the robot follows a different path and ends up in a different location In both cases the Introduction to Robotics 176 transformations are sequential Now imagine that the robot rotates and translates the same amounts as before simultaneously as shown in Figure 53c Depending on the timing of both motions and depending on how fast each motion is the robot follows a different path and ends up in a different place The difference relates to the small motions that the robot makes relative to time and therefore is the basis for differential motion analysis The path and the final state of the robot are functions of differential motions or velocities and their sequence with respect to time The same analysis applies to manipulator robots depending on whether motions occur sequentially or simultaneously To plan and control the motions of the robot we need to involve its differential motions 55 Differential Motions of a Frame versus a Robot Suppose that a frame moves a differential amount relative to the reference frame We can either look at the differential motions of the frame without regard to what causes the motions or we can include the mech anism that causes the motion In the first case we will study the motions of the frame and the changes in the representation of the frame Figure 54a In the second case we analyze the differential motions of the mech anism that causes the motions and how it relates to the motions of the frame Figure 54b As you can see in Figure 54c the differential motions of the hand frame of the robot are caused by the differential motions in each of the joints of the robot As the joints of the robot move a differential amount the hand moves a dif ferential amount consequently moving the frame attached to it a differential amount In this way we relate the motions of the robot to the motions of the frame In reality this means the following suppose you have a robot welding two pieces together For best results the robot should move at a constant speed This means the differential motions of the hand frame must be defined to represent a constant speed in a particular direction This relates to the differential motion of a frame on the piece However the motion is caused by the robot it could actually be caused by something else we are using a robot so we must relate it to the robots motions Therefore we have to calculate the speeds of each and every joint at any instant such that the total motion caused by the robot will be equal to a b c l l A θ B θ θ l C Figure 53 Differential motions versus nondifferential motions y x z Robot y x z n o a n o a n o a n o a y x z Joint differential motions Hand differential motions Figure 54 a Differential motions of a frame b differential motions of the robot joints and the endplate c differential motions of a frame caused by the differential motions of a robot Differential Motions and Velocities 177 the desired speed of the frame In this section we will first study the differential motions of a frame Then we will study the differential motions of a robot mechanism Finally we will relate the two together 56 Differential Motions of a Frame Differential motions of a frame can be divided into the following Differential translations Differential rotations Differential transformations combinations of translations and rotations 561 Differential Translations A differential translation is the translation of a frame at differential values Therefore it can be represented by Transdxdydz This means the frame has moved a differential amount along the x y and zaxes Example 52 A frame B has translated a differential amount of Trans002 004 003 units Find its new location and orientation B 0 819 0 0 574 3 0 1 0 7 0 574 0 0 819 8 0 0 0 1 Solution Since the differential motion is only a translation the orientation of the frame should not be affected The new location of the frame is B 1 0 0 0 02 0 1 0 0 04 0 0 1 0 03 0 0 0 1 0 819 0 0 574 3 0 1 0 7 0 574 0 0 819 8 0 0 0 1 0 819 0 0 574 3 02 0 1 0 7 04 0 574 0 0 819 8 03 0 0 0 1 562 Differential Rotations about Reference Axes A differential rotation is a small rotation of the frame It is generally represented by Rotq dθ which means the frame has rotated an angle dθ about an axis q Specifically differential rotations about the x y and zaxes are defined by δx δy δz Since the rotations are small amounts we can use the following approximations sinδx δx in radians cosδx 1 The rotation matrices representing differential rotations about the x y and zaxes are Rot xδx 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 Rot y δy 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 Rot z δz 1 δz 0 0 δz 1 0 0 0 0 1 0 0 0 0 1 510 Introduction to Robotics 178 Similarly we can also define differential rotations about the current axes as Rot nδn 1 0 0 0 0 1 δn 0 0 δn 1 0 0 0 0 1 Rot o δo 1 0 δo 0 0 1 0 0 δo 0 1 0 0 0 0 1 Rot a δa 1 δa 0 0 δa 1 0 0 0 0 1 0 0 0 0 1 511 Notice that these matrices defy the rule we had established previously about the magnitude of unit vec tors For example 12 δx 2 1 However as you may remember a differential value is assumed to be very small In mathematics higherorder differentials are considered negligible and are usually neglected If we do neglect the higherorder differentials such as δx2 the magnitudes of the vectors remain acceptable As we have already seen if the order of multiplication of matrices changes the result will change as well Therefore in matrix multiplication maintaining the order of matrices is very important If we multiply two differential motions in different orders we expectedly get two different results as shown here Rot xδx Rot yδy 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 0 δy 0 δxδy 1 δx 0 δy δx 1 0 0 0 0 1 Rot yδy Rot xδx 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 δxδy δy 0 0 1 δx 0 δy δx 1 0 0 0 0 1 However if as before we set higherorder differentials such as δxδy to zero the results are exactly the same Consequently for differential motions the order of multiplication is no longer important and Rot xδx Rot yδy Rot yδy Rot xδx The same is true for any combinations of rotations about any axes You may remember from your dynamics course that largeangle rotations about different axes are not commutative and therefore cannot be added in different orders For example as we have already seen if you rotate an object 90 about the xaxis followed by a 90 rotation about the zaxis the result will be different if you reverse the order However velocities are commutative and can be added as vectors therefore Ω ωxi ωyj ωzk regardless of the order This is true because as we saw if we neglect the higherorder differentials the order of multiplication is unimportant Since velocities are in fact differential motions divided by time the same is true for velocities 563 Differential Rotation about a General Axis q Based on what we learned since the order of multiplication for differential rotations is not important we can multiply differential rotations in any order As a result we can assume that a differential rotation about a general axis q is composed of three differential rotations about the three axes in any order or dθ q δx i δy j δz k Figure 55 Differential Motions and Velocities 179 Consequently a differential motion about any general axis q can be expressed as Rot qdθ Rot xδx Rot yδy Rot zδz 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 δz 0 0 δz 1 0 0 0 0 1 0 0 0 0 1 1 δz δy 0 δxδy δz δxδyδz 1 δx 0 δy δxδz δx δyδz 1 0 0 0 0 1 512 If we neglect all higherorder differentials we get Rot qdθ Rot xδx Rot yδy Rot zδz 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 513 Example 53 Find the total differential transformation caused by small rotations about the three axes of δx 0 03 δy 0 04 δz 0 05 radians Solution Substituting the given rotations in Eq 513 we get Rot qdθ 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 1 0 05 0 04 0 0 05 1 0 03 0 0 04 0 03 1 0 0 0 0 1 q x z y δz δy δx dθ Figure 55 Differential rotations about a general axis q Introduction to Robotics 180 Note that the lengths of the three directional unit vectors are 1002 1002 and 1001 respectively If we assume that 005 radians about 2 9 is small differential these values are acceptably close to 1 Oth erwise we should use smaller values for differential angles smaller intervals 564 Differential Transformations of a Frame The differential transformation of a frame is a combination of differential translations and rotations in any order If we denote the original frame as T and assume that dT is the change in the frame T as a result of a differential transformation then T dT Trans dxdydz Rot qdθ T or dT Trans dxdydz Rot qdθ I T 514 where I is a unit matrix Equation 514 can be written as dT Δ T where Δ Trans dxdydz Rot qdθ I 515 Δ or simply Δ is called the differential operator It is the product of differential translations and rotations minus a unit matrix Multiplying a frame by the differential operator Δ yields the change in the frame The differential operator is found by multiplying the matrices and subtracting the unit matrix as follows Δ Trans dxdydz Rot qdθ I 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 516 As you see the differential operator is not a transformation matrix or a frame It does not follow the required format either it is only an operator and it yields the changes in a frame Example 54 Write the differential operator matrix for the following differential transformations dx 0 05 dy 0 03 dz 0 01 units and δx 0 02 δy 0 04 δz 0 06 radians Solution Substituting the given values into Eq 516 we get Δ 0 0 06 0 04 0 05 0 06 0 0 02 0 03 0 04 0 02 0 0 01 0 0 0 0 Differential Motions and Velocities 181 Example 55 Find the effect of a differential rotation of 001 radians about the yaxis followed by a differential translation of 003 0040 on the given frame B B 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 Solution As we saw before the change in the frame can be found by premultiplying the frame with the differ ential operator Substituting the given information and multiplying the matrices we will get dB Δ B 0 0 0 01 0 03 0 0 0 0 04 0 01 0 0 0 0 0 0 0 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 01 0 0 06 0 0 0 0 04 0 0 0 01 0 08 0 0 0 0 57 Interpretation of the Differential Change The matrix dT in Eqs 514 and 515 represents the changes in a frame as a result of differential motions The elements of this matrix are dT dnx dox dax dpx dny doy day dpy dnz doz daz dpz 0 0 0 0 517 The dB matrix in Example 55 represents the change in the frame B as shown in Eq 517 Therefore each element of the matrix represents the change in the corresponding element of the frame For example this means the frame moved a differential amount of 006 units along the xaxis 004 along the yaxis and a dif ferential amount of 008 along the zaxis It also rotated such that there was no change in its nvector there was a change of 001 in the ox component of the ovector and there was a change of 001 in the az com ponent of the avector The new location and orientation of the frame after the differential motions can be found by adding the change to the frame Tnew dT Told 518 Example 56 Find the location and the orientation of frame B from Example 55 after the move Solution The new location and orientation of the frame can be found by adding the changes to the original values The result is Bnew Boriginal dB 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 01 0 0 06 0 0 0 0 04 0 0 0 01 0 08 0 0 0 0 0 0 01 1 8 06 1 0 0 2 04 0 1 0 01 2 92 0 0 0 1 Introduction to Robotics 182 58 Differential Changes between Frames The differential operator Δ in Eq 515 represents a differential operator relative to the fixed reference frame and it is technically UΔ However it is possible to define another differential operator this time relative to the current frame itself TΔ that will enable us to calculate the same changes in the frame Since the differential operator relative to the frame is relative to a current frame to find the changes in the frame we must postmultiply the frame by TΔ as we did in Chapter 2 The result will be the same since both operations represent the same changes in the frame Then dT Δ T T TΔ T 1 Δ T T 1 T TΔ TΔ T 1 Δ T 519 Therefore Eq 519 can be used to calculate the differential operator relative to the frame TΔ We can multiply the matrices in Eq 519 and simplify the result as follows Assuming that the frame T is represented by an n o a p matrix we get T 1 nx ny nz p n ox oy oz p o ax ay az p a 0 0 0 1 and Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 T 1 Δ T TΔ 0 Tδz Tδy Tdx Tδz 0 Tδx Tdy Tδy Tδx 0 Tdz 0 0 0 0 520 As you see TΔ is made to look exactly like the Δ matrix but all elements are relative to the current frame where these elements are found from the previous multiplication of matrices and are summarized as follows Tδx δ n Tδy δ o Tδz δ a Tdx n δ p d Tdy o δ p d Tdz a δ p d 521 See Paul 1 for the derivation of the above equations Example 57 Find BΔ for Example 55 Solution We have the following vectors from the given information We substitute these values into Eq 521 to calculate vectors Bd and Bδ Differential Motions and Velocities 183 n 010 T o 001 T a 100 T p 823 T δ 00 010 T d 0 030 040 T δ p i j k 0 0 01 0 8 2 3 0 030 0 08 δ p d 0 030 0 08 0 03 0 04 0 0 060 04 0 08 Bdx n δ p d 0 0 06 1 0 04 0 0 08 0 04 Bdy o δ p d 0 0 06 0 0 04 1 0 08 0 08 Bdz a δ p d 1 0 06 0 0 04 0 0 08 0 06 Bδx δ n 0 0 0 01 1 0 0 0 01 Bδy δ o 0 0 0 01 0 0 1 0 Bδz δ a 0 1 0 01 0 0 0 0 Bd 0 04 0 080 06 and Bδ 0 0100 Substituting into Eq 520 yields BΔ 0 0 0 0 04 0 0 0 01 0 08 0 0 01 0 0 06 0 0 0 0 As you see these values for BΔ are not the same as Δ However postmultiplying the B matrix by BΔ will yield the same result dB as before Example 58 Calculate BΔ from Example 57 directly from the differential operator Solution Using Eq 519 we can calculate BΔ directly as BΔ B1 Δ B 0 1 0 2 0 0 1 3 1 0 0 8 0 0 0 1 0 0 0 01 0 03 0 0 0 0 04 0 01 0 0 0 0 0 0 0 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 0 0 04 0 0 0 01 0 08 0 0 01 0 0 06 0 0 0 0 which of course is the same result as in Example 57 Introduction to Robotics 184 59 Differential Motions of a Robot and Its Hand Frame In the previous section we saw the changes made to a frame as a result of differential motions This only relates to the frame changes not how they were accomplished In this section we relate the changes to the mechanism in this case the robot that moves the frame We will learn how the robots movements are translated into the frame changes at the hand We choose the hand frame of a robot as the frame of interest As the robot moves dT describes the changes in the components of the n o a and p vectors of the hand frame The change is a function of the robots design its instantaneous configuration and its instantaneous movements For example a simple 6axis revolute robot and the Stanford arm from Chapter 2 would require very different joint velocities for similar hand velocities since their configurations are different However for either robot whether the arm is completely extended or not whether it is pointed up or down and so on would translate into very different joint velocities for the same hand velocity As discussed before the Jacobian of the robot creates this link between the joint movements and the hand movement as dx dy dz δx δy δz Robot Jacobian dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 or D J Dθ 522 Notice how the elements of matrix D are the same information as in Δ relating the robot with the frame 510 Calculation of the Jacobian Each element in the Jacobian is the derivative of a corresponding kinematic equation with respect to one of the variables Referring to Eq 59 the first element in D is dx This means the first kinematic equa tion must represent movements along the xaxis which of course would be px In other words px expresses the motion of the hand frame along the xaxis consequently its derivative will be dx The same will be true for dy and dz Considering the n o a p matrix we may pick the corresponding ele ments of px py and pz and differentiate them to get dx dy and dz As an example consider the simple revolute arm from Example 225 The last column of the forward kin ematic equation of the robot is px py pz 1 C1 C234a4 C23a3 C2a2 S1 C234a4 C23a3 C2a2 S234a4 S23a3 S2a2 1 523 Taking the derivative of px yields px C1 C234a4 C23a3 C2a2 dpx px θ1 dθ1 px θ2 dθ2 px θ6 dθ6 dpx S1 C234a4 C23a3 C2a2 dθ1 C1 S234a4S23a3S2a2 dθ2 C1 S234a4S23a3 dθ3 C1 S234a4 dθ4 Differential Motions and Velocities 185 From this we can write the first row of the Jacobian as px θ1 J11 S1 C234a4 C23a3 C2a2 px θ2 J12 C1 S234a4S23a3S2a2 px θ3 J13 C1 S234a4S23a3 px θ4 J14 C1 S234a4 px θ5 J15 0 px θ6 J16 0 524 The same can be done for the next two rows However since there is no unique equation that describes the rotations about the axes we only have the components of the orientation vectors about the three axes there is no single equation available for differential rotations about the three axes namely δx δy and δz Therefore we have to calculate these differently In reality it is actually a lot simpler to calculate the Jacobian relative to T6 the last frame than it is to calculate it relative to the first frame As a result we instead use the following approach Paul 1 has shown that we can write the velocity equation relative to the last frame as T6D T6J Dθ 5 25 This means for the same joint differential motions premultiplied with the Jacobian relative to the last frame we get the hand differential motions relative to the last frame Paul 1 has also shown that we can calculate the Jacobian with respect to the last frame using the formulae in Eqs 526528 The differential motion relationship of Eq 525 can be written as T6dx T 6dy T 6dz T6δx T 6δy T 6δz T 6J11 T6J12 T6J16 T 6J21 T6J22 T6J26 T 6J31 T6J36 T 6J41 T6J46 T 6J51 T6J56 T 6J61 T6J66 dθ1 dθ2 dθ6 We use any A1A2An with corresponding n o a p vectors to derive the Jacobian If joint i under consideration is a revolute joint then T 6J1i nxpy nypx T6J2i oxpy oypx T6J3i axpy aypx T 6J4i nz J5i oz J6i az 5 26 If joint i under consideration is a prismatic joint then T6J1i nz T6J2i oz T6J3i az T6J4i 0 T 6J5i 0 T6J6i 0 5 27 Introduction to Robotics 186 For Eqs 526 and 527 for column i use i 1T 6 meaning For column 1 use oT 6 A1A2A3A4A5A6 For column 2 use 1T6 A2A3A4A5A6 For column 3 use 2T6 A3A4A5A6 For column 4 use 3T6 A4A5A6 For column 5 use 4T6 A5A6 For column 6 use 5T6 A6 5 28 Example 59 Using Eq 523 find the elements of the second row of the Jacobian for the simple revolute robot from Example 225 Solution For the second row of the Jacobian we differentiate py as follows py S1 C234a4 C23a3 C2a2 dpy py θ1 dθ1 py θ2 dθ2 py θ6 dθ6 dpy C1 C234a4 C23a3 C2a2 dθ1 S1 S234a4 dθ2 dθ3 dθ4 S23a3 dθ2 dθ3 S2a2 dθ2 Rearranging the terms yields py θ1 dθ1 J21dθ1 C1 C234a4 C23a3 C2a2 dθ1 py θ2 dθ2 J22dθ2 S1 S234a4S23a3S2a2 dθ2 py θ3 dθ3 J23dθ3 S1 S234a4S23a3 dθ3 py θ4 dθ4 J24dθ4 S1 S234a4 dθ4 py θ5 dθ5 J25dθ5 0 py θ6 dθ6 J26dθ6 0 Example 510 Find the T 6J11 and T6J41 elements of the Jacobian for the simple revolute robot Solution To calculate two elements of the first column of the Jacobian we need to use the A1A2A6 matrix From Example 225 we get Differential Motions and Velocities 187 RTH A1A2A3A4A5A6 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 C1 C234C5C6S234S6 S1S5C6 C1 C234C5C6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5C6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5C6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 Using the corresponding values of n o a and p and Eq 526 for revolute joints we get T 6J11 nxpy nypx C1 C234C5C6 S234S6 S1S5C6 S1 C234a4 C23a3 C2a2 S1 C234C5C6 S234S6 C1S5C6 C1 C234a4 C23a3 C2a2 S5C6 C234a4 C23a3 C2a2 T 6J41 nz S234C5C6 C234S6 5 29 As you see the results in Eqs 524 and 529 are different for the J11 elements This is because one is relative to the reference frame and the other is relative to the current or T6 frame 511 How to Relate the Jacobian and the Differential Operator Now that wehave seen the Jacobians and the differential operators separatelyweneedto relate the two together Suppose a robots joints are moved a differential amount Using Eq 59 and knowing the Jacobian we can calculate the D matrix that contains the differential motions of the hand dx dy dz δx δy δz These can be substituted in Eq 516 to form the differential operator Next Eq 515 can be used to calculate dT from which we calculate the new position and orientation of the robots hand Therefore the differential motions of the robots joints are ultimately related to the hand frame of the robot Alternately Eq 525 and the Jacobian can be used to calculate the T 6D matrix which contains the differential motions of the hand relative to the current frame T6dx T6dy T 6dz T 6δx T6δy T6δz These can be substituted in Eq 520 to form the differential operator T6Δ Next Eq 519 can be used to calculate dT the same as before Referring to Section 54 we saw that as the planar mobile robot simultaneously translates and rotates its intermediate and final positions should be calculated Similarly when a robot continuously moves depending on its instantaneous joint velocities the hand frames intermediate and final positions should be determined Introduction to Robotics 188 We can summarize the following procedure to continuously update the location and orientation of the final frame as the robot joints continue to move 1 Use D J Dθ to calculate the differential motions of the hand 2 Substitute dx dy dz δx δy δz into Δ and find dT Δ T 3 Calculate the new location and orientation of the hand frame Tnew Told dT 4 Update the Jacobian 5 Go to 1 A similar procedure can be written relative to the hand frame Example 511 The hand frame of a 5DOF robot its instantaneous numerical Jacobian and a set of differential motions are given The robot has a 2RP2R configuration Find the new location of the hand after the differential motion T6 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 J 3 0 0 0 0 2 0 1 0 0 0 4 0 0 0 0 1 0 1 0 1 0 0 0 1 dθ1 dθ2 ds3 dθ4 dθ5 0 1 0 1 0 05 0 1 0 Solution It is assumed that the robot can only rotate about the x and yaxes since it has only 5 DOF Using Eq 522 we calculate the D matrix which is then substituted into Eq 516 as follows D dx dy dz δx δy J Dθ 3 0 0 0 0 2 0 1 0 0 0 4 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 05 0 1 0 0 3 0 15 0 4 0 0 1 Δ 0 0 0 1 0 3 0 0 0 0 15 0 1 0 0 0 4 0 0 0 0 From Eq 515 we get dT6 Δ T6 0 0 0 1 0 3 0 0 0 0 15 0 1 0 0 0 4 0 0 0 0 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 0 0 1 0 0 1 0 0 0 0 15 0 1 0 0 0 1 0 0 0 0 Differential Motions and Velocities 189 The new location of the frame after the differential motion is T6 dT6 T6ORIGINAL 0 0 1 0 0 1 0 0 0 0 15 0 1 0 0 0 1 0 0 0 0 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 1 0 1 0 5 1 0 0 1 2 85 0 1 1 0 2 1 0 0 0 1 Example 512 The differential motions applied to a frame T1 described as D dx δy δz T and the resulting T2 positions and orientations of the end of a 3DOF robot are given The corresponding Jacobian is also given a Find the original frame T1 before the differential motions were applied to it b Find TΔ Is it possible to achieve the same resulting change in T1 by performing the differential motions relative to the frame D 0 01 0 02 0 03 T2 0 03 1 0 02 4 97 1 0 03 0 8 15 0 0 02 1 9 9 0 0 0 1 J 5 10 0 3 0 0 0 1 1 Solution Using Eqs 515 and 520 we get dT T2T1 Δ T1 T2 Δ I T1 and T1 Δ I 1 T2 Substituting the values from the D matrix into Δ adding I to it and then inverting it we get Δ 0 0 03 0 02 0 01 0 03 0 0 0 0 02 0 0 0 0 0 0 0 and Δ I 1 0 999 0 03 0 02 0 01 0 03 0 999 0 001 0 0003 0 02 0 001 1 0 002 0 0 0 1 and T1 0 1 0 5 1 0 0 8 0 0 1 10 0 0 0 1 approximately Introduction to Robotics 190 Then TΔ T 1 1 Δ T1 0 0 03 0 0 15 0 03 0 0 02 0 03 0 0 02 0 0 1 0 0 0 0 Since these differential motions relate to δx δz dx dy and dz requiring 5 DOF it is impossible to achieve the same results by performing the differential motions relative to the frame 512 The Inverse Jacobian In reality knowing the joint differential motions and using this information to find the differential motions of the hand frame has limited applications Instead we want to specify a differential motion rate velocity at the end frame which requires that we determine the instantaneous differential motion rate of each joint For example if a robot is laying glue on a plate it is necessary for it not only to follow a particular path on a flat plane but also to go at a constant speed Otherwise the glue will not be uniform and the operation will be useless In this case similar to the case with inverse kinematic equations where we have to divide the path into very small sections and calculate joint values at all times to make sure the robot follows a desired path we have to calculate joint velocities continuously in order to ensure that the robots hand maintains a desired velocity For this we need to calculate the inverse of the Jacobian and use it in the following equation D J Dθ J 1 D J 1 J Dθ Dθ J 1 D 530 and similarly T 6J 1 T 6D T6J 1 T6J Dθ Dθ T6J 1 T6D 5 31 This means that knowing the inverse of the Jacobian we can calculate how fast each joint must move so that the robots hand will yield a desired differential motion or velocity As we discussed earlier with the robot moving and its configuration changing the actual magnitudes of all elements of the Jacobian of a robot change continuously As a result although the symbolic equations describing the Jacobian remain the same their numerical values change Con sequently it is necessary to calculate the Jacobians numerical values continuously This means to calculate enough joint velocities per second to have accurate velocities the process must be very efficient and quick otherwise the motion will be inaccurate and useless Inverting the Jacobian may be done in two ways both are very difficult computationally intensive and time consuming considering that the Jacobian may be as large as 6 6 The first way is to find the symbolic inverse of the Jacobian and then substitute the values into it to compute the velocities The second technique is to substitute the numbers in the Jacobian and then invert the numerical matrix through techniques such as Gaussian elimination Although these are both possible they usually are not done Instead we may use the inverse kinematic equations to calculate the joint velocities Consider Eq 264 repeated here which yields the value of θ1 for the simple revolute robot pxS1pyC1 0 θ1 tan1 py px and θ1 θ1 180 2 64 Differential Motions and Velocities 191 We can differentiate the relationship to find dθ1 which is the differential value of θ1 as pxS1 pyC1 dpxS1 pxC1dθ1 dpyC1pyS1dθ1 dθ1 pxC1 pyS1 dpxS1 dpyC1 dθ1 dpxS1 dpyC1 pxC1 pyS1 532 Similarly from Eq 270 repeated here we get S234 C1ax S1ay C234az C234 dθ2 dθ3 dθ4 C1ax S1ay S234 axS1dθ1 C1dax ayC1dθ1 S1day S234 dθ2 dθ3 dθ4 az C234daz dθ2 dθ3 dθ4 S234 axS1dθ1C1daxayC1dθ1S1day C234daz C234 C1ax S1ay S234az 533 Equation 533 gives the combination of three differential motions in terms of known values but remem ber that we know dax day daz from the dT matrix and all the joint angles Next we differentiate Eq 266 to find a relationship for dθ3 as follows 2a2a3C3 pxC1 pyS1C234a4 2 pz S234a4 2a2 2a2 3 2a2a3S3dθ3 2 pxC1 pyS1C234a4 C1dpxpxS1dθ1 S1dpy pyC1dθ1 a4S234 dθ2 dθ3 dθ4 2 pz S234a4 dpz a4C234 dθ2 dθ3 dθ4 534 Although Eq 534 is long all elements in it are already known and dθ3 can be calculated Next differentiating Eq 272 we get S2 C3a3 a2 2 S2 3a2 3 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C2dθ2 C3a3 a2 2 S2 3a2 3 S2 2 C3a3 a2 a3S3dθ3 2a2 3S3C3dθ3 a3S3dθ3 pz S234a4 C3a3 a2 dpz a4C234 dθ2 dθ3 dθ4 a3C3dθ3 pxC1 pyS1C234a4 S3a3 dpxC1pxS1dθ1 dpyS1 pyC1dθ1 S234a4 dθ2 dθ3 dθ4 535 which yields dθ2 since all other elements are known This will also enable us to calculate dθ4 from Eq 533 Next we differentiate C5 from Eq 275 to get C5 C1ay S1ax S5dθ5 S1aydθ1C1day C1axdθ1 S1dax 536 which results in dθ5 Lastly we differentiate the 21 elements of Eq 277 to calculate dθ6 as S6 S234 C1nx S1ny C234nz C6dθ6 C234 C1nx S1ny dθ2 dθ3 dθ4 S234 S1nxdθ1 C1dnx C1nydθ1 S1dny S234nz dθ2 dθ3 dθ4 C234dnz 537 Introduction to Robotics 192 As you see there are six equations that result in six differential joint values from which velocities can be calculated The robot controller works with these six equations enabling it to quickly calculate velocities and run the robot joints accordingly Example 513 For the robot from Example 512 find the values of the joint differential motions for the three joints we will call them ds1 dθ2 dθ3 of the robot that caused the given frame change Solution From Eq 530 we get Dθ J 1 D 0 0 333 0 0 1 0 167 0 0 1 0 167 1 0 01 0 02 0 03 0 0067 0 0023 0 0323 Example 514 A camera is attached to the hand frame TH of a robot as given The corresponding inverse Jacobian of the robot at this location is also shown The robot makes a differential motion described as D 0 05 0 0 1 0 0 1 0 03 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the hand frame c Find the new location of the camera after the differential motion d Find how much the differential motions should have been instead if measured relative to frame TH to move the robot to the same new location as in part c TH 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Solution Substituting the values into the corresponding equations we get a Dθ J 1 D 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 05 0 0 1 0 0 1 0 03 0 05 0 2 0 0 1 0 0 08 From this we can tell that joints 1 2 4 and 6 need to move as shown Differential Motions and Velocities 193 b The change in the hand frame is dT Δ T 0 0 03 0 1 0 05 0 03 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 c The new location of the camera is Tnew Told dT 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 0 03 1 0 1 3 79 1 0 03 0 2 09 0 0 1 1 7 6 0 0 0 1 d TΔ T 1 Δ T T 1 dT TΔ 0 1 0 2 1 0 0 3 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 0 0 03 0 0 09 0 03 0 0 1 0 79 0 0 1 0 0 4 0 0 0 0 and therefore the differential motions relative to the frame will be TD 0 09 0 79 0 4 0 1 0 0 03 T Example 515 A spherical robot with joint values of β 0 γ 90 and r 5 units has moved a dif ferential amount D 0 1 0 0 1 0 05 0 0 1 T Differentiating elements of the Tsph matrix has yielded the following equations for the joint differential motions dβ d az sinβ dγ d oy sinγ dr d pz r sinβ dβ cosβ where daz represents a change in az etc a Write the differential operator matrix representing the differential motions b Find the initial position and orientation of the robot before the differential motion c Find the values of dβ dγ dr d Identify the elements of Tsph that could have been used to derive the equations given Solution a We substitute the differential motion values given into Δ to get Δ 0 0 1 0 0 1 0 1 0 0 05 0 0 0 05 0 0 1 0 0 0 0 b Substituting the given joint values into Eq 236 we get the initial position and orientation of the robot Introduction to Robotics 194 Tsph CβCγ Sγ SβCγ rSβCγ CβSγ Cγ SβSγ rSβSγ Sβ 0 Cβ rCβ 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 5 0 0 0 1 c We find the changes in the n o a p values from dT dT Δ T 0 1 0 0 0 1 0 0 1 0 05 0 25 0 05 0 0 0 1 0 0 0 0 and therefore d az 0 d oy 0 1 d pz 0 1 From preceding equations given we get dβ 00 undefined but basically zero dγ 0 11 0 1 and dr 0 1 5 0 0 1 0 1 d Elements 31 and 12 and 22 and 33 and 34 can be used for this purpose Example 516 The articulated robot arm from Example 226 is in the following configuration Cal culate the angular velocity of the first joint for the given values such that the hand frame will have the following linear and angular velocities dxdt 1 insec dydt 2 insec δxdt 0 1 radsec θ1 0 θ2 90 θ3 0 θ4 90 θ5 0 θ6 45 a2 15 a3 15 a4 5 The parameters of the robot are shown in Table 51 The robot is shown in Figure 56 Solution First we substitute these values into Eq 259 repeated here to obtain the final position and orien tation of the robot Please notice that the actual position and orientation of the robot depend on what is Table 51 Parameters for the robot from Example 226 θ d a α 1 θ1 0 0 90 2 θ2 0 a2 0 3 θ3 0 a3 0 4 θ4 0 a4 90 5 θ5 0 0 90 6 θ6 0 0 0 Differential Motions and Velocities 195 considered to be the reset rest position of the robot or from where an angle is measured Assuming that the reset position of this robot is along the xaxis then RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5C6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5C6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5C6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 RTH nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 707 0 707 0 5 0 0 1 0 0 707 0 707 0 30 0 0 0 1 Substituting the desired differential motion values into Eqs 515 and 516 we get Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 0 0 0 0 0 dT Δ T 0 0 0 1 0 0707 0 0707 0 5 0 0 0 1 0 0 0 0 0 z y x 1 2 3 z0 x0 z1 x1 z2 x2 z3 x4 x3 z4 z5 x5 z6 x6 a2 a3 a4 4 Figure 56 Reference frames for the simple 6DOF articulate robot Introduction to Robotics 196 Substituting the values from the dT and T matrices into Eq 532 we get dθ1 dt dpxS1 dpyC1 pxC1 pyS1 1 0 5 1 5 1 0 0 1 radsec Please note that the number given for θ5 causes a degenerate condition for the robot and as a result other angular velocities cannot be calculated for this configuration 513 Calculation of the Jacobian with ScrewBased Mechanics In the previous sections we derived the Jacobian of serial robots based on the DenavitHartenberg represen tation In this section we study how the Jacobian may be derived based on screw mechanics It should be mentioned here that the concept and use of Jacobians as discussed so far is general and applies the same way regardless of whether the Jacobian is derived with screwbased mechanics or the DH representation As was discussed in Section 53 the Jacobian is a representation of the instantaneous geometry of the robot elements Therefore we should expect that the Jacobian is related to the configuration of the joints and links which are in fact represented by the joint screw axes Consequently with the screw axes representing the direc tions and locations of the joints as shown in Figure 38 repeated each column of the Jacobian represents the instantaneous direction and location of the screw axes as they move in space due to the joint motions As a result we need to relate the instantaneous locations and directions of the screw axes relative to a reference frame as the robot joints move This is generally done by considering the rotation and translation matrices between the reference frame and the screw axes Therefore you may realize that once again we refer back to the transformation matrices that describe the motion of each joint as described by the nAn 1 matrices Denoting the Jacobian of the robot as J we can write ω v J Dθ 538 x y z S1 S2 ˆs2 ˆs1 Fixed base ˆs3 ˆs4 S3 S4 Figure 38 Repeated here Differential Motions and Velocities 197 where ω is the vector of angular velocities of the end effector with respect to the reference frame v is the vector of linear velocities of the end effector with respect to the reference frame and Dθ is the angular or linear velocities of the joints Notice the difference between our definition of matrix D from Eq 59 and from Eq 538 Each column of the screwbased Jacobian can be expressed as Jj sj OSj sj tjsj Jj 0 sj 539 For revolute joints For prismatic joints where ŝj is the instantaneous screw axis at each joint and ŝjx ŝjy ŝjz constitute elements J1j J2j J3j of the Jac obian OSj is the position vector of the instantaneous screw axis at each joint and tj is the pitch which is zero for purely revolute joints The three components of OSj sj tjsj constitute elements J4j J5j J6j of the Jaco bian This means for each joint we must determine the instantaneous screw axis and its position through the use of transformation matrices The reference frame against which we measure the location of the screw axes is arbitrary If we place the reference frame at the base of the robot as we have done so far the screw axis of each joint is affected by all the transformations of the joints before it For example in this case ŝ6 would be affected by θ1 θ2 θ3 θ4 θ5 We saw the same issue in Section 510 It turns out that if we base our measurements relative to a reference frame attached to an intermediate joint the third or fourth the calculations of the instantaneous screw axes and their locations will be easier 2 3 this is because in each direction the screw axes are only affected by some of the joint variables and therefore we have less coupling of the variables and transformation matrices This means that from the selected intermediate reference frame going forward is related to the forward transfor mation matrices while going back to the base involves the inverse of the transformation matrices In the presence of coinciding frames we may select the point of coincidence as the location of the reference frame Therefore to derive the Jacobian of a robot we first place a reference frame at a joint of our choosing from which we represent all screw axes 1 4 5 6 We then derive all the instantaneous screw axes and their loca tions relative to this intermediate reference frame To simplify the explanation of the process that we use to derive the Jacobian we first consider the following As we saw in Chapter 2 a transformation T consists of a rotation portion and a translation portion as n 1Tn nx ox ax Px ny oy ay Py nz oz az Pz 0 0 0 1 n 1Rn n 1Pn 0 1 5 40 where n represents a joint number and n 1Rn and n 1Pn represent the rotation and translation portions of the transformation matrix The reason we make this distinction is that the instantaneous orientations of the screw axes are in fact only affected by the rotation portion of each transformation not by its translation We therefore can use the simpler 3 3 subset of the transformation matrix n1Rn in our derivations It is actually possible to find each column of the Jacobian directly by multiplying the appropriate transfor mation matrices between the selected reference frame and the corresponding joint and multiplying the direc tion and location of the screw axis by the transformation However this requires multiplying a number of intermediate rotation matrices about all axes Instead the following is a systematic way of formulating the Jacobian using the familiar nAn 1 matrices we already have which makes it quicker and simpler We use the following equations to calculate the Jacobian Notice that each screw axis is found by pre multiplying it by the R portion of appropriate A matrices The vectors representing the screw axes are found by adding the vectors representing successive position vectors to each other Introduction to Robotics 198 Assuming that the intermediate reference frame is chosen to coincide with joint n remember that this coincides with zn1 of the DH representation and the screw axis ŝn we write 1 For the screw axis coincident with the intermediate reference frame with i n si 001 T and OSi 000 T 541 If a revolute joint calculate OSi si 2 For screw axes beyond joint n where i n 1n 2 si n1Ri1 0 0 1 T ri1 ai1 di1Sαi1 di1Cαi1 T OSi OSi1 n1Ri1 ri1 542 If a revolute joint calculate OSi si 3 For screw axes before joint n where i n1n2 si n 1Ri 1 0 0 1 T ri ai di Sαi diCαi T OSi OSi 1 n 1Ri ri 5 43 If a revolute joint calculate OSi si Substituting these values into Eq 539 yields the Jacobian To illustrate this we apply the method to a generic 6DOF articulated arm as shown in Figure 57 Screw axes are shown We choose to locate the intermediate reference frame zn xn aligned with z4 ŝ5 axis We assume the A matrices based on the DH representation and the para meters table for the robot are derived as follows We use the R portion of the A matrices Table 24 Repeated here θ d a α 01 θ1 0 0 90 12 θ2 0 a2 0 23 θ3 0 a3 0 34 θ4 0 a4 90 45 θ5 0 0 90 56 θ6 0 0 0 a2 xn zn xU zU ˆs3 ˆs1 ˆs5 ˆs4 ˆs2 ˆs6 a3 a4 Figure 57 A generic 6DOF articulated arm Differential Motions and Velocities 199 A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 S2 0 C2a2 S2 C2 0 S2a2 0 0 1 0 0 0 0 1 A3 C3 S3 0 C3a3 S3 C3 0 S3a3 0 0 1 0 0 0 0 1 A4 C4 0 S4 C4a4 S4 0 C4 S4a4 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 Joint 5 i 5 n 5 Since i and n are equal we use Eq 541 s5 001 T and OS5 000 T Since this is a revolute joint OS5 s5 i j k 0 0 0 0 0 1 0 0 0 Joint 6 i 6 n 5 We use Eq 542 s6 4R5 0 0 1 C5 0 S5 S5 0 C5 0 0 1 0 0 1 S5 C5 0 r5 0 0 0 T see parameters table OS6 OS5 4R5r5 0 0 0 C5 0 S5 S5 0 C5 0 0 1 0 0 0 0 0 0 Since this is a revolute joint OS6 s6 i j k 0 0 0 S5 C5 0 0 0 0 Joint 4 i 4 n 5 We use Eq 543 s4 4R3 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 0 0 1 0 1 0 r4 a4 d4Sα4 d4Cα4 T a4 0 0 OS4 OS5 4R4 r4 0 0 0 1 0 0 0 1 0 0 0 1 a4 0 0 a4 0 0 Introduction to Robotics 200 Since this is a revolute joint OS4 s4 i j k a4 0 0 0 1 0 0 0 a4 Joint 3 i 3 n 5 We use Eq 543 s3 4R2 0 0 1 T 4R3 3R2 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 0 0 1 0 1 0 r3 a3 d3Sα3 d3Cα3 T a3 0 0 OS3 OS4 4R3 r3 a4 0 0 C4 S4 0 0 0 1 S4 C4 0 a3 0 0 a3C4a4 0 a3S4 Since this is a revolute joint OS3 s3 i j k a3C4a4 0 a3S4 0 1 0 a3S4 0 a3C4 a4 Joint 2 i 2 n 5 We use Eq 543 s2 4R1 0 0 1 T 4R3 3R2 2R1 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 C2 S2 0 S2 C2 0 0 0 1 0 0 1 0 1 0 r2 a2 d2Sα2 d2Cα2 T a2 0 0 OS2 OS3 4R2 r2 a3C4 a4 0 a3S4 C34 S34 0 0 0 1 S34 C34 0 a2 0 0 a2C34 a3C4 a4 0 a2S34 a3S4 Since this is a revolute joint OS2 s2 i j k a2C34a3C4a4 0 a2S34 a3S4 0 1 0 a2S34 a3S4 0 a2C34 a3C4 a4 Differential Motions and Velocities 201 Joint 1 i 1 n 5 We use Eq 543 s1 4R0 0 0 1 T 4R3 3R2 2R1 1R0 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 C2 S2 0 S2 C2 0 0 0 1 C1 S1 0 0 0 1 S1 C1 0 0 0 1 S234 0 C234 r1 a1 d1Sα1 d1Cα1 T 0 0 0 OS1 OS2 4R1 r1 a2C34 a3C4 a4 0 a2S34 a3S4 C234 S234 0 0 0 1 S234 C234 0 0 0 0 a2C34 a3C4 a4 0 a2S34 a3S4 Since this is a revolute joint OS1 s1 i j k a2C34a3C4a4 0 a2S34 a3S4 S234 0 C234 0 a2C2 a3C23 a4C234 0 We substitute these values into Eq 539 with all revolute joints 5j S234 0 0 0 0 S5 0 1 1 1 0 C5 C234 0 0 0 1 0 0 a2S34 a3S4 a3S4 0 0 0 a2C2 a3C23 a4C234 0 0 0 0 0 0 a2C34 a3C4 a4 a3C4 a4 a4 0 0 544 Notice how the Jacobian represents the effect of each joint on the rest of the system beyond itself Multi plying this Jacobian with the joint angular velocities yields the angular and linear velocities of the hand frame with respect to the intermediate reference frame as 5ωx S234θ1 S5θ6 5ωy θ2 θ3 θ4 C5θ6 5ωz C234θ1 θ5 5vx a2S34θ2 a3S4 θ2 θ3 5vy a2C2 a3C23 a4C234 θ1 5vz a2C34 a3C4 a4 θ2 a3C4 a4 θ3 a4θ5 5 45 Later we use these equations to derive the inverse velocity relationships Example 517 Derive the Jacobian of the Stanford arm from Examples 34 and 227 shown in Figure 310 repeated here with modified frames The A matrices and the parameters table are also repeated here A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 0 S2 0 S2 0 C2 0 0 1 0 d2 0 0 0 1 A3 1 0 0 0 0 1 0 0 0 0 1 d3 0 0 0 1 Introduction to Robotics 202 A4 C4 0 S4 0 S4 0 C4 0 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 Solution This time we place the intermediate reference frame on joint 4 such that the zaxis will be coincident with ŝ4 which is the same as z3 We systematically use Eqs 541543 on the joints as appropriate Joint 4 i 4 n 4 Since i and n are equal we use Eq 541 s4 001 T and OS4 000 T Since this is a revolute joint OS4 s4 i j k 0 0 0 0 0 1 0 0 0 z y ˆs6 ˆs5 ˆs4 ˆs2 ˆs1 x ˆs3 l2 d3 t Figure 310 repeated here with modified frames Table 26 The parameters table for the Stanford arm repeated θ d a α 01 θ1 0 0 90 12 θ2 d2 0 90 23 0 d3 0 0 34 θ4 0 0 90 45 θ5 0 0 90 56 θ6 0 0 0 Differential Motions and Velocities 203 Joint 5 i 5 n 4 Since this joint is forward of the reference frame we use Eq 542 s5 3R4 0 0 1 C4 0 S4 S4 0 C4 0 1 0 0 0 1 S4 C4 0 r4 0 0 0 T see parameters table OS5 OS4 3R4r4 0 0 0 C4 0 S4 S4 0 C4 0 1 0 0 0 0 0 0 0 Since this is a revolute joint OS5 s5 i j k 0 0 0 S4 C4 0 0 0 0 Joint 6 i 6 n 4 Since this is also forward of the reference frame we use Eq 542 s6 3R5 0 0 1 T C4C5 S4 C4S5 S4C5 C4 S4S5 S5 0 C5 0 0 1 C4S5 S4S5 C5 r5 0 0 0 T OS6 OS5 0 0 0 0 0 0 Since this is a revolute joint OS6 s6 i j k 0 0 0 C4S5 S4S5 C5 0 0 0 Joint 3 i 3 n 4 Since this is before Joint 4 we use Eq 543 s3 3R2 0 0 1 T 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 r3 0 0 d3 T OS3 OS4 3R3 r3 0 0 0 1 0 0 0 1 0 0 0 1 0 0 d3 0 0 d3 Introduction to Robotics 204 Since this is a prismatic joint we do not need to calculate the cross product Joint 2 i 2 n 4 We use Eq 543 s2 3R1 0 0 1 T 3R22R1 0 0 1 1 0 0 0 1 0 0 0 1 C2 S2 0 0 0 1 S2 C2 0 0 0 1 0 1 0 r2 0 d2 0 T OS2 OS3 3R2 r2 0 0 d3 1 0 0 0 1 0 0 0 1 0 d2 0 0 d2 d3 Since this is a revolute joint OS2 s2 i j k 0 d2 d3 0 1 0 d3 0 0 Joint 1 i 1 n 4 We use Eq 543 s1 3R0 0 0 1 T 3R22R11R0 0 0 1 1 0 0 0 1 0 0 0 1 C2 S2 0 0 0 1 S2 C2 0 C1 S1 0 0 0 1 S1 C1 0 0 0 1 S2 0 C2 r1 0 0 0 T OS1 OS2 3R1 r1 0 d2 d3 Since this is a revolute joint OS1 s1 i j k 0 d2 d3 S2 0 C2 d2C2 d3S2 d2S2 The Jacobian of the Stanford arm relative to the intermediate reference frame is 4J S2 0 0 0 S4 C4S5 0 1 0 0 C4 S4S5 C2 0 0 1 0 C5 d2C2 d3 0 0 0 0 d3S2 0 0 0 0 0 d2S2 0 1 0 0 0 Differential Motions and Velocities 205 514 The Inverse Jacobian for the ScrewBased Method As we have discussed previously in most cases what we need to do is calculate the joint velocities for a desired endplate velocity which requires the inverse of the Jacobian matrix Although we may attempt to invert the Jacobian it is not an easy task Instead we use the forward differentialmotion equations to derive a set of joint velocity relationships Referring to Eq 545 for the articulated 6axis robot from Section 513 we can manipulate the equations to derive direct relationships for each joint velocity as follows θ1 5vy a2C2 a3C23 a4C234 θ5 5ωz C234θ1 θ6 5ωxS234θ1 S5 θ234 5ωyC5θ6 θ2 θ3 θ23 5vzS345vxC34θ234a4S34 a3S3 θ2 5vxa3S4θ23 a2S34 θ3 θ23θ2 θ4 θ234θ23 515 Calculation of the Jacobians of Parallel Robots The basic concepts related to the Jacobian of a parallel robot are similar to our discussion so far the Jacobian is a representation of the instantaneous geometry of the robot affecting its velocity and the Jacobian multi plied by the joint velocities yields the velocities of the moving platform However we deal with multiple closed loops In this case the Jacobian may be derived using a number of different methods including force decomposition screw coordinates and vectorloop methods 3 7 8 We will only consider the vectorloop method In this method we write the vector loops as before and we differentiate each loop equation to find the differential motion equations from which we form the Jacobian In Section 53 we differentiated Eq 56 which described the motions of the end frame as a result of joint variables in order to derive the Jacobian Here we should realize that since we are dealing with closed loops each equation describing the input joint variables qj and the resulting motions of the moving platform yj is equal to zero or fi yjqj 0 546 Differentiating these equations we find fi yj y fi qj q or Jy y Jq q 547 As you see there are two Jacobians relating the inputs and outputs To make the nomenclatures similar we use y D and q Dθ to denote the vectors of the moving platform motions and the joint variables We combine the two Jacobians as follows Jq 1 Jy D Jq 1 Jq Dθ Dθ Jq 1 Jy D J D 548 Introduction to Robotics 206 We will derive the Jacobians of a planar parallel robot and a generic StewartGough platform to see how this works 5151 The Jacobian of a Planar 3RRR Parallel Robot Figure 58 shows a 3RRR planar robot For each of the three loops we write Pi ci ai bi 549 We differentiate each loop vector equation in order to form the Jacobian Remember that the derivative of a vector includes the change in its magnitude as well as the change in its direction which is perpendicular to the direction of the vector and it is a function of how fast the vector rotates Therefore we can say d dtP P ω P Using this notation we can differentiate Eq 549 to get Pi θ k ci αi k ai αi βi k bi 550 Note the following a The derivative of vector P only has a magnitude which is the velocity of the center of the platform because the rotation of the platform does not affect the velocity of its center b The derivatives of vectors ā b and c only come from the rotation of the platform because the lengths are constant c Since the robot is planar all rotations are about the vertical k axis The direction of the velocity is perpendicular to the vector as expressed by the cross product x y A1 A3 A2 C1 C3 C2 B1 β1 β2 β3 α2 α3 θ α1 B3 B2 P n o a3 a2 a1 b1 b2 b3 O c3 c2 c1 Figure 58 A generic 3RRR planar parallel robot Differential Motions and Velocities 207 Since linkages BiCi are inactive we desire to eliminate angular velocities βi by taking the dot product of the vectors of Eq 550 by a vector that is perpendicular to these angular velocities namely bi Since a b c b c a c a b and denoting Pi Vo velocity of the center of the moving platform we get bi Vo bi θ k ci bi αi k ai bi Vo θk ci bi αik ai bi 551 Note that since this is a planar mechanism the zcomponents of all positions and velocities are zero We expand each part of Eq 551 by taking the dot and cross products to get bix biy biz Vox Voy 0 θk i j k cix ciy 0 bix biy 0 αik i j k aix aiy 0 bix biy 0 bixVox biyVoy θ biycixbixciy αi aixbiyaiybix for i 123 552 Equation 552 can be written in a matrix form as b1x b1y b1yc1xb1xc1y b2x b2y b2yc2xb2xc2y b3x b3y b3yc3xb3xc3y Vox Voy θ a1xb1ya1yb1x 0 0 0 a2xb2ya2yb2x 0 0 0 a3xb3ya3yb3x α1 α2 α3 553 Or as in Eq 547 Jy b1x b1y b1yc1xb1xc1y b2x b2y b2yc2xb2xc2y b3x b3y b3yc3xb3xc3y and Jq a1xb1ya1yb1x 0 0 0 a2xb2ya2yb2x 0 0 0 a3xb3ya3yb3x 554 Substituting instantaneous geometric values into the Jacobians and knowing the joint angular velocities allows us to calculate the linear and angular velocities of the platform or vice versa Singularity or degen eration conditions can also be inferred from these Jacobians Whenever the determinant of either Jacobian is zero the robot is in a singular or degenerate condition losing or gaining a degree of freedom For Jq this happens when any of the diagonal terms are equal to zero as a result of links AiBi and BiCi aligning or folding over each other rendering the determinant equal to zero At this instant the platform can make differential motions without the links moving or the links can move a differential amount without moving the platform For Jy the determinant is zero when links BiCi become coincident At that instant the platform can make a differential rotation with the links rotating freely 5152 The Jacobian of a Generic 66 StewartGough Parallel Robot Figure 59 shows a generic 66 StewartGough platform The joint velocities relate to the changes in the lengths of the six linkages The output is the linear velocities of the center of the platform and angular velo cities about the reference axes Similar to the planar robot case in Section 5151 we write six loop equations and differentiate them to form the Jacobian as follows Introduction to Robotics 208 P bi ai di for i 1 6 P ωb bi di ωdi di 555 Note the following P is the change in the length of P which is the same as the velocity of the center of the platform VP The rotations of the platform have no effect on the center of the platform ωb is the angular velocity of the platform Lengths bi are constant ai are fixed therefore they have no derivatives ωdi are the angular velocities of the arms Since the angular velocities of the arms ωdi are not controlled we desire to eliminate them by taking the dot product of Eq 555 with the unit vector along the arm di di VP di ωb bi di di di ωdi di Since a b c b c a c a b we get di VP ωb bi di di 556 Referring to Eq 547 we can form the Jacobian by expanding the terms of Eq 556 as d1x d1y d1z b1 d1 T d2x d2y d2z b2 d2 T d3x d3y d3z b3 d3 T d6x d6y d6z b6 d6 T VPx VPy VPz ωbx ωby ωbz I d1 d2 d3 d6 557 xo yo zo A1 A2 A3 A4 A5 A6 B1 B2 B3 B4 B5 B6 d1 P b1 a1 O P ˆd1 Figure 59 A generic 66 StewartGough parallel robot Differential Motions and Velocities 209 The Jacobian is a 6 6 matrix with all known values Therefore knowing the desired platform velocities the joint velocities can be calculated 516 Design Projects 5161 The 3DOF Robot This is a continuation of the design project we started in the previous chapters If you designed a 3DOF robot and if you developed its forward and inverse kinematic equations you can now continue with the project In this part of the project you may continue with the differential motion calculations of the robot Using the forward and inverse kinematic equations calculate the forward and inverse differential motions of your robot Since this is a 3DOF robot the calculations are relatively easy Remember that with 3 DOF you can only position the hand of the robot but you may not pick a desired orientation Similarly you can only calculate three differential motion equations that are relative to the three axes or dpx dpy and dpz From Eq 286 we can derive an expression for dθ1 as follows tan θ1 px py pxC1 pyS1 d px C1pxS1 d θ1 d py S1pyC1 d θ1 d θ1 pxS1 pyC1 d py S1d px C1 d θ1 d py S1 d px C1 pxS1pyC1 You may continue deriving equations for the other two joints With these equations if you eventually build your robot and if you use actuators that respond to velocity control commands such as a servomotor or a stepper motor you will be able to control the velocity of the robot relative to the three axes Since in this process you may have calculated the Jacobian of your robot as well you may use it to find whether there are any degenerate points in its workspace Do you expect to have any degenerate points We will continue with this project in the next chapters 5162 The 3DOF Mobile Robot Similarly if you designed a 3DOF mobile robot you may either differentiate its position and orientation equations and use them for controlling the robots velocity or differentiate the inverse equations directly to derive the same In either case these equations allow you to relate the joint differential motions with the differential motions of the robot 517 Summary In this chapter we first discussed the differential motions of a frame and the effects of these motions on the frame and its location and orientation Later we discussed the differential motions of a robot and how the differential motions of the robots joints are related to the differential motions of the robots hand We then related the two together Through this we can calculate how fast a robots hand moves in space if the joint velocities are known We also discussed inverse differential motion equations of a robot Using these equa tions we can determine how fast each joint of a robot must move in order to generate a desired hand velocity Together with the inverse kinematic equations of motion we can control both the motions and the velocity of a multiDOF robot in space We can also follow the location of the hand frame as it moves in space We also Introduction to Robotics 210 studied the derivation of the Jacobians based on screw mechanics as well as the Jacobians of parallel robots Although these were somewhat different in derivation the basic concepts were the same In the next chapter we will continue with the derivation of dynamic equations of motion Through this we can design and choose appropriate actuators that are capable of running the robot joints at desired velocities and accelerations References 1 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 2 Hunt K H Robot KinematicsA Compact Analytic Inverse Solution for Velocities ASME Journal of Mechanisms Transmissions and Automation in Design 1987 vol 109 no 1 pp 4249 3 Waldron KJ SL Wang SJ Bolin A Study of the Jacobian Matrix of Serial Manipulators ASME Journal of Mechanisms Transmissions and Automation in Design vol 107 no 2 pp 230238 4 Ribeiro L R Guenther D Matrins ScrewBased Relative Jacobian for Manipulators Cooperating in a Task ABCM Symposium Series in Mechatronics 2008 vol 3 pp 276285 5 Tonetto C C Rocha A Dias Kinematic Programming for Two Cooperating Robots Performing Tasks ABCM Symposium Series in Mechatronics 2014 vol 6 pp 578587 6 Wu A Z Shi Y Li M Wu Y Guan J Zhang H Wei Formal Kinematic Analysis of a General 6R Manipulator Using the Screw Theory Mathematical Problems in Engineering vol 2015 article ID 549797 7 Tsai LungWen Robot Analysis John Wiley and Sons 1999 8 Simaan Nabil Analysis and Synthesis of Parallel Robots for Medical Applications research thesis The Technion Israel Institute of Technology 1999 Problems 51 Suppose the location and orientation of a hand frame are expressed by the following matrix What is the effect of a differential rotation of 015 radians about the zaxis followed by a differential translation of 01 01 03 Find the new location of the hand RTH 0 0 1 2 1 0 0 7 0 1 0 5 0 0 0 1 52 As a result of applying a set of differential motions to frame T shown it has changed an amount dT as shown Find the magnitude of the differential changes made dx dy dz δx δy δz and the differential operator with respect to frame T T 1 0 0 5 0 0 1 3 0 1 0 8 0 0 0 1 dT 0 0 1 0 1 0 6 0 1 0 0 0 5 0 1 0 0 0 5 0 0 0 0 Differential Motions and Velocities 211 53 Suppose the following frame was subjected to a differential translation of d 1 0 0 5 units and a dif ferential rotation of δ 0 0 1 0 a What is the differential operator relative to the reference frame b What is the differential operator relative to the frame A A 0 0 1 10 1 0 0 5 0 1 0 0 0 0 0 1 54 The initial location and orientation of a robots hand are given by T1 and its new location and orien tation after a change are given by T2 a Find a transformation matrix Q that will accomplish this transform in the Universe frame b Assuming the change is small find a differential operator Δ that will do the same c By inspection find a differential translation and a differential rotation that constitute this operator T1 1 0 0 5 0 0 1 3 0 1 0 6 0 0 0 1 T2 1 0 0 1 4 8 0 1 0 1 3 5 0 1 0 6 2 0 0 0 1 55 Using the transformation matrix for a spherical robot a Differentiate proper elements of the matrix to develop a set of symbolic equations for the joint dif ferential motions of the robot and write the corresponding Jacobian Use the joint variables in r β γ order b For the robot the three components of the velocity of the hand frame are given here Find the cor responding three joint velocities at this instant x 0 05 unitssec y 0 1 unitssec z 0 05 units sec r 5 units β 45 γ 45 T Cβ Cγ Sγ Sβ Cγ rSβ Cγ Cβ Sγ Cγ Sβ Sγ rSβ Sγ Sβ 0 Cβ rCβ 0 0 0 1 56 The differential motions applied to a frame T1 described as D dxδyδz T and the resulting T2 posi tions and orientations of the end of a 3DOF robot are given The Jacobian is given too a Find the original frame T1 before the differential motions were applied to it b Find TΔ c Is it possible to achieve the same resulting change in T1 by performing the differential motions rel ative to the frame d Find the values of the joint differential motions for the three joints we will call them ds1 dθ2 dθ3 of the robot that caused the given frame change D 0 01 0 02 0 03 T2 0 03 1 0 02 4 97 1 0 03 0 8 15 0 0 02 1 9 9 0 0 0 1 J 5 10 0 3 0 0 0 1 1 Introduction to Robotics 212 57 A 3DOF robot is shown with joint variables l2 θ1 θ3 a Write three equations that describe its motions b Find the Jacobian of the robot in dpx dpy dα J dθ1 dl2 dθ3 c Find the inverse Jacobian of the robot 58 The hand frame of a robot and the corresponding Jacobian are given For the given differential changes of the joints compute the change in the hand frame its new location and the corresponding Δ T6 0 1 0 10 1 0 0 5 0 0 1 0 0 0 0 1 T 6J 8 0 0 0 0 0 3 0 1 0 0 0 0 10 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Dθ 0 0 1 0 1 0 2 0 2 0 59 Two consecutive frames describe the old T1 and new T2 positions and orientations of the end of a 3 DOF robot The corresponding Jacobian relative to T1 relating to T1dz T 1δx T 1δz is also given Find the values of the joint differential motions ds1 dθ2 dθ3 of the robot that caused the given frame change T 1 0 0 1 8 1 0 0 5 0 1 0 2 0 0 0 1 T2 0 0 01 1 8 1 1 0 05 0 5 0 05 1 0 01 2 0 0 0 1 T 1J 5 10 0 3 0 0 0 1 1 l1 l2 x y θ1 θ2 θ3 α Figure P57 Differential Motions and Velocities 213 510 Two consecutive frames describe the old T1 and new T2 positions and orientations of the end of a 3DOF robot The corresponding Jacobian relating to dz δx δz is also given Find the values of the joint differential motions ds1 dθ2 dθ3 of the robot that caused the given frame change T1 0 0 1 10 1 0 0 5 0 1 0 3 0 0 0 1 T2 0 05 0 1 9 75 1 0 1 0 05 5 2 0 1 1 0 3 7 0 0 0 1 J 5 10 0 3 0 0 0 1 1 511 A camera is attached to the hand frame T of a robot as given The corresponding inverse Jacobian of the robot at this location is also given The robot makes a differential motion as a result of which the change in the frame dT is recorded as given a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values associated with this move d Find how much the differential motions of the handframe TD should have been instead if meas ured relative to frame T to move the robot to the same new location as in part a T 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 512 A camera is attached to the hand frame T of a robot as given The corresponding inverse Jacobian of the robot relative to the frame at this location is also given The robot makes a differential motion as a result of which the change dT in the frame is recorded as given a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values Dθ associated with this move T 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 TJ 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 0 02 0 0 1 0 7 0 0 02 0 0 08 0 0 1 0 0 3 0 0 0 0 513 A camera is attached to the hand frame T6 of a robot as given The corresponding inverse Jacobian of the robot relative to the frame at this location is also given The robot makes a differential motion as a result of which the change dT in the frame is recorded as given You must show all your work a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values Dθ associated with this move Introduction to Robotics 214 T6 0 1 0 2 1 0 0 4 0 0 1 6 0 0 0 1 T 6J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 6 0 02 0 0 1 0 8 0 0 02 0 0 05 0 0 1 0 0 3 0 0 0 0 514 The Jacobian of a robot at a particular time is given Calculate the linear and angular differential motions of the robots hand frame for the given joint differential motions J 2 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 1 Dθ 0 0 1 0 1 0 0 0 02 515 The hand frame TH of a robot is given The corresponding inverse Jacobian of the robot at this location relative to this frame is also shown The robot makes a differential motion relative to this frame described as THD 0 05 0 0 1 0 0 1 0 1 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the frame c Find the new location of the frame after the differential motion d Find how much the differential motions given should have been if measured relative to the Universe to move the robot to the same new location as in part c T H 0 1 0 3 1 0 0 3 0 0 1 8 0 0 0 1 THJ 1 5 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 516 The hand frame T of a robot is given The corresponding inverse Jacobian of the robot at this location is also shown The robot makes a differential motion described as D 0 05 0 0 1 0 0 1 0 1 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the frame c Find the new location of the frame after the differential motion d Find how much the differential motions given should have been if measured relative to frame T to move the robot to the same new location as in part c Differential Motions and Velocities 215 T 0 1 0 3 1 0 0 3 0 0 1 8 0 0 0 1 J 1 5 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 517 Calculate the T6J21 element of the Jacobian for the revolute robot from Example 226 518 Calculate the T6J16 element of the Jacobian for the revolute robot from Example 226 519 Using Eq 234 differentiate proper elements of the matrix to develop a set of symbolic equations for the joint differential motions of a cylindrical robot and write the corresponding Jacobian 520 Using Eq 237 differentiate the proper elements of the matrix to develop a set of symbolic equations for the joint differential motions of a spherical robot and write the corresponding Jacobian 521 For a cylindrical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 01 insec α 005 radsec l 02 insec r 15 in α 30 l 10 in 522 For a spherical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 2 insec β 005 radsec γ 01 radsec r 20 in β 60 γ 30 523 For a spherical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 1 unitsec β 1 radsec γ 1 radsec r 5 units β 45 γ 45 524 For a cylindrical robot the three components of the velocity of the hand frame are given for a cor responding location Find the required three joint velocities that will generate the given hand frame velocity x 1insec y 3insec z 5insec α 45 r 20in l 25 in 525 For a spherical robot the three components of the velocity of the hand frame are given for a corre sponding location Find the required three joint velocities that will generate the given hand frame velocity x 5insec y 9 insec z 6insec β 60 r 20in γ 30 Introduction to Robotics 216 526 Calculate the Jacobian of the 3DOF robot shown The intermediate reference frame is placed at joint 2 527 For the robot from Problem 526 derive the direct joint velocity relationships 528 Derive the Jacobian of the 3RPR robot shown x l1 l2 l3 ˆs3 ˆs1 ˆs2 y θ1 θ2 θ3 z Figure P526 b a c1 c3 c2 n o θ x y A1 P A2 A3 O3 O2 O d3 d1 d2 c1 c2 c3 Figure P528 Differential Motions and Velocities 217 1 6 Dynamic and Force Analysis 61 Introduction In previous chapters we studied the kinematics of position and differential motions of robots In this chapter we look at the dynamics of serial robots as it relates to accelerations loads masses and inertias We also study the static force relationships of serial robots As you may remember from your dynamics course in order to be able to accelerate a mass we need to exert a force on it Similarly to cause an angular acceleration in a rotating body a torque must be exerted on it Figure 61 as F m a and T I α 61 To accelerate a robots links it is necessary to have actuators capable of exerting large enough forces and torques on the links and joints to move them at a desired acceleration and velocity Otherwise the links may not be moving as fast as necessary and consequently the robot may not maintain its desired positional accu racy To calculate how strong each actuator must be it is necessary to determine the dynamic relationships that govern the motions of the robot These relationships are the forcemassacceleration and the torque inertiaangularacceleration equations Based on these equations and considering the external loads on the robot the designer can calculate the largest loads to which the actuators may be subjected thereby designing the actuators that can deliver the necessary forces and torques In general the dynamic equations may be used to find the equations of motion of mechanisms This means that by knowing the forces and torques we can predict how a mechanism will move However in our case we have already found the equations of motion besides in all but the simplest cases solving the dynamic equa tions of multiaxis 3D robots is very complicated and involved Instead we use these equations to find what forces and torques may be needed to induce desired accelerations in the robots joints and links These equa tions are also used to analyze the effects of different inertial loads on the robot and depending on the desired accelerations whether certain loads are important As an example consider a robot in space Although objects are weightless in space they do have inertia As a result the weight of an object that a robot handles T F Σ Σ α m a I Figure 61 Forcemassacceleration and torqueinertiaangularacceleration relationships for a rigid body 219 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed in space may be trivial but its inertia is not As long as the movements are very slow a light robot may be able to move very large loads in space with little effort This is why the very slender robots used in the Space Shut tle program were able to handle very large satellites The dynamic equations allow the designer to investigate the relationship between different elements of the robot and design its components appropriately In general techniques such as Newtonian mechanics can be used to find the dynamic equations for robots However due to the fact that robots are 3D and multiDOF mechanisms with distributed masses it is very difficult to use Newtonian mechanics Instead we opt to use other techniques such as Lagrangian mechanics which is based on energy terms only and therefore in many cases is easier to use Although Newtonian mechanics and other techniques can be used for this derivation most references are based on Lagrangian mechanics In this chapter we briefly study Lagrangian mechanics with some examples and then we see how it can be used to solve for robot equations Since this is an introductory book these equations will not be completely derived only the results will be demonstrated and discussed Interested readers are encouraged to refer to other references for more detail 1 2 3 4 5 6 7 62 Lagrangian Mechanics A Short Overview Lagrangian mechanics is based on the differentiation of the systems energy terms with respect to the systems variables and time as follows For simple cases it may take longer to use this technique than Newtonian mechanics However as the complexity of the system increases the Lagrangian method becomes relatively simpler to use Lagrangian mechanics is based on the following two generalized equations one for linear motions and one for rotational motions First we define a Lagrangian as L K P 62 where L is the Lagrangian K is the kinetic energy of the system and P is the potential energy of the sys tem Then Fi t L xi L xi 63 Ti t L θi L θi 64 where Fi is the summation of all external forces Ti is the summation of all external torques and θi and xi are system variables As a result in order to get the equations of motion we need to derive the systems energy equations and differentiate the Lagrangian according to Eqs 63 and 64 The following five examples demonstrate the application of Lagrangian mechanics in deriving equations of motion Notice how the com plexity of the terms increases as the number of DOF and variables increases Example 61 Derive the forceacceleration relationship for the 1DOF system shown in Figure 62 using both Lagrangian mechanics as well as Newtonian mechanics Assume the wheels have negligible inertia k x F m Figure 62 Schematic of a simple cartspring system Introduction to Robotics 220 Solution The xaxis denotes the motion of the cart and is the only variable in this system Since this is a 1DOF system there is only one equation describing the motion Because the motion is linear we use only Eq 63 as follows K 1 2mv2 1 2mx2 and P 1 2kx2 L K P 1 2mx2 1 2kx2 The derivatives of the Lagrangian are L x mx and d dt mx mx and L x kx Therefore the equation of motion for the cart will be F mx kx To solve the problem with Newtonian mechanics we draw the freebody diagram of the cart Figure 63 and solve for forces as follows F ma F kx max F max kx which is exactly the same result For this simple system it appears that Newtonian mechanics is simpler Example 62 Derive the equations of motion for the 2DOF system shown in Figure 64 x kx mg R F ma Figure 63 Freebody diagram for the cartspring system θ k m1 m2 x l T F Figure 64 Schematic of a cartpendulum system Dynamic and Force Analysis 221 Solution In this problem there are 2 DOF two coordinates x and θ and two equations of motion one for the linear motion of the system and one for the rotation of the pendulum The kinetic energy of the system comprises the kinetic energies of the cart and the pendulum Notice that the velocity of the pendulum is the summation of the velocity of the cart and of the pendulum relative to the cart or vp vc vpc x i lθ cosθ i lθ sinθ j x lθ cosθ i lθ sinθ j and v2 p x lθcosθ 2 lθsinθ 2 We find K Kcart Kpendulum Kcart 1 2m1x2 Kpendulum 1 2m2 x lθcosθ 2 lθsinθ 2 K 1 2 m1 m2 x2 1 2m2 l2θ 2 2lθx cosθ Likewise the potential energy is the summation of the potential energy in the spring and in the pen dulum or P 1 2kx2 m2gl 1cosθ Notice that the zeropotentialenergy line datum is chosen at θ 0 The Lagrangian is L K P 1 2 m1 m2 x2 1 2m2 l2θ 2 2lθx cosθ 1 2kx2m2gl 1cosθ The derivatives and the equations of motion related to the linear motion are L x m1 m2 x m2lθ cosθ d dt L x m1 m2 x m2lθ cosθm2lθ 2 sinθ L x kx F m1 m2 x m2lθ cosθm2lθ 2 sinθ kx and for the rotational motion they are L θ m2l2θ m2lx cosθ d dt L θ m2l2θ m2lx cosθm2lxθ sinθ L θ m2glsinθm2lθx sinθ T m2l2θ m2lx cosθ m2gl sinθ Introduction to Robotics 222 If we write the two equations of motion in matrix form we get F m1 m2 x m2lθ cosθm2lθ 2 sinθ kx T m2l2θ m2lx cosθ m2glsinθ F T m1 m2 m2l cosθ m2l cosθ m2l2 x θ 0 m2l sinθ 0 0 x2 θ 2 kx m2gl sinθ 65 Example 63 Derive the equations of motion for the 2DOF system shown in Figure 65 Solution Notice that this example is somewhat more similar to a robot except that the mass of each link is assumed to be concentrated at the end of each link and there are only 2 DOF However in this example we will see many more acceleration terms as we would expect to see with robots including centripetal and Coriolis accelerations We follow the same format as before First we calculate the kinetic and potential energies of the sys tem as follows K K1 K2 where K1 1 2m1l1 2θ1 2 To calculate the kinetic energy of the mass at B first we write the position equation for m2 at B and subsequently we differentiate it for the velocity xB l1 sinθ1 l2 sin θ1 θ2 l1S1 l2S12 yB l1C1l2C12 xB l1C1θ1 l2C12 θ1 θ2 yB l1S1θ1 l2S12 θ1 θ2 θ1 θ2 x y l1 l2 m1 m2 o A B T1 T2 Figure 65 A twolink mechanism with concentrated masses Dynamic and Force Analysis 223 Since v2 x2 y2 we get v2 B l1 2θ1 2 S2 1 C2 1 l2 2 θ1 2 θ2 2 2θ1θ2 S2 12 C2 12 2l1l2 C1C12 S1S12 θ1 2 θ1θ2 l1 2θ1 2 l2 2 θ1 2 θ2 2 2θ1θ2 2l1l2C2 θ1 2 θ1θ2 The kinetic energy for the mass at B is K2 1 2m2l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 The total kinetic energy is K 1 2 m1 m2 l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 With the datum zero potential energy at point o the potential energy of the system can be written as P1 m1gl1C1 P2 m2gl1C1m2gl2C12 P P1 P2 m1 m2 gl1C1m2gl2C12 The Lagrangian for the system is L K P 1 2 m1 m2 l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 m1 m2 gl1C1 m2gl2C12 The derivatives of the Lagrangian are L θ1 m1 m2 l1 2θ1 m2l2 2 θ1 θ2 2m2l1l2C2θ1 m2l1l2C2θ2 d dt L θ1 m1 m2 l1 2 m2l2 2 2m2l1l2C2 θ1 m2l2 2 m2l1l2C2 θ2 2m2l1l2S2θ1θ2m2l1l2S2θ2 2 L θ1 m1 m2 gl1S1m2gl2S12 From Eq 64 the first equation of motion is T1 m1 m2 l1 2 m2l2 2 2m2l1l2C2 θ1 m2l2 2 m2l1l2C2 θ2 2m2l1l2S2θ1θ2m2l1l2S2θ2 2 m1 m2 gl1S1 m2gl2S12 Introduction to Robotics 224 Similarly L θ2 m2l2 2 θ1 θ2 m2l1l2C2θ1 d dt L θ2 m2l2 2 θ1 θ2 m2l1l2C2θ1m2l1l2S2θ1θ2 L θ2 m2l1l2S2 θ1 2 θ1θ2 m2gl2S12 T2 m2l2 2 m2l1l2C2 θ1 m2l2 2θ2 m2l1l2S2θ1 2 m2gl2S12 Writing these two equations in matrix form we get T1 T2 m1 m2 l1 2 m2l2 2 2m2l1l2C2 m2l2 2 m2l1l2C2 m2l2 2 m2l1l2C2 m2l2 2 θ1 θ2 0 m2l1l2S2 m2l1l2S2 0 θ1 2 θ 2 2 m2l1l2S2 m2l1l2S2 0 0 θ1θ2 θ2θ1 m1 m2 gl1S1 m2gl2S12 m2gl2S12 66 First note how much more complicated and involved these equations of motion are compared to Example 62 Also note that in Eq 66 the θ terms are related to the angular accelerations of the links the θ 2 terms are centripetal accelerations and the θ1θ2 terms are Coriolis accelerations It should be mentioned here that the Coriolis acceleration was originally derived for cases where a linear motion occurs within a rotating frame consequently the direction of the linear velocity changes and creates the Coriolis term In this case although both velocities are angular nevertheless there is a motion within a rotating frame that causes the θiθj terms In this book as is also customary in avionics we refer to these terms as Coriolis acceleration In this example the first link acts as a rotating frame for link 2 and therefore Coriolis acceleration is present whereas in Example 62 the cart is not rotating and therefore there is no Coriolis acceleration Based on this we should expect to have multiple Cor iolis acceleration terms for a multiaxis 3D manipulator arm because each link acts as a rotating frame for the links succeeding it Example 64 Using the Lagrangian method derive the equations of motion for the 2DOF robot arm shown in Figure 66 The center of mass for each link is at the center of the link The moments of inertia are I1 and I2 Solution The solution of this example robot arm is in fact similar to the solution of Example 63 However in addition to a change in the coordinate frames the two links have distributed masses requiring the use of moments of inertia in the calculation of the kinetic energy We follow the same steps as before First we calculate the velocity of the center of mass of link 2 by differentiating its position xD l1C1 0 5l2C12 xD l1S1θ10 5l2S12 θ1 θ2 yD l1S1 0 5l2S12 yD l1C1θ1 0 5l2C12 θ1 θ2 Dynamic and Force Analysis 225 Therefore the total velocity of the center of mass of link 2 is v2 D x2 D y2 D θ2 1 l2 1 0 25l2 2 l1l2C2 θ2 2 0 25l2 2 θ1θ2 0 5l2 2 l1l2C2 67 The total kinetic energy of the system is the sum of the kinetic energies of links 1 and 2 Remembering that the kinetic energy for a link rotating about a fixed point for link 1 and about the center of mass for link 2 is given in Eq 68 we get K K1 K2 1 2IAθ2 1 1 2ID θ1 θ2 2 1 2m2v2 D 1 2 1 3m1l2 1 θ2 1 1 2 1 12m2l2 2 θ1 θ2 2 1 2m2v2 D 68 Substituting Eq 67 into Eq 68 and rearranging we get K θ 2 1 1 6m1l2 1 1 6m2l2 2 1 2m2l2 1 1 2m2l1l2C2 θ2 2 1 6m2l2 2 θ1θ2 1 3m2l2 2 1 2m2l1l2C2 69 The potential energy of the system is the sum of the potential energies of the two links P m1g l1 2 S1 m2g l1S1 l2 2 S12 610 The Lagrangian for the twolink robot arm is L K P θ 2 1 1 6m1l2 1 1 6m2l2 2 1 2m2l2 1 1 2m2l1l2C2 θ2 2 1 6m2l2 2 θ1θ2 1 3m2l2 2 1 2m2l1l2C2 m1g l1 2 S1m2g l1S1 l2 2 S12 Taking the derivatives of the Lagrangian and substituting the terms into Eq 64 yields the following two equations of motion A B m1 m2 l1 I1 l2 I2 x0 y0 y1 x1 C D θ2 θ1 T1 T2 Figure 66 A 2DOF robot arm Introduction to Robotics 226 T1 1 3m1l2 1 m2l2 1 1 3m2l2 2 m2l1l2C2 θ1 1 3m2l2 2 1 2m2l1l2C2 θ2 m2l1l2S2 θ1θ2 1 2m2l1l2S2 θ 2 2 1 2m1 m2 gl1C1 1 2m2gl2C12 611 T2 1 3m2l2 2 1 2m2l1l2C2 θ1 1 3m2l2 2 θ2 1 2m2l1l2S2 θ2 1 1 2m2gl2C12 612 Equations 611 and 612 can be written in matrix form as T1 T2 1 3m1l2 1 m2l2 1 1 3m2l2 2 m2l1l2C2 1 3m2l2 2 1 2m2l1l2C2 1 3m2l2 2 1 2m2l1l2C2 1 3m2l2 2 θ1 θ2 0 1 2m2l1l2S2 1 2m2l1l2S2 0 θ 2 1 θ 2 2 m2l1l2S2 0 0 0 θ1θ2 θ2θ1 1 2m1 m2 gl1C1 1 2m2gl2C12 1 2m2gl2C12 613 Example 65 Using the Lagrangian method derive the equations of motion for the 2DOF polar robot arm shown in Figure 67 The center of mass for each link is at the center of the link The moments of inertia are I1 and I2 Solution Note that in this case we have a prismatic joint We denote the distance from the base of the robot to the center of the outer arm as r which serves as one of the two variables The total length of the arm is r l22 As before we derive the Lagrangian and take the proper derivatives as follows θ1 A B m1 m2 l1 I1 l2 I2 x0 y0 C D r T1 F Figure 67 A 2DOF polar robot arm Dynamic and Force Analysis 227 K K1 K2 K1 1 2I1Aθ 2 1 2 1 3m1l1 2θ 2 1 6m1l1 2θ 2 xD rCθ xD rCθrθSθ yD rSθ yD rSθ rθCθ and v2 D r2 r2θ 2 K2 1 2I2Dθ 2 1 2m2v2 D 1 2 1 12m2l2 2θ 2 1 2m2 r2 r2θ 2 K 1 6m1l1 2 1 24m2l2 2 1 2m2r2 θ 2 1 2m2r2 P m1g l1 2 Sθ m2grSθ L 1 6m1l1 2 1 24m2l2 2 1 2m2r2 θ 2 1 2m2r2 m1g l1 2 m2gr Sθ d dt L θ 1 3m1l1 2 1 12m2l2 2 m2r2 θ 2m2rθ L θ m1g l1 2 m2gr Cθ T 1 3m1l1 2 1 12m2l2 2 m2r2 θ 2m2rrθ m1g l1 2 m2gr Cθ 614 d dt L r m2r L r m2rθ 2m2gSθ F m2r m2rθ 2 m2gSθ 615 Writing these two equations in matrix form we get T F 1 3m1l1 2 1 12m2l2 2 m2r2 0 0 m2 θ r 0 0 m2r 0 θ 2 r2 m2r m2r 0 0 rθ θr m1g l12 m2gr Cθ m2gSθ 616 Introduction to Robotics 228 63 Effective Moments of Inertia To simplify the writing of the equations of motion Eqs 65 66 613 or 616 can be rewritten in sym bolic form as follows Ti Tj Dii Dij Dji Djj θi θj Diii Dijj Djii Djjj θi 2 θ2 j Diij Diji Djij Djji θiθj θjθi Di Dj 617 In this equation which is written for a 2DOF system a coefficient in the form of Dii is known as the effective inertia at joint i such that an acceleration at joint i causes a torque at joint i equal to Diiθi A coefficient in the form Dij is known as the coupling inertia between joints i and j as an acceleration at joint i or j causes a torque at joint j or i equal to Dijθjor Djiθi Dijjθ2 j terms represent centripetal forces acting at joint i due to a velocity at joint j All terms with θiθj represent Coriolistype accelerations the influence of one rotating frame on another and when multiplied by corresponding inertias represent Coriolis forces The remaining terms in the form Di represent gravity forces at joint i 64 Dynamic Equations for MultipleDOF Robots As you see the dynamic equations for a 2DOF system are much more complicated than a 1DOF system Similarly these equations for a multipleDOF spatial robot are very long and complicated but can be found by calculating the kinetic and potential energies of the links defining the Lagrangian and differentiating the Lagrangian equation with respect to the joint variables The following is a summary of this procedure For more information see 1 2 3 4 5 6 7 641 Kinetic Energy As you may remember from your dynamics course 8 the kinetic energy of a rigid body in 3D motion Figure 68a is K 1 2mvG 2 1 2ω hG 618 where hG is the angular momentum of the body about G The kinetic energy of a rigid body in plane motion Figure 68b simplifies to K 1 2mvG 2 1 2Iω2 619 ω G hG ω G vG a b Figure 68 A rigid body in 3D motion and in plane motion Dynamic and Force Analysis 229 Therefore we need to derive expressions for the velocity of a point on a rigid body eg the center of mass G as well as the moments of inertia The velocity of a point on a robots link can be defined by differentiating the position equation of the point which in our notation is expressed by a frame relative to the robots base RTP Here we use the DH trans formation matrices Ai to find the velocity terms for points along the robots links In Chapter 2 we defined the transformation between the hand frame and the base frame of the robot in terms of the A matrices as RTH RT 1 1T2 2T3n1Tn A1A2A3An 2 55 For a 6axis robot this equation can be written as 0T 6 0T1 1T2 2T 35T6 A1A2A3A6 620 Referring to Eq 253 the derivative of an Ai matrix for a revolute joint with respect to its joint variable θi is Ai θi d θi Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 Sθi CθiCαi CθiSαi aiSθi Cθi SθiCαi SθiSαi aiCθi 0 0 0 0 0 0 0 0 621 This matrix can be broken into a constant matrix Qi and the Ai matrix such that Sθi CθiCαi CθiSαi aiSθi Cθi SθiCαi SθiSαi aiCθi 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 622 or Ai θi QiAi 623 Similarly the derivative of an Ai matrix for a prismatic joint with respect to its joint variable di is Ai di di Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 624 which as before can be broken into a constant matrix Qi and the Ai matrix such that 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 625 or Ai θi QiAi 626 Introduction to Robotics 230 In both Eqs 623 and 626 the Qi matrices are always constant as shown and can be summarized as Qi revolute 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Qi prismatic 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 627 Using qi to represent the joint variables θ1 θ2 for revolute joints and d1 d2 for prismatic joints and extending the same differentiation principle to the 0Ti matrix of Eq 620 with multiple joint variables θi and di differentiated with respect to only one variable qj results in Uij 0Ti qj A1A2 Aj Ai qj A1A2 QjAj Ai j i 628 Note that since 0Ti is differentiated only with respect to one variable qj there is only one Qj Higherorder derivatives can similarly be formulated from Uijk Uijqk 629 Lets see how this method works before we continue with this subject Example 66 Find the expression for the derivative of the transformation of the fifth link of the Stan ford arm relative to the base frame with respect to the second and third joint variables Solution The Stanford arm is a spherical robot where the second joint is revolute and the third joint is prismatic Therefore 0T5 A1A2A3A4A5 U52 0T5 θ2 A1Q2A2A3A4A5 U53 0T5 d3 A1A2Q3A3A4A5 where Q2 and Q3 are as defined in Eq 627 Example 67 Find an expression for U635 of the Stanford arm Solution 0T6 A1A2A3A4A5A6 U63 0T6 d3 A1A2Q3A3A4A5A6 U635 U63 q5 A1A2Q3A3A4A5A6 q5 A1A2Q3A3A4Q5A5A6 Dynamic and Force Analysis 231 We now continue with the derivation of the velocity term for a point on a link of a robot We denote ri to represent a point on any link i of the robot relative to frame i Notice that this length is measured relative to frame i as it becomes an important issue soon The position of the point can be expressed by premultiplying the vector with the transformation matrix representing its frame or pi RT iri 0Tiri 630 The velocity of the point is a function of the velocities of all the joints q1q2q6 Therefore differentiating Eq 630 with respect to all the joint variables qj yields the velocity of the point as vi d dt 0Tiri i j 1 0Ti qj dqj dt ri i j 1 Uij dqi dt ri 631 The kinetic energy of an element of mass dmi on a link is dKi 1 2 v2 i dmi 1 2 x2 i y2 i z2 i dmi 632 The velocity term can be formalized from the following vivT i xi yi zi xi yi zi xi 2 xiyi xizi yixi yi 2 yizi zixi ziyi zi 2 and Trace vivT i Trace xi 2 xiyi xizi yixi yi 2 yizi zixi ziyi zi 2 xi 2 yi 2 zi 2 633 Combining Eqs 631633 yields the following equation for the kinetic energy of the element dKi 1 2 Trace i p 1 Uip dqp dt ri i r 1 Uir dqr dt ri T dmi 634 where p and r represent the different joint numbers This allows us to add the contributions made to the final velocity of a point on any link i from other joints movements Integrating this equation and rearranging it yields the total kinetic energy as Ki dKi 1 2 Trace i p 1 i r 1 Uip riri T dmi Uir Tqpqr 635 Writing ri in terms of its coordinates relative to its frame we can derive the following terms ri xi yi zi 1 rT i xi yi zi 1 rirT i xi2 xiyi xizi xi xiyi yi2 yizi yi xizi yizi zi2 zi xi yi zi 1 Introduction to Robotics 232 Therefore riri T dmi xi yi zi 1 xi yi zi 1 dmi xi 2dmi xiyidmi xizidmi xidmi xiyidmi yi 2dmi yizidmi yidmi xizidmi yizidmi zi 2dmi zidmi xidmi yidmi zidmi dmi 636 Notice that the inertia tensor is usually a 3 3 tensor However as we have done throughout this book we use homogeneous matrices 4 4 or 4 1 to facilitate pre and postmultiplication Using a 4 1 position matrix in Eq 636 results in a 4 4 inertia matrix including first moments and the mass Therefore this is called a pseudo inertia matrix Through the following manipulations of Eq 636 it is possible to derive the pseudo inertia matrix as shown 2x2 x2 x2 y2y2 z2z2 x2 1 2 y2 z2 x2 z2 x2 y2 Ixx y2 z2 dm Iyy x2 z2 dm Izz x2 y2 dm Ixy xydm Ixz xzdm Iyz yzdm mx xdm my ydm mz zdm then x2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 Ixx Iyy Izz y2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 IxxIyy Izz z2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 Ixx IyyIzz Therefore Eq 636 can be written as Ji 1 2 Ixx Iyy Izz i Iixy Iixz mixi Iixy 1 2 IxxIyy Izz i Iiyz miyi Iixz Iiyz 1 2 Ixx IyyIzz i mizi mixi miyi mizi mi 637 Since this matrix is independent of joint angles and velocities it must be evaluated only once Substituting Eq 636 into Eq 635 results in the final form for kinetic energy of the robot manipulator as K 1 2 n i 1 i p 1 i r 1 Trace Uip Ji Uir T qpqr 638 Dynamic and Force Analysis 233 The kinetic energy of the actuators can also be added to this equation Assuming that each actuator has an inertia of Iiact the kinetic energy of the actuator will be 1 2Ii act qi 2 and the total kinetic energy of the robot is K 1 2 n i 1 i p 1 i r 1 Trace Uip Ji Uir T qpqr 1 2 n i 1 Ii act qi 2 639 642 Potential Energy The potential energy of the system is the sum of the potential energies of each link and can be written as P n i 1 Pi n i 1 mig T 0Tiri 640 where g T gx gy gz 0 is the gravity matrix and ri is the location of the center of mass of a link relative to the frame representing the link Obviously the potential energy must be a scalar quantity and therefore gT which is a 1 4 matrix when multiplied by the position vector 0Tiri which is a 4 1 matrix will yield a single scalar quantity Also notice that the values in the gravity matrix are dependent on the orientation of the reference frame 643 The Lagrangian The Lagrangian can be written as L K P 1 2 n i 1 i p 1 i r 1 Trace UipJiUir T qpqr 1 2 n i 1 Ii act qi 2 n i 1 mig T 0Tiri 641 644 Robots Equations of Motion The Lagrangian can now be differentiated in order to form the dynamic equations of motion Although this process is not shown the final equations of motion for a general multiaxis robot can be summarized as follows Ti n j 1 Dijqj Ii act qi n j 1 n k 1 Dijkqjqk Di 642 where Dij n p max ij Trace UpjJpU T pi 643 Dijk n p max ijk Trace UpjkJpU T pi 644 and Di n p i mpg TUpirp 645 Introduction to Robotics 234 In Eq 642 the first part is the angular accelerationinertia terms the second part is the actuator inertia term the third part is the Coriolis and centripetal terms and the last part is the gravity term This equation can be expanded for a 6axis revolute robot as follows Ti Di1θ1 Di2θ2 Di3θ3 Di4θ4 Di5θ5 Di6θ6 Ii act θi Di11θ 2 1 Di22θ 2 2 Di33θ 2 3 Di44θ 2 4 Di55θ 2 5 Di66θ 2 6 Di12θ1θ2 Di13θ1θ3 Di14θ1θ4 Di15θ1θ5 Di16θ1θ6 Di21θ2θ1 Di23θ2θ3 Di24θ2θ4 Di25θ2θ5 Di26θ2θ6 Di31θ3θ1 Di32θ3θ2 Di34θ3θ4 Di35θ3θ5 Di36θ3θ6 Di41θ4θ1 Di42θ4θ2 Di43θ4θ3 Di45θ4θ5 Di46θ4θ6 Di51θ5θ1 Di52θ5θ2 Di53θ5θ3 Di54θ5θ4 Di56θ5θ6 Di61θ6θ1 Di62θ6θ2 Di63θ6θ3 Di64θ6θ4 Di65θ6θ5 Di 646 Notice that in Eq 646 there are two terms with θ1θ2 and θ2θ1 The two coefficients are Di12 and Di21 To see what these terms look like lets calculate them for i 5 From Eq 644 for D512 we have i 5 j 1 k 2 n 6 p 5 and for D521 we have i 5 j 2 k 1 n 6 p 5 resulting in D512 Trace U512J5U T 55 Trace U612J6U T 65 D521 Trace U521J5U T 55 Trace U621J6U T 65 647 From Eq 628 we have U51 A1A2A3A4A5 θ1 Q1A1A2A3A4A5 U512 U 51 2 Q1A1A2A3A4A5 θ2 Q1A1Q2A2A3A4A5 U52 A1A2A3A4A5 θ2 A1Q2A2A3A4A5 U521 U 52 1 A1Q2A2A3A4A5 θ1 Q1A1Q2A2A3A4A5 648 U61 A1A2A3A4A5A6 θ1 Q1A1A2A3A4A5A6 U612 U 61 2 Q1A1A2A3A4A5A6 θ2 Q1A1Q2A2A3A4A5A6 U62 A1A2A3A4A5A6 θ2 A1Q2A2A3A4A5A6 U621 U 62 1 A1Q2A2A3A4A5A6 θ1 Q1A1Q2A2A3A4A5A6 Note that in these equations Q1 and Q2 are the same The indices are only used to clarify the relationship with the derivatives Substituting the result from Eq 648 into Eq 647 shows that D512 D521 Clearly the summation of the two similar terms yields the corresponding θ1θ2 acceleration terms This is true for all similar coefficients in Eq 646 Therefore we can simplify this equation for all joints as follows T1 D11θ1 D12θ2 D13θ3 D14θ4 D15θ5 D16θ6 I1 act θ1 D111θ 2 1 D122θ 2 2 D133θ 2 3 D144θ 2 4 D155θ 2 5 D166θ 2 6 2D112θ1θ2 2D113θ1θ3 2D114θ1θ4 2D115θ1θ5 2D116θ1θ6 2D123θ2θ3 2D124θ2θ4 2D125θ2θ5 2D126θ2θ6 2D134θ3θ4 2D135θ3θ5 2D136θ3θ6 2D145θ4θ5 2D146θ4θ6 2D156θ5θ6 D1 649 Dynamic and Force Analysis 235 T2 D21θ1 D22θ2 D23θ3 D24θ4 D25θ5 D26θ6 I2 act θ2 D211θ 2 1 D222θ 2 2 D233θ 2 3 D244θ 2 4 D255θ 2 5 D266θ 2 6 2D212θ1θ2 2D213θ1θ3 2D214θ1θ4 2D215θ1θ5 2D216θ1θ6 2D223θ2θ3 2D224θ2θ4 2D225θ2θ5 2D226θ2θ6 2D234θ3θ4 2D235θ3θ5 2D236θ3θ6 2D245θ4θ5 2D246θ4θ6 2D256θ5θ6 D2 650 T3 D31θ1 D32θ2 D33θ3 D34θ4 D35θ5 D36θ6 I3 act θ3 D311θ 2 1 D322θ 2 2 D333θ 2 3 D344θ 2 4 D355θ 2 5 D366θ 2 6 2D312θ1θ2 2D313θ1θ3 2D314θ1θ4 2D315θ1θ5 2D316θ1θ6 2D323θ2θ3 2D324θ2θ4 2D325θ2θ5 2D326θ2θ6 2D334θ3θ4 2D335θ3θ5 2D336θ3θ6 2D345θ4θ5 2D346θ4θ6 2D356θ5θ6 D3 651 T4 D41θ1 D42θ2 D43θ3 D44θ4 D45θ5 D46θ6 I4 act θ4 D411θ 2 1 D422θ 2 2 D433θ 2 3 D444θ 2 4 D455θ 2 5 D466θ 2 6 2D412θ1θ2 2D413θ1θ3 2D414θ1θ4 2D415θ1θ5 2D416θ1θ6 2D423θ2θ3 2D424θ2θ4 2D425θ2θ5 2D426θ2θ6 2D434θ3θ4 2D435θ3θ5 2D436θ3θ6 2D445θ4θ5 2D446θ4θ6 2D456θ5θ6 D4 652 T5 D51θ1 D52θ2 D53θ3 D54θ4 D55θ5 D56θ6 I5 act θ5 D511θ 2 1 D522θ 2 2 D533θ 2 3 D544θ 2 4 D555θ 2 5 D566θ 2 6 2D512θ1θ2 2D513θ1θ3 2D514θ1θ4 2D515θ1θ5 2D516θ1θ6 2D523θ2θ3 2D524θ2θ4 2D525θ2θ5 2D526θ2θ6 2D534θ3θ4 2D535θ3θ5 2D536θ3θ6 2D545θ4θ5 2D546θ4θ6 2D556θ5θ6 D5 653 T6 D61θ1 D62θ2 D63θ3 D64θ4 D65θ5 D66θ6 I6 act θ6 D611θ 2 1 D622θ 2 2 D633θ 2 3 D644θ 2 4 D655θ 2 5 D666θ 2 6 2D612θ1θ2 2D613θ1θ3 2D614θ1θ4 2D615θ1θ5 2D616θ1θ6 2D623θ2θ3 2D624θ2θ4 2D625θ2θ5 2D626θ2θ6 2D634θ3θ4 2D635θ3θ5 2D636θ3θ6 2D645θ4θ5 2D646θ4θ6 2D656θ5θ6 D6 654 Substituting the numerical values related to the robot in these equations yields the equations of motion for the robot These equations can also show how each term can affect the dynamics of the robot or whether a particular term is important or not For example in the absence of gravity such as in space the gravity terms may be neglected However inertia terms will be important On the other hand if a robot moves slowly many terms in these equations that relate to centripetal and Coriolis θjθk accelerations may be negligible In gen eral using these equations the robot can be properly designed and controlled Example 68 Using the previous equations derive the equations of motion for the 2DOF robot arm from Example 64 shown in Figure 69 The two links are assumed to be of equal length Solution To use the earlier equations of motion for a 2DOF robot we first write the A matrices for the two links and then we develop the Dij Dijk and Di terms for the robot Finally we substitute the results into Introduction to Robotics 236 Eqs 649 and 650 to get the final equations of motion The joint and link parameters of the robot are d1 0 d2 0 a1 a2 l α1 0 α2 0 A1 C1 S1 0 lC1 S1 C1 0 lS1 0 0 1 0 0 0 0 1 A2 C2 S2 0 lC2 S2 C2 0 lS2 0 0 1 0 0 0 0 1 0T2 A1A2 C12 S12 0 l C12 C1 S12 C12 0 l S12 S1 0 0 1 0 0 0 0 1 From Eq 627 Q revolute 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 From Eq 628 we have Uij 0 T i qj A1A2 Aj Ai qj A1A2 QjAj Ai Therefore U11 QA1 S1 C1 0 lS1 C1 S1 0 lC1 0 0 0 0 0 0 0 0 U111 QA1 θ1 QQA1 and U112 QA1 θ2 0 A θ1 θ2 B m1 m2 l I1 l I2 x0 y0 y1 x1 C D x2 y2 Figure 69 The 2DOF robot arm from Example 64 Dynamic and Force Analysis 237 U21 QA1A2 S12 C12 0 l S12 S1 C12 S12 0 l C12 C1 0 0 0 0 0 0 0 0 U211 QA1A2 θ1 QQA1A2 and U212 QA1A2 θ2 QA1QA2 U22 A1QA2 S12 C12 0 lS12 C12 S12 0 lC12 0 0 0 0 0 0 0 0 U221 A1QA2 θ1 QA1QA2 and U222 A1QA2 θ2 A1QQA2 U12 A1 θ2 0 From Eq 636 assuming that all products of inertia are zero we get J1 1 3m1l2 0 0 1 2m1l 0 0 0 0 0 0 0 0 1 2m1l 0 0 m1 J2 1 3m2l2 0 0 1 2m2l 0 0 0 0 0 0 0 0 1 2m2l 0 0 m2 Notice that since ri in Eq 636 is relative to its own frame the location of the center of mass relative to the frame is l2 As was mentioned earlier this is an important issue Measuring this length relative to frame 0 would involve components relative to x0 y0 and z0 whereas measuring it relative to frame 1 only requires a length in the x1 direction Consequently for terms requiring l there is a negative sign but for terms requiring l2 the term is positive From Eqs 649 and 650 for a 2DOF robot we get T1 D11θ1 D12θ2 D111θ2 1 D122θ2 2 2D112θ1θ2 D1 I1 act θ1 655 T2 D21θ1 D22θ2 D211θ2 1 D222θ2 2 2D212θ1θ2 D2 I2 act θ2 656 From Eqs 643645 we have D11 Trace U11J1U T 11 Trace U21J2U T 21 for i 1j 1p 12 D12 Trace U22J2U T 21 for i 1j 2p 2 D21 Trace U21J2U T 22 for i 2j 1p 2 D22 Trace U22J2U T 22 for i 2j 2p 2 D111 Trace U111J1U T 11 Trace U211J2U T 21 for i 1j 1k 1p 12 D122 Trace U222J2U T 21 for i 1j 2k 2p 2 D112 Trace U212J2U T 21 for i 1j 1k 2p 2 D211 Trace U211J2U T 22 for i 2j 1k 1p 2 D222 Trace U222J2U T 22 for i 2j 2k 2p 2 D212 Trace U212J2U T 22 for i 2j 1k 2p 2 D1 m1g TU11r1m2g TU21r2 for i 1p 12 D2 m1g TU12r1m2g TU22r2 for i 2p 12 Introduction to Robotics 238 Although forbiddingly long even for a 2DOF robot substituting all given matrices into these equations yields D11 1 3m1l2 4 3m2l2 m2l2C2 D12 D21 1 3m2l2 1 2m2l2C2 D22 1 3m2l2 D111 0 D112 D121 1 2m2l2S2 D122 1 2m2l2S2 D211 1 2m2l2S2 D212 0 D221 0 D222 0 and from Eq 645 for g T 0 g 0 0 because acceleration of gravity is in the minus direction of the yaxis and rT 1 rT 2 l2 0 0 1 because the center of mass of the bar is at l 2 we get D1 m1g TU11r1m2g TU21r2 m1 0 g 0 0 S1 C1 0 lS1 C1 S1 0 lC1 0 0 0 0 0 0 0 0 l 2 0 0 1 m2 0 g 0 0 S12 C12 0 l S12 S1 C12 S12 0 l C12 C1 0 0 0 0 0 0 0 0 l 2 0 0 1 and similarly for D2 we get D1 1 2m1glC1 1 2m2glC12 m2glC1 D2 1 2m2glC12 Substituting the results into Eqs 655 and 656 will result in the final equations of motion T1 1 3m1l2 4 3m2l2 m2l2C2 θ1 1 3m2l2 1 2m2l2C2 θ2 1 2m2l2S2 θ 2 2 m2l2S2 θ1θ2 1 2m1glC1 1 2m2glC12 m2glC1 I1 act θ1 T2 1 3m2l2 1 2m2l2C2 θ1 1 3m2l2 θ2 1 2m2l2S2 θ 2 1 1 2m2glC12 I2 act θ1 which except for the actuator inertia terms are the same as Eqs 611 and 612 65 Static Force Analysis of Robots Robots may be under either position control or force control Imagine a robot that is following a line say on the flat surface of a panel and is cutting a groove in the surface If the robot follows a prescribed path it is Dynamic and Force Analysis 239 under position control As long as the surface is flat and the robot is following the line on the flat surface the groove will be uniform However if the surface is not flat since the robot is following a given path it will either cut deeper into the surface or not cut deep enough Alternately suppose the robot were to measure the force it is exerting on the surface while cutting the groove If the force becomes too large or too small indicating that the tool is cutting too deep or not deep enough the robot could adjust the depth until it cuts uniformly In this case the robot is under force control Similarly suppose it is required that a robot tap a hole in a machine part The robot would need to exert a known axial force along the axis of the hole as well as rotate the tap by exerting a moment on it To be able to do this the controller would need to move the joints and rotate them at particular rates to create the desired forces and moments at the hand frame Collaborative robots need to assess the forces and torques they exert on their counterpart too whether another robot a part or a human If two robots are to work together to accomplish a task eg moving a large part together each one must sense and control the forces and torques that it exerts on the part When interacting with humans for example in shaking someones hand the robot must sense and control the exerted forces and torques by controlling its actuating forces or torques To relate the joint forces and torques to forces and moments generated at the hand frame of the robot 1 9 10 we define the following HF fx fy fz mx my mz T 657 where fx fy fz are the forces along the x y and zaxes of the hand frame and mx my mz are the moments about the x y and zaxes of the hand frame Similarly we define the following HD dx dy dz δx δy δz T 658 which are differential displacements and rotations about the x y and zaxes of the hand frame We also define similar entities for the joints as T T1 T2 T3 T4 T5 T6 T 659 which are the torques for revolute joints and forces for prismatic joints at each joint and Dθ dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 T 660 which describe the differential movements at the joints either an angle for a revolute joint or a linear dis placement for a prismatic joint Using the method of virtual work 11 which indicates that the total virtual work at the joints must be the same as the total virtual work at the hand frame we get δW HF T HD T T Dθ 661 or that the forces and moments times the displacements at the hand frame are equal to the torques or forces times the displacements at the joints Notice that since work is a scalar we multiply HFT and TT a 1 6 matrix by the displacement matrices 6 1 matrices yielding a single scalar value Substituting the values we get the following for the lefthand side of Eq661 fx fy fz mx my mz dx dy dz δx δy δz fxdx fydy mzδz 662 Introduction to Robotics 240 However from Eq 525 we have T6D T6J Dθ or HD HJ Dθ Substituting this into Eq 661 results in HF T HJ Dθ T T Dθ HF T HJ T T 663 Referring to Appendix A this equation can be written as T HJ T HF 664 which indicates that the joint forces and moments can be determined from the desired set of forces and moments at the hand frame Since the Jacobian is already known from previous analysis for differential motions the controller can calculate the forces and moments at the joints and control the robot based on the desired values Force control of robots may also be accomplished through the use of sensors such as force and torque sen sors This includes robots that can feel the object they are handling and that can relay this information back to the controller or the master operator 12 We will discuss sensors in Chapter 10 We discussed collaborative robots in Chapter 1 and cooperative robots in Chapter 2 The previous discus sion can also be used in the control of these robots The robot can sense the resistive forces exerted on it by a human or another robot and either respond to it eg stop or adjust the forces and torques at the joints to not exceed preset values to avoid injuries to humans or damages to other robots parts or itself Example 69 The numerical value of the Jacobian of a sphericalRPY robot like the Stanford arm is given It is desired to apply a force of 1 lb along the zaxis of the hand frame as well as a moment of 20 lbin about the zaxis of the hand frame to drill a hole in a block Find the necessary joint forces and torques HJ 20 0 0 0 0 0 5 0 1 0 0 0 0 20 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Solution Substituting the values given into Eq664 we get T HJ T HF T T1 T2 F3 T4 T5 T6 20 5 0 0 0 1 0 0 20 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 20 20 20 0 0 0 20 Dynamic and Force Analysis 241 As you see for this instantaneous configuration of the robot and with its specific dimensions it is necessary to exert the indicated torques at the first second and sixth joints in order to create the desired force and torque at the hand frame There is no need for the third joint the prismatic joint to exert any force even though we want a force at the hand frame Can you visualize why Obviously as the configuration of the robot changes so does the Jacobian Therefore for continued exertion of the same force and moment at the hand frame as the robot moves the joint torques will have to change requiring continuous calculation of joint torques by the controller 66 Transformation of Forces and Moments between Coordinate Frames Suppose that a force and a moment are acting on an object both described relative to a reference frame The principle of virtual work can also be used to find an equivalent force and moment relative to another coordinate frame such that they will have the same effect on the object To do this we define F as forces and moments acting on the object and D as the displacements caused by these forces and moments also relative to the same reference frame as F T fxfyfzmxmymz 665 D T dxdydzδxδyδz 666 We also define BF to be the forces and moments acting on the object relative to a frame B and BD to be the displacements caused by these forces and moments also relative to frame B as BF T Bf xBf yBf zBmxBmyBmz 667 BD T BdxBdyBdzBδxBδyBδz 668 Since the total virtual work performed on the object in either frame must be the same then δW F T D BF T BD 669 Paul 1 has shown that displacements relative to the two frames are related to each other by the following relationship BD BJ D 670 Substituting Eq 670 into Eq 669 results in F T D BF T BJ D or F T BF T BJ 671 which can be rearranged to F BJ T BF 672 Paul 1 has also shown that instead of calculating the Jacobian with respect to frame B the forces and moments with respect to frame B can be directly found from the following equations Bf x n f Bf y o f Bf z a f Bmx n f P m Bmy o f P m Bmz a f P m 673 Introduction to Robotics 242 Using Eq 673 we can find equivalent forces and moments in different frames that have the same effect on an object Example 610 An object attached to a frame B is subjected to the forces and moments given relative to the reference frame Find the equivalent forces and moments in frame B F T 0 10 lb 0 0 0 20 lb in B 0 1 0 3 0 0 1 5 1 0 0 8 0 0 0 1 Solution From the information given we have f T 0100 mT 0020 PT 358 nT 001 oT 100 aT 010 f P i j k 0 10 0 3 5 8 i 80 j 0 k 30 f P m 80i10k From Eq 673 we get Bf x n f 0 Bf y o f 0 Bf z a f 10 Bf 0010 Bmx n f P m 10 Bmy o f P m 80 Bmz a f P m 0 Bm 10800 This means that a 10 lb force along the aaxis of frame B together with two moments of 10 lb in along the naxis and 80 lb in along the oaxis will have the same effect on the object as the original force and moment relative to the reference frame Does this match what you learned in your Statics course Figure 610 shows the two equivalent forcemoment systems x y z n o a fx mz Bfa Bmn Bmo Figure 610 Equivalent forcemoment systems in two different frames Dynamic and Force Analysis 243 67 Design Project You may want to continue with the analysis of your robot You will have to develop the dynamic equations of motion which enables you to calculate the power needed at each joint to move the robot at desired accel erations This information may be used for choosing the appropriate actuators as well as in controlling the robots motions Alternately since your robot will not be moving too fast you can calculate the toque needed at each joint by trying to find the worstcase situations for each joint For example try to model the robot with both links extended outward In this case the first actuator acting on the first joint experiences the largest load This estimate is not very accurate since we are eliminating all coupling inertia terms Coriolis accelerations and so on But as we discussed earlier under lowload conditions and with low velocities you can get a relatively acceptable estimate of the torques needed 68 Summary In this chapter we discussed the derivation of the dynamic equations of motion of robots These equations can be used to estimate the power needed at each joint to drive the robot with desired velocity and accel erations They can also be used to choose appropriate actuators for a robot Dynamic equations of multiDOF 3D mechanisms such as robots are complicated and at times very dif ficult to use As a result they are mostly used in simplified forms with simplifying assumptions As an exam ple we may determine the importance of a particular term and its contribution to the total torque or power needed by considering how large it is relative to other terms For instance we may determine the importance of Coriolis terms in these equations by knowing how large the velocity terms are Conversely the importance of gravity terms in space robots may be determined and if appropriate dropped from the equations of motion In the next chapter we discuss how a robots motions are controlled and planned in order to yield a desired trajectory References 1 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 2 Shahinpoor Mohsen A Robot Engineering Textbook Harper and Row Publishers NY 1987 3 Asada Haruhiko JJ E Slotine Robot Analysis and Control John Wiley and Sons NY 1986 4 Sciavicco Lorenzo B Siciliano Modeling and Control of Robot Manipulators McGrawHill NY 1996 5 Fu KS RC Gonzalez CSG Lee Robotics Control Sensing Vision and Intelligence McGrawHill 1987 6 Featherstone R The Calculation of Robot Dynamics Using ArticulatedBody Inertias The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 1330 7 Shahinpoor M Dynamics International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons NY 1988 pp 329347 8 Pytel Andrew J Kiusalaas Engineering Mechanics Dynamics 3rd edition Cengage Learning Inc 2010 9 Paul Richard CN Stevenson Kinematics of Robot Wrists The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3138 10 Whitney DE The Mathematics of Coordinated Control of Prosthetic Arms and Manipulators Transactions of ASME Journal of Dynamic Systems Measurement and Control 94G4 1972 pp 303309 11 Pytel Andrew J Kiusalaas Engineering Mechanics Statics 3rd edition Cengage Learning Inc 2010 12 Chicurel Marina Once More With Feeling Stanford Magazine MarchApril 2000 pp7073 Introduction to Robotics 244 Problems 61 Using Lagrangian mechanics derive the equations of motion for a cart with two tires under the cart as shown 62 Calculate the total kinetic energy of the link AB attached to a roller with negligible mass as shown 63 Derive the equations of motion for the 2link mechanism with distributed mass as shown 64 Write the equations that express U62 U35 U53 U623 and U534 for a 6axis cylindricalRPY robot in terms of the A and Q matrices 65 Using Eqs 649654 write the equations of motion for a 3DOF revolute robot and describe each term l I B C A m θ Vo x y Figure P62 k m F x r I r I Figure P61 x0 y0 m1 m2 x1 y1 l1 I1 l2 I2 O θ1 θ2 Figure P63 Dynamic and Force Analysis 245 66 Expand the D134 and D15 terms of Eq 649 in terms of their constituent matrices 67 An object is subjected to the following forces and moments relative to the reference frame Attached to the object is a frame which describes the orientation and the location of the object Find the equivalent forces and torques acting on the object relative to the current frame B 0 707 0 707 0 2 0 0 1 5 0 707 0 707 0 3 0 0 0 1 F T 100512200 N N m 68 In order to assemble two parts together one part must be pushed into the other with a force of 10 lb in the xaxis direction and 5 lb in the ydirection and be turned with a torque of 5 lb in along the xaxis direction The objects location relative to the base frame of a robot is described by RT0 Assuming that the two parts must be aligned together for this purpose find the necessary forces and moments that the robot must apply to the part relative to its hand frame RT0 0 0 707 0 707 4 1 0 0 6 0 0 707 0 707 3 0 0 0 1 Introduction to Robotics 246 7 Trajectory Planning 71 Introduction In the previous chapters we studied the kinematics and dynamics of serial and parallel robots This means that using the equations of motion of the robot we can determine where the robot will be if we have the joint variables or we can determine what the joint variables must be to place the robot at a desired position and orientation with a desired velocity Path and trajectory planning relates to the way a robot is moved from one location to another in a controlled manner In this chapter we study the sequence of movements that must be made to create a controlled motion between segments whether in a straight line or in sequential motions In practice precise motion requirements are intensive and require approximations It should be mentioned here that the principles and the analyses we will learn in this chapter also apply directly to cooperative robots mentioned in Chapter 2 These robots move in a coordinated manner with the motions of each related to the other when together they accomplish a task Therefore these principles are applied to both arms whether one is the master and the other is a slave or each is controlled independently 72 Path vs Trajectory A path is defined as the collection of a sequence of locations configurations a robot makes to go from one place to another without regard to the timing of these configurations A trajectory is the collection of the locations configurations with respect to time For example in Figure 71a the robot goes from point configuration A to point B to point C with equal intervals whereas in Figure 71b the intervals are not equal In this sequence the robot starts slower and accelerates to the middle then decelerates to stop at B etc Although the paths for both cases are exactly the same the trajectories are not because in case b the timing is different and therefore the robot is at different locations compared to case a at similar times In this chapter we are concerned with the trajectories instantaneous joint velocities and accelerations B C A B C A a b Figure 71 Sequential robot movements in a path versus trajectory 247 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed 73 JointSpace vs CartesianSpace Descriptions Consider a 6axis robot arm at a point A in space which is directed to move to another point B Using the inverse kinematic equations of the robot derived in Chapters 2 3 and 4 we may calculate the total joint displacements that the robot needs to make to get to the new location The joint values thus calculated can be used by the controller to drive the robot joints to their new values and consequently move the robot arm to its new position The description of the motion to be made by the robot with its joint values is called the jointspace description As we will see later in this case although the robot eventually reaches the desired position the motion between the two points is unpredictable Now assume that a straight line is drawn between points A and B and we intend to have the robot move from point A to point B in a straight line To do this it is necessary to divide the line into small portions as shown in Figure 72 and to move the robot through all intermediate points To accomplish this task at each intermediate location the robots inverse kinematic equations are solved a set of joint variables is calculated and the controller is directed to drive the robot to those values When all segments are completed the robot will be at point B as desired However in this case unlike the jointspace case discussed previously the resulting motion is known at all times The sequence of movements the robot makes is described in Cartesian space but is converted to jointspace values at each segment As is clear from this simple example the Car tesianspace description is much more computationally intensive than the jointspace description but yields a controlled and known path Both jointspace and Cartesianspace descriptions are very useful and are used in industry However each one has its own place Cartesianspace trajectories are very easy to visualize because humans operate in Cartesian space conse quently it is easy to imagine what the end effectors trajectory must be However Cartesianspace trajectories are computationally expensive and require a faster processing time for similar resolution than jointspace trajectories Additionally although it is easy to visualize the trajectory it is difficult to visually ensure that singularities will not occur For example consider the situation in Figure 73a If we are not careful we may specify a trajectory that requires the robot to run into itself or to reach a point outside of the work envel ope which of course is impossible and yields an unsatisfactory solution 1 2 This is true because it may be impossible to know whether the robot can actually reach a particular location and orientation before the motion is made Also as shown in Figure 73b the motion between two points may require an instantaneous change in the joint values we discussed why this may happen in Chapter 2 which is impossible to predict We may resolve some of these problems by specifying via points through which the robot must pass to avoid obstacles and other similar singularities x y z A B Figure 72 Sequential motions of a robot to follow a straight line Introduction to Robotics 248 74 Basics of Trajectory Planning To understand the basics of planning a trajectory in joint space and Cartesian space lets consider a simple 2 DOF robot mechanism As shown in Figure 74 we intend to move the robot from point A to point B The configuration of the robot at point A is shown with α 20 and β 30 Suppose it has been calculated that in order for the robot to be at point B it must be at α 40 and β 80 Also suppose that both joints of the robot can move at a maximum rate of 10 degreessec One way to move the robot from point A to B is to run both joints at their maximum angular velocities This means that after two seconds the lower link of the robot will have finished its motion while the upper link continues for another three seconds as shown in Figure 74 The trajectory of the end of the robot is also shown As indicated the path is irregular and the individual distances traveled by the robots end are not uniform Now suppose that the motions of both joints of the robot are normalized such that the joint with smaller motion moves proportionally slower and both joints start and stop their motion simultaneously as shown in Figure 75 In this case both joints move at different speeds but move continuously together α changes 4 degreessecond while β changes 10 degreessecond resulting in a different trajectory Notice that the seg ments of the movement are more similar to each other but the path is still irregular and different from x y z a b Figure 73 Cartesianspace trajectory problems a The trajectory specified in Cartesian coordinates may force the robot to run into itself b the trajectory may require a sudden change in the joint angles o x y 1 2 3 5 4 6 A α α B 20 30 40 40 40 40 30 40 50 60 70 80 0 1 2 3 4 5 Time sec β β Figure 74 Jointspace nonnormalized movements of a 2DOF robot Trajectory Planning 249 the previous case Both of these cases were planned in joint space as we were only concerned with the values of the joints not the location of the end of the mechanism Now suppose we want the robots hand to follow a known path between points A and B say in a straight line The simplest solution would be to draw a line between points A and B divide the line into say five equal segments and solve for necessary angles α and β at each point as shown in Figure 76 This is a simple inter polation between points A and B 3 4 5 Notice that in this case the path is a straight line but the joint angles are not uniformly changing Although the resulting motion is a straight and consequently known trajec tory it is necessary to solve for the joint values at each point Obviously many more points must be calculated for better accuracy with so few segments the robot will not exactly follow the straight lines at each segment In this case the trajectory is in Cartesian space but the joints are calculated and controlled in joint space In this case it is assumed that the robots actuators have enough power to provide the large torques nec essary to accelerate and decelerate the joints as needed For example notice that we are assuming the arm will be instantaneously accelerated to have the desired velocity right at the beginning of the motion in segment 1 If this is not true the robot will follow a trajectory different from our assumption it will be slightly behind as it accelerates to the desired speed Additionally note how the difference between some consecutive values is larger than the maximum specified joint velocity of 10sec eg between points 1 and 2 β changes 26 Obvi ously this is not attainable Also note how in this case joint 1 moves downward first before moving up To improve the situation we may divide the path differently by starting to move the arm in smaller seg ments and as we speed up going at a constant cruising rate and finally decelerating with smaller segments as we approach point B This is schematically shown in Figure 77 Of course we still need to solve the inverse kinematic equations of the robot at each point which is similar to the previous case However in this case x 1 2 3 4 5 6 A B 20 24 28 32 36 40 30 40 50 60 70 80 0 1 2 3 4 5 Time sec y α α β β Figure 75 Jointspace normalized movements of a robot with 2 DOF x 1 2 3 4 5 6 A B y 20 13 15 19 28 40 30 56 69 78 82 80 0 1 2 3 4 5 Time sec α α β β Figure 76 Cartesianspace movements of a 2DOF robot Introduction to Robotics 250 instead of dividing the straight line AB into equal segments we may divide it based on x 1 2at2 until we attain the cruising velocity of v at Similarly the end portion of the motion can be divided based on a decelerating regimen Another variation on this trajectory planning is to plan a path that is not straight but one that follows some desired path for example a quadratic equation To do this the coordinates of each segment are calculated based on the desired path and are used to calculate joint variables at each segment therefore the trajectory of the robot can be planned for any desired path So far we have only considered the movement of the robot between two points A and B However in other cases the robot may be going through many consecutive points including intermediate or via points The next level of trajectory planning is between multiple points and eventually for continuous movement Assume the robot is to go from point A to B and then to C as shown in Figure 78 One way to run the robot is to accelerate from point A toward point B cruise decelerate and stop at B start again at B and accelerate toward C cruise and decelerate to stop at C This stopandgo approach creates jerky motions with unnec essary stops An alternative way is to blend the two portions of the motion at point B such that the robot approaches B decelerates if necessary follows the blended path accelerates once again toward C and even tually stops at C This creates a much more graceful motion reduces the stress on the robot and requires less energy If the motion consists of more segments all intermediate segments can be blended together Notice how due to this blending of the segments the robot goes through a different point B Figure 78a and not B If it is necessary that the robot goes through point B exactly then a different point B must be specified such that after blending the robot still goes through point B Figure 78b Another alternative 2 is to specify two 1 2 6 7 A B x y 4 3 5 20 16 15 13 15 25 32 37 30 40 50 59 70 80 81 80 1 2 3 4 5 6 7 8 8 α α β β Figure 77 Trajectory planning with an accelerationdeceleration regimen A B C B y x B C B y x A a b Figure 78 Blending of different motion segments in a path Trajectory Planning 251 via points C and D before and after point B as shown in Figure 79 such that B falls on the straightline portion of the motion between the via points to ensure that the robot goes through B In the following sections we discuss different methods of trajectory planning in more detail Generally higherorder polynomials are used to match positions velocities and accelerations at each point between two segments When the path is planned the controller uses the path information coordinates in calculat ing joint variables from the inverse kinematic equations and runs the robot accordingly Ultimately if the path of the robot is very complicated and involved such that it cannot be easily expressed by an equation it may become necessary to physically move the robot by hand and record the motions at each joint The recorded joint values can be used later to run the robot This is commonly done to teach tasks such as spray painting of automobiles seam welding of complicated shapes and other similar tasks to a robot 75 JointSpace Trajectory Planning In this section we will see how the motions of a robot can be planned in joint space with controlled char acteristics The reason for planning a trajectory in joint space is that the robots motions clearly result from joint movements actuated by motors A motor should be able to provide the accelerations and velocities needed to control joint movements Consequently it makes sense to use the Cartesianspace information about the trajectory to plan the movements of each joint in a controlled manner A number of different schemes such as polynomials of different orders and linear functions with parabolic blends can be used for this purpose The following is a discussion of some of these schemes used in joint space trajectory planning Notice that these schemes specify joint values not Cartesian values We discuss Cartesian space later 751 ThirdOrder Polynomial Trajectory Planning In this application the initial location and orientation of the robot are known using the inverse kinematic equations the final joint angles for the desired position and orientation are found However the motions of each joint of the robot must be planned individually Therefore consider one of the joints which at the begin ning of the motion segment at time ti is at θi we want the joint to move to a new value of θf at time tf One way to do this is to use a polynomial to plan the trajectory such that the initial and final boundary conditions match what we already know namely that θi and θf are known and the velocities at the beginning and the end of the motion segment are also known or are zero These four pieces of information allow us to solve for four unknowns or a thirdorder polynomial in the form of θ t c0 c1t c2t2 c3t3 71 B C B B C E D y y x x A A Figure 79 An alternative scheme for ensuring that the robot goes through a specified point during blending of motion segments Two via points C and D are picked such that B falls on the straightline section of the segment ensuring that the robot passes through B Introduction to Robotics 252 where the initial and final conditions are or are assumed to be θ ti θi θ tf θf θ ti 0 θ tf 0 72 Taking the first derivative of the polynomial from Eq 71 we get θ t c1 2c2t 3c3t2 73 Substituting the initial and final conditions into Eqs 71 and 73 yields θ ti c0 θi θ tf c0 c1tf c2tf 2 c3tf 3 θ ti c1 0 θ tf c1 2c2tf 3c3tf 2 0 74 which can also be written in matrix form as θi θi θf θf 1 0 0 0 0 1 0 0 1 tf tf 2 tf 3 0 1 2tf 3tf 2 c0 c1 c2 c3 75 By solving these four equations simultaneously we can find the constants This allows us to calculate the joint position at any interval of time which can be used by the controller to drive the joint to the specified position The same process must be used for each joint individually but they are all driven together from start to finish Obviously if the initial and final velocities are not zero the given values can be used in these equa tions Therefore applying this thirdorder polynomial to each joint motion creates a motion profile that can be used to drive each joint If more than two points are specified such that the robot will go through the points successively the final velocities and positions at the conclusion of each segment can be used as the initial values for the next seg ments Similar thirdorder polynomials can be used to plan each section However although positions and velocities are continuous accelerations are not which may cause problems Example 71 We intend to have the first joint of a 6axis robot go from an initial angle of 30 to a final angle of 75 in 5 seconds Using a thirdorder polynomial calculate the joint angle at 1 2 3 and 4 seconds Solution Substituting the boundary conditions into Eq 74 we get θ ti c0 30 θ tf c0 c1 5 c2 52 c3 53 75 θ ti c1 0 θ tf c1 2c2 5 3c3 52 0 c0 30 c1 0 c2 5 4 c3 0 72 Trajectory Planning 253 This results in the following cubic polynomial equation for position as well as the velocity and accel eration equations for joint 1 θ t 30 5 4t20 72t3 θ t 10 8t2 16t2 θ t 10 84 32t Substituting the desired time intervals into the equation of motion results in θ 1 34 68 θ 2 45 84 θ 3 59 16 θ 4 70 32 The joint angles velocities and accelerations are shown in Figure 710 Notice that in this case the acceleration needed at the beginning of the motion is 108sec2 as well as 108sec2 deceleration at the conclusion of the motion Example 72 Suppose the robot arm from Example 71 is to continue to the next point where the joint is to reach 105 in another 3 seconds Draw the position velocity and acceleration curves for the motion Solution At the conclusion of the first segment we know the position and velocity of the joint Using these values as initial conditions for the next segment we get θ t c0 c1t c2t2 c3t3 θ t c1 2c2t 3c3t2 θ t 2c2 6c3t where at ti 0 θi 75 θi 0 at tf 3 θf 105 θf 0 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 710 Joint positions velocities and accelerations for Example 71 Introduction to Robotics 254 from which we find c0 75 c1 0 c2 10 c3 2 222 θ t 75 10t22 222t3 θ t 20t6 666t2 θ t 20 13 332t Figure 711 shows the positions velocities and accelerations for the entire motion The boundary conditions are as specified However notice that although the velocity curve is continuous the slope of the velocity curve changes from negative to positive at the intermediate point creating an instan taneous change in acceleration jerk Whether the robot is capable of creating such accelerations or not is a question that must be answered depending on the robots capabilities To ensure that the robots accelerations will not exceed its capabilities acceleration limits may be used to calculate the necessary time to reach the target In that case for θi 0 and θf 0 the maximum acceleration is 4 θ max 6 θf θi tf ti 2 from which the timetotarget can be calculated You should also notice that the velocity at the intermediate point does not have to be zero In that case the concluding velocity at the intermediate point will be the same as the initial velocity of the next segment These values must be used in calculating the coefficients of the thirdorder polynomial 752 FifthOrder Polynomial Trajectory Planning In the previous section we encountered accelerations that may be impossible to achieve during motion trajectories therefore we may need to specify maximum accelerations as well Specifying the initial and 30 0 30 60 90 120 0 1 2 3 4 5 6 7 8 Seconds Position Velocity Acceleration Figure 711 Joint positions velocities and accelerations for Example 72 Trajectory Planning 255 ending positions velocities and accelerations of a segment yields six pieces of information enabling us to use a fifthorder polynomial to plan a trajectory as follows θ t c0 c1t c2t2 c3t3 c4t4 c5t5 76 θ t c1 2c2t 3c3t2 4c4t3 5c5t4 77 θ t 2c2 6c3t 12c4t2 20c5t3 78 These equations allow us to calculate the coefficients of a fifthorder polynomial with position velocity and acceleration boundary conditions Example 73 Repeat Example 71 but assume maximum initial acceleration and final deceleration are 5sec2 Solution From Example 71 and the given accelerations we have θi 30 θi 0 sec θi 5 sec2 θf 75 θf 0 sec θf 5 sec2 Using Eqs 7678 with the given initial and final boundary conditions we get c0 30 c1 0 c2 2 5 c3 1 6 c4 0 58 c5 0 0464 This results in the following motion equations θ t 30 2 5t2 1 6t30 58t4 0 0464t5 θ t 5t 4 8t22 32t3 0 232t4 θ t 5 9 6t6 96t2 0 928t3 Figure712showsthepositionvelocityandaccelerationgraphsforthejointThemaximumaccelerationis 87sec2 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 712 Joint positions velocities and accelerations for Example 73 Introduction to Robotics 256 753 Linear Segments with Parabolic Blends A simple alternative for jointspace trajectory planning is to run the joints at constant speed between the initial and final locations as we discussed in Section 74 This is equivalent to a firstorder polynomial where the velocity is constant and acceleration is zero However this also means that at the beginning and at the end of the motion segment accelerations must be infinite in order to create instantaneous velocities at the bound aries To prevent this the linear segment can be blended with parabolic sections at the beginning and at the end of the motion segment creating a continuous position and velocity as shown in Figure 713 Assuming that the initial and the final positions are θi and θf at times ti 0 and tf and that the parabolic segments are symmet rically blended with the linear section at blending times tb and tf tb we can write θ t c0 c1t 1 2c2t2 θ t c1 c2t θ t c2 79 Obviously in this scenario acceleration is constant for the parabolic sections yielding a continuous veloc ity at the common points called knot points A and B Substituting the boundary conditions into the par abolic equation segment yields θ t 0 θi c0 θ t 0 0 c1 θ t c2 c0 θi c1 0 c2 θ This results in parabolic segments in the form θ t θi 1 2c2t2 710 θ t c2t 711 θ t c2 712 Clearly for the linear segment the velocity is constant and can be chosen based on the physical capabilities of the actuators Substituting zero initial velocity a constant known joint velocity ω in the linear portion and Time Position 0 tb t tftb tf A B θf θi θ θi Figure 713 Scheme for linear segments with parabolic blends Trajectory Planning 257 zero final velocity in Eq711 we find the joint positions and velocities for points A and B and the final point as follows θA θi 1 2c2t2 b θA c2tb ω θB θA ω tf tb tb θA ω tf 2tb θB θA ω θf θB θAθi θf 0 713 The necessary blending time tb can be found from Eq 713 c2 ω tb θf θi c2t2 b ω tf 2tb θf θi ω tb t2 b ω tf 2tb 714 From Eq 714 we calculate the blending time as tb θiθf ωtf ω 715 Obviously tb cannot be bigger than half of the total time tf which results in a parabolic speedup and a parabolic slowdown with no linear segment A corresponding maximum velocity of ωmax 2 θf θi tf can be found from Eq 715 It should be mentioned here that if for any segment the initial time is not zero but ta to simplify the mathematics we can always shift the time axis by ta to make the initial time zero The final parabolic segment is symmetrical with the initial parabola but with a negative acceleration and therefore it can be expressed as follows θ t θf 1 2c2 tf t 2 where c2 ω tb θ t θf ω 2tb tf t 2 θ t ω tb tf t θ t ω tb 716 Example 74 Joint 1 of the 6axis robot from Example 71 is to go from an initial angle of θi 30 to the final angle of θf 70 in 5 seconds with a cruising velocity of ω1 10 sec Find the necessary time for blending and plot the joint positions velocities and accelerations Introduction to Robotics 258 Solution From Eqs 710712 715 and 716 we get tc θiθf ω1tf ω1 3070 10 5 10 1 sec For θ θi to θA θ 30 5t2 θ 10t θ 10 For θ θAto θB θ θA 10 t1 θ 10 θ 0 For θ θBto θf θ 705 5t 2 θ 10 5t θ 10 Figure 714 shows the position velocity and acceleration graphs for this joint 754 Linear Segments with Parabolic Blends and Via Points Suppose there is more than one motion segment such that at the conclusion of the first segment the robot will continue to move on to the next point either another via point or the destination As we discussed earlier we would like to blend the motion segments together to prevent stopandgo motions In this case too we know where the robot is at time t0 and using the inverse kinematic equations of the robot we can calculate the joint angles at via points and at the end of the motion To blend the motion segments together we use the boundary conditions of each point to calculate the coefficients of the parabolic segments As an example at the beginning of the motion we know the velocity and position of the joint At the conclusion of the first segment the position and velocity must be continuous This will be the boundary condition for the via point and consequently a new segment can be calculated The process continues until all segments are calculated and the destination is reached Obviously for each motion segment a new tb must be calculated based on the given joint velocity We should also check to make sure that maximum allowable accelerations are not exceeded 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 714 Position velocity and acceleration graphs for joint 1 from Example 74 Trajectory Planning 259 755 HigherOrder Trajectories When in addition to the initial and final destination points other via points including liftoff and setdown points are specified we may match the positions velocities and accelerations of the two segments at each point to plan one continuous trajectory Incorporating the initial and final boundary conditions together with this information enables us to use higherorder polynomials in the form θ t c0 c1t c2t2 cn1tn1 cntn 717 such that the trajectory passes through all specified points However solving a highorder polynomial for each joint requires extensive calculations Instead it is possible to use combinations of lowerorder polyno mials for different segments of the trajectory and blend them together to satisfy all required boundary con ditions 6 including a 434 trajectory a 353 trajectory and a 5cubic trajectory to replace a seventhorder polynomial For example for a 434 trajectory a fourthorder polynomial is used to plan a trajectory between the initial point and the first via point eg liftoff a thirdorder polynomial is used to plan a tra jectory between two via points eg lift off to setdown and another fourthorder polynomial is used to plan the trajectory between the last via point eg setdown and the final destination Similarly a 353 trajectory may be planned between the initial and the first via point between the successive via points and between the last via point and the final destination Note that we must solve for four coefficients for a thirdorder polynomial five coefficients for a fourth order polynomial and six coefficients for a fifthorder polynomial Both 434 and 353 trajectories require solving for a total of 14 coefficients For the 434 trajectory the 14 unknown coefficients are in the form θ t 1 a0 a1t a2t2 a3t3 a4t4 θ t 2 b0 b1t b2t2 b3t3 θ t 3 c0 c1t c2t2 c3t3 c4t4 718 However there are also 14 boundary and blending conditions available that can be used to solve for all unknown coefficients and to plan the trajectory 1 Initial position of θ1 is known 2 Initial velocity may be specified 3 Initial acceleration may be specified 4 Position of the first via point θ2 is known and is the same as the final position of the first fourth order segment 5 The first via points position is the same as the initial position of the thirdorder segment for continuity 6 Continuous velocity must be maintained at the via point 7 Continuous acceleration must be maintained at the via point 8 Position of a second and other via point θn is specified and is the same as the final position of the thirdorder segment 9 Position of the second and other via point is the same as the initial position of the next segment for continuity 10 Continuous velocity must be maintained at the next via point 11 Continuous acceleration must be maintained at the next via point 12 Position of destination θf is specified 13 Velocity of the destination is specified 14 Acceleration of the destination is specified A similar set of requirements may be specified for the 353 trajectory We denote time t as the global normalized variable for the whole motion and τj as specific local time variables for each segment j We also assume the local initial starting time τji for each segment is zero and the local final ending time τjf for each segment is specified This means that all segments start at a local time zero and end at a specified given local Introduction to Robotics 260 time where the next segment starts at its local time τji 0 Based on this the 434 segments and their deri vatives can be written as follows 1 The first fourthorder segment at local time τ1 0 yields the initial known position of θ1 θ1 a0 719 2 The starting velocity at τ1 0 for the first segment is known Therefore θ1 a1 720 3 The starting acceleration at τ1 0 for the first segment is known Thus θ1 2a2 721 4 The position of the first via point θ2 at the conclusion of the first segment at local time τ1f is known Consequently θ2 a0 a1 τ1f a2 τ1f 2 a3 τ1f 3 a4 τ1f 4 722 5 The position of the first via point must be the same as the initial position of the thirdorder pol ynomial at time τ2 0 Thus θ2 b0 723 6 Continuous velocity must be maintained at the via point Therefore a1 2a2 τ1f 3a3 τ1f 2 4a4 τ1f 3 b1 724 7 Continuous acceleration must be maintained at the via point Thus 2a2 6a3 τ1f 12a4 τ1f 2 2b2 725 8 The position of a second via point θ3 at the conclusion of the thirdorder segment at time τ2f is specified Consequently θ3 b0 b1 τ2f b2 τ2f 2 b3 τ2f 3 726 9 For continuity the position of the via point θ3 must be the same as the initial position of the next segment at τ3 0 Thus θ3 c0 727 10 Continuous velocity must be maintained at the via point Thus b1 2b2 τ2f 3b3 τ2f 2 c1 728 11 Continuous acceleration must be maintained at the via point Therefore 2b2 6b3 τ2f 2c2 729 12 The position of destination at the conclusion of the last segment τ3f is specified as θf Thus θ4 c0 c1 τ3f c2 τ3f 2 c3 τ3f 3 c4 τ3f 4 730 Trajectory Planning 261 13 Velocity of the destination at the conclusion of the last segment at time τ3f is specified Consequently θ4 c1 2c2 τ3f 3c3 τ3f 2 4c4 τ3f 3 731 14 Acceleration of the destination at the conclusion of the last segment at time τ3f is specified Therefore θ4 2c2 6c3 τ3f 12c4 τ3f 2 732 Equations 719732 can be rewritten in matrix form as θ1 θ1 θ1 θ2 θ2 0 0 θ3 θ3 0 0 θ4 θ4 θ4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ1f τ1f 2 τ1f 3 τ1f 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2τ1f 3τ1f 2 4τ1f 3 0 1 0 0 0 0 0 0 0 0 0 2 6τ1f 12τ1f 2 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ2f τ2f 2 τ2f 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 2τ2f 3τ2f 2 0 1 0 0 0 0 0 0 0 0 0 0 2 6τ2f 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ3f τ3f 2 τ3f 3 τ3f 4 0 0 0 0 0 0 0 0 0 0 1 2τ3f 3τ3f 2 4τ3f 3 0 0 0 0 0 0 0 0 0 0 0 2 6τ3f 12τ3f 2 a0 a1 a2 a3 a4 b0 b1 b2 b3 c0 c1 c2 c3 c4 733 or θ M C and C M 1 θ 734 The unknown coefficients can be found from Eq 734 by calculating M 1 Therefore the equations of motion for the three segments are known and the joint can be driven accordingly The same must be done for all other joints A similar approach may be taken to calculate the coefficients for the other combinations such as the 353 trajectory or the 5cubic trajectory 6 Example 75 A robot is to be driven from an initial position through two via points before it reaches its final destination using a 434 trajectory The positions velocities and time duration for the three segments for one of the joints are given Determine the trajectory equations and plot the position velocity and acceleration graphs for the joint θ1 30 θ1 0 θ1 0 τ1i 0 τ1f 2 θ2 50 τ2i 0 τ2f 4 θ3 90 τ3i 0 τ3f 2 θ4 70 θ4 0 θ4 0 Introduction to Robotics 262 Solution We can calculate the unknown coefficients of the three segments by substituting the given values directly into the matrices of Eq 733 or into Eqs 719732 and solving the resulting set of equa tions This results in a0 30 b0 50 c0 90 a1 0 b1 20 477 c1 13 81 a2 0 b2 0 714 c2 9 286 a3 4 881 b3 0 833 c3 9 643 a4 1 191 c4 2 024 The three segments are θ t 1 30 4 881t31 191t4 0 t 2 θ t 2 50 20 477t 0 714t20 833t3 0 t 4 θ t 3 9013 81t9 286t2 9 643t32 024t4 0 t 2 Figure 715 shows the angular position velocity and acceleration graphs of this joint for the given motion based on the 434 trajectory 756 Other Trajectories Many other schemes may also be used to plan trajectories This includes bangbang trajectories square and trapezoidal acceleration profile trajectories sine function trajectories other polynomials and other functions to plan a trajectory For more information about these and other possibilities please refer to the references at the end of this chapter 76 CartesianSpace Trajectories As discussed through simple examples in Section 74 Cartesianspace trajectories relate to the motions of a robot relative to the Cartesian reference frame as expressed by the position and orientation of the robots 20 0 20 40 60 80 100 0 1 2 3 4 5 6 7 8 Seconds Position Velocity Acceleration Figure 715 The position velocity and acceleration curves for the motion of the joint in Example 75 based on a 434 trajectory Trajectory Planning 263 hand In addition to simple straightline trajectories many other schemes may be deployed to drive the robot in its path between different points In fact all of the schemes used for jointspace trajectory planning also can be used for Cartesianspace trajectories The basic difference is that for Cartesian space the joint values must be repeatedly calculated through the inverse kinematic equations of the robot This means that unlike the jointspace schemes in which the generated values relate directly to joint values in Cartesianspace planning the calculated values from the functions are positions and orientations of the hand and they must still be converted to joint values through the inverse kinematic equations This can be simplified into a computer loop as follows 1 Increment the time by t t Δt 2 Calculate the position and orientation of the hand based on the selected function for the trajectory 3 Calculate the joint values for the position and orientation through the inverse kinematic equations of the robot 4 Send the joint information to the controller 5 Go to the beginning of the loop Straightline motions between points are the most practical trajectories for industrial applications How ever blending the motions for multiple destinations such as via points is also very common To accomplish a straightline trajectory the transformation between the initial and final positions and orientations must be calculated and divided into small segments The total transformation R between the initial configuration Ti and final configuration Tf can be calculated as follows Tf TiR T 1 i Tf T 1 i TiR R T 1 i Tf 735 At least three different alternatives may be used to convert this transformation into small segments 1 Since we want to have a smooth straightline transformation between the initial and final locations we want a large number of very small segments This in reality creates a large number of differential motions 3 Using the equations developed for differential motions in Chapter 3 we can relate the position and orientation of the hand frame at each new segment to the differential motions the Jacobian and joint velocities by D JDθ and Dθ J 1D dT Δ T Tnew Told dT This technique requires extensive calculations and only works if the inverse Jacobian exists 2 The transformation between the initial and final locations R can be decomposed into a trans lation and two rotations The translation involves moving the origin of the frame from the initial position to the final position The first rotation is to align the hand frame to the desired orientation and the second rotation is to rotate the hand frame about its own axis to the final orientation 2 3 6 All three transformations are executed simultaneously 3 The transformation between the initial and final locations can be decomposed into a translation and one rotation about an axis q The translation involves moving the origin of the frame from the initial position to the final position The rotation is to align the hand frame to the final desired orientation 2 3 6 Both transformations are executed simultaneously Figure 716 Introduction to Robotics 264 For more information about Cartesianspace trajectory planning refer to references 710 at the end of this chapter The robot programming language used with OmronAdept robots is called V Two common commands for moving the robot from one point P1 to another point P2 are MOVE P2 and MOVES P2 The MOVE command instructs the controller to simultaneously move all robot joints to go to point P2 This motion is in joint space and the path of the robot is the result of the corresponding joint movements The MOVES command for move in straight line instructs the controller to move in a straight line in Cartesian space by dividing the motion into many small segments Additionally the robot may be moved with a teach pendant in the Joint coordinate where only one joint moves at a time in World coordinate where the end effector moves along the reference frame axes or in Tool coordinate where the end effector moves along the axes of a frame attached to the end effector In the last two modes all joints move simultaneously to accomplish the requested motion Similarly the commands CPOFF and CPON allow the user to turn off or on a Continuous Path feature where either the consecutive motions are blended together into a continuous path or each segment is exe cuted individually by stopping at the end of the segment and starting again with the next segment Figure 717 shows the result of turning the continuous path on or off for two similar cases x y z o n a o n a o n a q Figure 716 Transformation between initial and final locations in Cartesianspace trajectory planning The motion can be decomposed into a translation and a rotation about an axis q Starting point Without blending With blending Starting point Without blending With blending Figure 717 With the continuous path on or off the resulting motion differs depending on the start point Trajectory Planning 265 Example 76 A 2DOF planar robot is to follow a straight line between the start point 310 and the end point 814 of the motion segment Find the joint variables for the robot if the path is divided into 10 sections Each link is 9 inches long Solution The straight line between the start and the end points in Cartesian space can be described by m y14 x8 1410 83 0 8 or y 0 8x 7 6 The coordinates of the intermediate points can be found by simply dividing the differences between the x and the y values of the start and end points The angles for the two joints are then found for each intermediate point The results are shown in Table 71 and Figure 718 Table 71 The coordinates and joint angles for Example 76 x y θ1 θ2 1 3 10 188 109 2 35 104 19 1040 3 4 108 195 1004 4 45 112 202 958 5 5 116 213 909 6 55 12 225 857 7 6 124 241 801 8 65 128 26 742 9 7 132 282 678 10 75 136 308 607 11 8 14 339 528 0 20 40 60 80 100 120 1 6 11 Trajectory segment number Degrees Joint 1 Joint 2 Figure 718 The joint positions for the robot in Example 76 Introduction to Robotics 266 Example 77 A 3DOF robot designed for lab experimentation at Cal Poly has two links each 9 inches long As shown in Figure 719 the coordinate frames of the joints are such that when all angles are zero the arm is pointed upward The inverse kinematic equations of the robot are also given We want to move the robot from point 9610 to point 358 along a straight line Find the angles of the three joints for each intermediate point and plot the results θ1 tan1 PxPy θ3 cos1 PyC1 2 Pz 8 2162 162 θ2 cos1 C1 Pz 8 1 C3 PyS3 18 1 C3 C1 Solution In this exercise we divide the distance between the start and end points into 10 segments although in reality it is divided into many more sections The coordinates of each intermediate point are found by dividing the distance between the initial and end points into 10 equal parts The inverse kinematic equations are used to calculate the joint angles for each intermediate point as shown in Table 72 The joint angles are shown in Figure 720 77 Continuous Trajectory Recording In some operations such as spray painting and deburring the motions required to accomplish a task may be either too complicated or too intricate to be generated by straight lines or other higherorder polynomials Instead it is possible to teach the robot how to move record the motions and later replay the motions and execute them To do this imagine that a robot can be moved by an operator in the same fashion required to accomplish a task in real time This can be done either by releasing the joint brakes and physically moving the robot or by moving the joints of a robot model that is similar to the real one but is much lighter and can be moved easily In either case the joint values are continuously sampled in time and are recorded throughout the motion Later by playing back the sampled data and driving the robot joints accordingly the robot is 8 2 9 2 9 y z x xU yU zU z0 x0 x1 z1 z2 x2 z3 z4 x3 x4 Figure 719 Robot from Example 77 and its coordinate frames Trajectory Planning 267 forced to follow the same trajectory that was recorded and perform the task as planned can you tell whether the system records the path or the trajectory Obviously this technique is simple and requires little programming or calculations However all motions must be accurately performed sampled and recorded for accurate playback Additionally every time a part of the motion needs to be changed the robot must be programmed again This is particularly difficult for large heavy robots especially if they are larger than a human operator 78 Design Project You may continue with either design project you started in the previous chapters Here you may run your robot based on any or all of the methods we discussed in this chapter Of course this is only possible if you Table 72 The hand frame coordinates and joint angles for the robot in Example 77 Px Py Pz θ1 θ2 θ3 9 6 10 563 272 1047 84 59 98 549 254 1092 78 58 96 534 238 1136 72 57 94 516 224 1179 66 56 92 497 212 1219 6 55 9 475 201 1258 54 54 88 45 193 1295 48 53 86 422 187 133 42 52 84 389 184 1363 36 51 82 352 185 1394 3 5 8 31 189 1422 0 20 40 60 80 100 120 140 160 1 2 3 4 5 6 7 8 9 10 11 Intermediate point number Degrees Joint 3 Joint 1 Joint 2 Figure 720 Joint angles for Example 77 Introduction to Robotics 268 make the robot and you can control the joints as needed In Chapter 9 we discuss actuators which enable you to select appropriate actuators for your robot and run it In that case you may start with simpler trajectories and continue with more sophisticated ones As an example you may first run your robot in a simple pointto point mode Next divide the path between the two or more destination points into a small number of seg ments and then continue with increasingly more segments until an acceptable straightline motion is achieved You may also try jointspace trajectoryplanning methods such as linear segments with parabolic blends or 434 polynomials As you continue with this you will realize that trajectory planning is a very interesting part of creating a robot It is in trajectory planning that you may create a robot that is more than just a mechanism that moves in space 79 Summary In this chapter we learned how a robot is actually moved in a predictable manner Without an appropriately planned trajectory the robots motions are not predictable It may collide with other objects go through undesirable points or be inaccurate Trajectories may be planned in joint space in Cartesian space or both Trajectories in each space may be planned through a number of different methods Many of these methods may actually be used for both the Cartesian space and the joint space However although Cartesianspace trajectories are more realistic and can be visualized more easily they are more difficult to calculate and plan Obviously a specific path such as a straightline motion must be planned in Cartesian space to be straight But if the robot is not to follow a specific path jointspace trajectories are easier to calculate and generate In the next chapter we will discuss how a robot may be controlled References 1 Brady M JM Hollerbach TL Johnson T LozanoPerez MT Mason editors Robot Motion Planning and Control MIT Press Cambridge Mass 1982 2 Craig John J Introduction to Robotics Mechanics and Control 4th ed Pearson Education 2017 3 Eman KF SooHun Lee JC Cesarone Trajectories in International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons New York 1988 pp 17961810 4 Patel RV Z Lin Trajectory Planning in International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons New York 1988 pp 18101820 5 Selig JM Introductory Robotics Prentice Hall 1992 6 Fu K S RC Gonzales CSG Lee Robotics Control Sensing Vision and Intelligence McGrawHill New York 1987 7 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 8 Tsai LungWen Robot Analysis John Wiley and Sons 1999 9 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots volume 1 ASME Press 2018 10 Derby Stephen Simulating Motion Elements of GeneralPurpose Robot Arms The International Journal of Robotics Research vol 2 no 1 spring 1983 pp 312 Problems 71 The 2DOF planar robot shown in Figure P71 with 10inch arms starts at θ1 20 and θ2 20 with a destination at θ1 50 and θ2 80 The maximum angular velocity of each joint is θ 10sec Derive the equations of motion of the robot and calculate and plot the locations of the end of the robot for each second if both joints move at their maximum speed Trajectory Planning 269 72 Repeat Problem 71 but assume the joint movements are normalized to start and stop at the same time 73 It is desired to have the first joint of a 6axis robot go from an initial angle of 30 to a final angle of 70 in 3 seconds Calculate the coefficients for a thirdorder polynomial jointspace trajectory Determine the joint angles velocities and accelerations at one two and three seconds It is assumed that the robot starts from rest and stops at its destination 74 It is desired to have the third joint of a 6axis robot go from an initial angle of 20 to a final angle of 80 in 4 seconds Calculate the coefficients for a thirdorder polynomial jointspace trajectory and plot the joint angles velocities and accelerations The robot starts from rest but should have a final velocity of 5sec 75 It is desired to have the second joint of a 6axis robot go from an initial angle of 0 to a final angle of 90 in 1 second Calculate the coefficients for a thirdorder polynomial jointspace trajectory Determine the joint angles velocities and accelerations at 01 02 05 and 09 seconds It is assumed that the motion starts at 5sec and stops at the end of the motion 76 Repeat Problem 75 but plot the position velocity and acceleration versus time 77 The second joint of a 6axis robot is to go from an initial angle of 20 to an intermediate angle of 80 in 5 seconds and continue to its destination of 25 in another 5 seconds Calculate the coefficients for thirdorder polynomials in joint space Plot the joint angles velocities and accelerations Assume the joint stops at intermediate points 78 A fifthorder polynomial is to be used to control the motions of the joints of a robot in joint space Find the coefficients of a fifthorder polynomial that will allow a joint to go from an initial angle of 0 to a final joint angle of 75 in 3 seconds while the initial and final velocities are zero and initial acceleration and final decelerations are 10sec2 79 Joint 1 of a 6axis robot is to go from an initial angle of θi 30 to the final angle of θf 120 in 4 seconds with a cruising velocity of ω1 30sec Find the necessary blending time for a trajectory with linear segments and parabolic blends and plot the joint positions velocities and accelerations 710 A robot is to be driven from an initial position through two via points before it reaches its final des tination using a 434 trajectory The positions velocities and time duration for the three segments for one of the joints are given Determine the trajectory equations and plot the position velocity and acceleration curves for the joint x0 z0 y0 θ2 θ1 Figure P71 Introduction to Robotics 270 θ1 20 θ1 0 θ1 0 τ1i 0 τ1f 1 θ2 60 τ2i 0 τ2f 2 θ3 100 τ3i 0 τ3f 1 θ4 40 θ4 0 θ4 0 711 A 2DOF planar robot is to follow a straight line in Cartesian space between the start point 26 and the end point 123 of the motion segment Find the joint variables for the robot if the path is divided into 10 sections Each link is 9 inches long 712 The 3DOF robot from Example 77 as shown in Figure 718 is to move from point 3 5 5 to point 3 5 5 along a straight line divided into 10 sections Find the angles of the three joints for each inter mediate point and plot the results Trajectory Planning 271 1 8 Motion Control Systems 81 Introduction Imagine that the controller of a robot sends a signal to one of the actuators to accelerate to the next location Even with a feedback signal to stop the motion as soon as the joint reaches the desired destination the joint may overshoot and go beyond the desired value requiring that a negative signal be sent to the actuator to return it perhaps multiple times until the position is achieved accurately At worst with an unstable system the oscillations may become larger not smaller and eventually destroy the system This happens due to the inertia of the actuator and the linkage attached to it which continue moving even when the signal is turned off Obviously it should be possible to decrease the signal current voltage and so on to the actuator and slow it down as it approaches the destination in order to avoid overshoot But how early and at what rate should we do this How do we make certain the system does not become unstable Can we force the actuator to reach the destination as fast as we desire without overshoot and if so at what rate All these are basic questions that are answered by designing a control system that behaves as desired In this chapter we learn about fundamental definitions building blocks and the theory of motion control systems and how they may apply to robots We continue to refer to this chapter as we discuss actuators and sensors later What we cover in this chapter is not and cannot be complete The assumption is that you either have had a course on control theory or that you will eventually learn it elsewhere Instead we present an intro duction so that a student who has not learned the material yet will be able to understand how motion control theory is applied to robots Please refer to other sources for more complete treatment of the subject 1 2 3 4 5 6 7 8 9 82 Basic Components and Terminology Figure 81 shows the basic components of a control system A control system is used to change control the behavior of a device machine or process called a plant The plant may be an air conditioning system a chemical process an iron a robot and so on In each case the plant creates an effectan output such as the changing temperature of the room or the iron the flow rate in the chemical process or the motion of the robot arm To perform its function the control system uses sensors such as a thermostat a flowmeter or a potentiometer and encoder to measure the output of the plant The controller receives the output signal as its own input signal and based on its design controls the plant and its output the desired temperature in a room or on an iron the rate of flow or the final destination of the robot linkage and its speed Note that there is a difference between the nature of different controllers In the air conditioning system or the iron the controller regulates the output In the robot it tracks the motions and controls their specification This is called a servocontroller system 273 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed An openloop controller lacks a feedback signal and is not aware of the output For example as we discussed in Chapter 1 a robots processor calculates the destinations joint variables and sends the information to the controller If the robot controller were openloop it might send a signal to a joint motor proportional to how far it needs to go but not be aware of whether or not the joint moves at the desired rate With a closedloop controller that includes feedback the controller will receive a signal from the joint indicating its response to the control signal If the motion is not as desired the controller increases or decreases the control signal to force the arm to behave as desired Figure 81 also shows a summing operation between the feedback signal and the input reference signal As you see the feedback signal is subtracted from the reference input signal resulting in an error signal The error signal is the driving signal for the controller For a stable system the feedback signal must be subtracted from the input reference signal Otherwise if they are added the resulting signal becomes larger as the output increases further increasing the output until the system blows up To better understand the relationship between the different elements of a control system lets first consider the behavior of a plant or the systems dynamics 83 Block Diagrams The pictorial representation of a control system depicted in Figure 81 is called a block diagram It assists us in visualizing the relationship between different elements of the system such as the plant the signals the con troller the feedback loop and others Figure 82 shows the simplest block representing a system with its input and output Although the actual system in each block is not shown the relationship between the input and output of the block is represented by an equation As long as this relationship is known the details of the block are not needed for analysis The block diagram also shows how the signals flow between different ele ments and how they are used Later we use block diagrams to represent systems and derive mathematical relationships that govern them 84 System Dynamics A plants behavior is a function of its physical characteristics and external influences and how they are related to each other For example when an iron is connected to a power source it starts to heat up The rate at which the iron heats up is a function of factors such as voltage the resistance of the heating element and how the Controller Sensor Output Input reference Error signal Plant Feedback signal Σ Figure 81 Basic components of a control system G Input Output Figure 82 A simple block diagram Introduction to Robotics 274 element is attached to the body as well as a function of the heat capacity of the iron and the materials used Would you expect that without a control element the iron would eventually melt due to increased temper ature Perhaps But as the irons temperature increases the heat it dissipates also increases until eventually a balance may be achieved Therefore the behavior of the iron is a function of its heat capacity the input power rate of heat dissipation and materials used Similarly if a voltage is applied to a motor the angular acceleration of the rotor is a function of the voltage and the inertia of the rotor However if the same motor is attached to an arm such as a robot arm or a fan blade the moment of inertia of the arm also affects the angular acceleration of the rotor Therefore in this case too the systems behavior is a function of the input voltage the moments of inertia of the rotor and the arm and other physical factors The relationship between these elements is called system dynamics which are represented by the plant in Figure 81 A systems dynamics are generally represented by differential equations and must be known before a control scheme can be designed for the system Although superficially it may appear that mechanical electrical hydraulic chemical and pneumatic sys tems are very different they can be represented with differential equations that are very similar in nature Systems generally include inertia stiffness damping and external forcing functions that can be represented by similar equations and therefore in most cases are equivalent Consequently the control of a system whether mechanical electrical chemical process hydraulic or any combination thereof involves the same procedures and basic theory Referring to Example 61 and Figures 62 and 63 repeated here when a force is applied to the mechanical massspring system the mass moves in relation to Eq 81 This equation represents both the systems dynamic response to the input force and the plant in Figure 81 A controller may be used to control this response based on the elements in Figure 81 As the controller applies a force and the mass moves a sensor measures the movements and feeds back the signal to the controller which in turn adjusts the force to achieve the desired motion F ma Fxkx mx Fx mx kx 81 Similarly consider the rotor of a motor with its inertia and damping Figure 83 The response of the rotor to the torque generated by the magnetic field and the magnets can be represented as T Iθ b θ 82 We will discuss this in more detail in Chapter 7 k x F m Figure 62 Repeated x kx mg R F ma Figure 63 Repeated Motion Control Systems 275 Example 81 Derive the equations that describe the behavior of the mechanical and electrical systems in Figure 84 and compare the results Solution The equation representing the mechanical system can be derived by drawing the freebody diagram as shown in Figure 85 md2x dt2 bdx dt kx F 83 Using Kirchhoffs laws we derive the equation representing the electrical circuit as Ldi dt Ri 1 C idt e 84 Substituting i dq dt in Eq 84 we get Ld2q dt2 Rdq dt 1 C q e 85 Im Iθ bθ Tm Figure 83 Representation of the dynamic behavior of a motor e C R L i k m F x b Figure 84 A mechanical system and an electrical system m kx F mx bx R mg Figure 85 Freebody diagram for Example 81 Introduction to Robotics 276 Note how the terms in Eqs 83 and 85 are similar This indicates that these two systems behave similarly and that the elements in each system are equivalent The similarity between these elements is summarized in Table 81 Similarly Table 82 shows the forcecurrent equivalents between mechanical and electrical systems Similar differential equations can also be derived for hydraulic thermal and pneumatic systems Example 82 Figure 86 shows a simple hydraulic lift As we see later when a feedback system is added to the hydraulic valve the same basic system can be used in a hydraulic robot to move the joints Table 81 Forcevoltage analogy between mechanical and electrical systems Mechanical systems Electrical systems Force F or torque T Mass m or moment of inertia J Viscous coefficient of friction b Spring constant k Displacement x or angular displacement θ Velocity x or angular velocity θ Voltage e Inductance L Resistance R Reciprocal of capacitance 1C Charge q Current i Table 82 Forcecurrent analogy between mechanical and electrical systems Mechanical systems Electrical systems Force F or torque T Mass m or moment of inertia J Viscous coefficient of friction b Spring constant k Displacement x or angular displacement θ Velocity x or angular velocity θ Current i Capacitance C Reciprocal of resistance 1R Reciprocal of inductance 1L Magnetic flux linkage Voltage e Supply Return Return Load Hydraulic valve x y Figure 86 Representation of a hydraulic lift Motion Control Systems 277 As the valve stem is pushed down the pressurized hydraulic fluid is pushed into the lower chamber of the hydraulic ram lifting the load and pushing out the oil above the piston through the return line and vice versa x and y represent the motions of the valve stem and the piston The rate of flow q of the fluid through the valve and into the cylinder which is proportional to x equals the rate of change of volume of the cylinder under the piston which is equal to the piston veloc ity times the area Therefore the behavior of the system can be represented by the following firstorder differential equation q Cx A d dty y C Ax 85 Laplace Transform The differential equations describing the behavior of a system may not always be easy to analyze Transform ing a differential equation ft in the time domain into Fs in the Laplace domain allows us to analyze the equation algebraically Later through an inverse Laplace transform we get solutions in the time domain as becomes clear soon The following is an introduction to the Laplace transform The Laplace transform Fs is defined as f t F s 0 estdt f t 0 f t estdt 86 where s σ jω To see how this is done we derive the Laplace transform for a step function f t 0 for t 0 A for t 0 87 Substituting Eq 87 into Eq 86 we get A F s 0 Aestdt A s est 0 A s 88 For a unit step function A 1 this reduces to F s 1 s Similarly the Laplace transform for a ramp function defined next is f t 0 for t 0 At for t 0 At 0 At estdt At s est 0 0 Aest s dt A s 0 estdt A s 1 s A s2 89 A sinusoidal function defined next can be transformed into the Laplace domain as follows f t 0 fort 0 A sin ωt for t 0 Introduction to Robotics 278 where ejωt cos ωt j sin ωt ejωt cos ωtj sin ωt Therefore sinωt 1 2j ejωt ejωt and A sinωt 0 A 2j ejωt ejωt estdt A 2j 1 sjω 1 s jω Aω s2 ω2 810 In general Laplace transform equations are tabulated and may be used directly from a table 9 Table 83 lists a few select Laplace transforms that are commonly used in controls For more functions refer to refer ences 1 4 5 9 The last three equations in Table 83 representing the derivatives of functions are very useful As shown when the initial conditions for a function are zero the Laplace transform of the first and second derivatives of Table 83 Laplace transform pairs ft Fs Unit impulse 1 Step Au t A s Ramp At A s2 tn n 1 sn 1 e αt 1 s α sinωt ω s2 ω2 cosωt s s2 ω2 eαt sinωt ω s α 2 ω2 eαt cosωt s α s α 2 ω2 kf t kF s f1 t f2 t F1 s F2 s f t sF s f 0 f t s2F s sf 0 f 0 f n t snF s sn1f 0 f n1 0 Motion Control Systems 279 a function are sFs and s2Fs Therefore for a variable x F s x sF s and x s2F s As mentioned earlier the Laplace transform simply reduces a differential equation into an algebraic equation Example 83 Figure 84 and Eq 83 from Example 81 show a massspringdamper system and the differential equation representing it Find the Laplace transform of this equation assuming all initial conditions are zero Assume that the external forcing function is a step function At Solution From Table 83 we get mx bx kx A t ms2F s bsF s kF s A1 s F s A s ms2 bs k Example 84 Using Table 83 derive the Laplace transform of a sine function from a cosine function Solution The Laplace transform of a sine can be derived using Fs for a cosine and the function for the derivative of a Laplace transform as follows f t cosωt f t d dt cosωt ω sinωt sinωt 1 ω d dtcosωt A sinωt A ω d dtcosωt A ω sF s f 0 A ω s2 s2 ω2 1 A sinωt Aω s2 ω2 Final value theorem The final value theorem allows us to calculate the final value of a timedomain func tion at t For example if the input to a system is a step the final value theorem enables us to calculate the eventual final value of the response of the system or its steadystate value It can be calculated from the following lim t f t sF s s 0 811 Example 85 Find the steadystate value of F s k s a for a step input P Solution The Laplace transform for a step input with magnitude P is P s Therefore lim t f t sF s s 0 s k s a P s s 0 kP a Introduction to Robotics 280 86 Inverse Laplace Transform The Laplace transform process was used to convert a differential equation in the time domain into an alge braic equation in the s domain The inverse Laplace transform refers to the process of inverting an equation from the Laplace domain to the time domain Two common methods used are the application of Table 83 and the application of the partial fraction expansion method In this process an equation in the Laplace domain is broken into simple terms where each term can easily be transformed into the time domain using Table 83 as follows F s F1 s F2 s Fn s 1F s 1F1 s 1F2 s 1Fn s f1 t f2 t fn t Assuming that F s N s mD s n where Ns and Ds are the numerator and denominator and assuming that the order of the denominator n is larger than the order of the numerator m we can break the equation into the following form where z and p values are zeros and poles F s N s m D s n K s z1 s z2 s zm s p1 s p2 s pn 812 Therefore we should be able to break the equation into simple terms where the inverse Laplace transform can be found Note that in order to be able to do so the roots of the denominator Ds must be known 861 Partial Fraction Expansion When Fs Involves Only Distinct Poles If the roots p of the denominator are all distinct Fs can be broken into the following form where coefficients a called residues are constants F s N s m D s n a1 s p1 a2 s p2 an s pn 813 Since multiplying both sides of Eq 813 by any s pk and setting s pk will eliminate all terms except ak we can find any of the residues using the following equation ak s pk N s D s s pk 814 and since each term can be inverted to the time domain f t 1 F s a1ep1t a2ep2t anepnt 815 Example 86 Derive the inverse Laplace transform of the following equation F s s 5 s2 4s 3 Solution The given equation can be broken into the following F s s 5 s2 4s 3 s 5 s 1 s 3 a1 s 1 a2 s 3 Motion Control Systems 281 From Eq 814 we get a1 s 1 s 5 s 1 s 3 s 1 s 5 s 3 s 1 4 2 2 a2 s 3 s 5 s 1 s 3 s 3 s 5 s 1 s 3 2 2 1 From Eq 815 the inverse Laplace transform is f t 1 F s 1 2 s 1 1 1 s 3 2et e3t 862 Partial Fraction Expansion When Fs Involves Repeated Poles If the roots of Eq 813 are repeated Eq 814 will not result in the desired residues To solve for the resi dues assuming that there are q repeated roots s p q Fs can be written as F s N s m D s n bq s p q bq1 s p q1 b1 s p a1 s p1 a2 s p2 an s pn 816 where bq values are constants and can be found from bq s p qF s s p bq1 d ds s p qF s s p bqk 1 k dk dsk s p qF s s p 817 The inverted time domain equation is f t bqtq1 q1 bq1tq2 q2 b2t 1 b1 ept a1ep1t a2ep2t anepnt 818 Example 87 Derive the inverse Laplace transform of the following equation F s s 5 s 2 2 s 3 Solution Since there are two repeated roots we use Eqs 816 817 and 814 to get F s b2 s 2 2 b1 s 2 1 a1 s 3 Introduction to Robotics 282 b2 s 2 2 s 5 s 2 2 s 3 s 2 3 b1 d ds s 2 2 s 5 s 2 2 s 3 s 2 d ds s 5 s 3 s 2 s 3 s 5 s 3 2 s 2 2 a1 s 3 s 5 s 2 2 s 3 s 3 2 F s 3 s 2 2 2 s 2 2 s 3 The timedomain equation is f t 3t 1 2 e2t 2e3t 3te2t 2e2t 2e3t 863 Partial Fraction Expansion When Fs Involves Complex Conjugate Poles The previous methods apply to complex conjugate poles too but we will study this in more detail for its unique characteristics Complex conjugate poles always appear in pairs and have the form a jb This is because as we know for a secondorder polynomial fs the roots are f s as2 bs c 0 p1p2 b b24ac 2a If the discriminant b24ac 0 there will be complex conjugate poles in the form f s sp1 sp2 For example for f s s2 2s 5 we get f s s 1 2j s 12j Therefore Eq 813 can be written as F s N s m D s n c1 s σ jω c2 s σjω a1 s p1 an s pn 819 The same techniques used for distinct poles and repeated poles may be used to calculate the residues including the complex conjugate residues However the inverse Laplace equation in the time domain is f t c1e σ jω t c2e σjω t a1ep1t 820 Since Eq 810 can be rewritten as sinθ ejθ ejθ 2j and cosθ ejθ ejθ 2j 821 the complex portion of Eq 820 results in a decaying sinusoidal response Therefore as we will see later when complex conjugate poles are present the system is underdamped consequently it oscillates Motion Control Systems 283 Alternately we may expand an equation with complex conjugate roots as shown in Example 88 Example 88 Derive the inverse Laplace transform of the following equation F s 1 s s2 2s 2 Solution The denominator of the equation contains complex conjugate roots s 1 j1 and s 1j1 We expand the equation using the following form F s a1 s a2s a3 s2 2s 2 a1 s2 2s 2 s a2s a3 s s2 2s 2 Setting the numerator equal to the numerator of the original equation we get a1 s2 2s 2 s a2s a3 1 a1 a2 0 2a1 a3 0 2a1 1 a1 12 a2 12 a3 1 and F s 1 2s s 2 2 s2 2s 2 1 2s 1 2 s 1 2 1 s 1 2 s 1 2 1 From Table 83 the inverse Laplace transform of the given equation is f t 1 2 1 2et sint 1 2et cost Example 89 For the simple system shown in Figure 87 derive the equation of motion when a step force of F0 is applied at t 0 Assume b 2 and k 4 and all initial conditions are zero f k b y Figure 87 The system for Example 89 Introduction to Robotics 284 Solution As in Example 81 the equation of motion can be written as by ky f or 2y 4 f 2sF s 4F s F0 s F s F0 2s s 2 F s a1 2s a2 s 2 where a1 2sF s s 0 F0 2 and a2 s 2 F s s 2 F0 4 Therefore F s F0 4s F0 4 s 2 and f t F0 4 1e2t The response is exponential eventually reaching the value of F04 Note that the same result may be found from the application of the final value theorem f t ss sF s s 0 sF0 2s s 2 s 0 F0 2 s 2 s 0 F0 4 87 Transfer Functions A transfer function is the equation that represents the ratio of output to input in a system It may be written across a block or across a complete system Figure 88 shows the block diagram for a simple system where the output signal is directly fed back to the summing junction In this system Rs Ys Gs and Hs represent the input output system dynamics plus any controller and feedback multiplier respectively The transfer function for each block is simply the ratio of its output to its input We define the following transfer functions Openloop transfer function The ratio of the feedback signal to the actuating error signal while the feedback loop is open although the sensor still reads the output Here the sensor is used to read the output and report it as the feedback signal Therefore Y s E s G s B s Y s H s E s G s H s Error signal Rs Ys Feedback signal Gs Hs Bs Es Σ Figure 88 The block diagram for a simple control system Motion Control Systems 285 OLTF B s E s E s G s H s E s G s H s 822 As you see if the feedback loop is disconnected from the summing junction the feedback signal is in fact a function of GsHs Feedforward transfer function The ratio of the output to the actuating error signal or FFTF Y s E s G s 823 If the feedback function is unity the openloop and feedforward transfer functions are the same Closedloop transfer function The ratio of output to input for the system For the system in Figure 88 the closedloop transfer function is Y s G s E s E s R s B s R s Y s H s Eliminating Es we get Y s G s R s Y s H s Y s 1 G s H s G s R s Consequently the closedloop transfer function is CLTF Y s R s G s 1 G s H s 824 Assuming that both Gs and Hs can be represented in ratios of polynomials as G s NG s DG s and H s NH s DH s Eq 824 can be written as CLTF G s 1 G s H s NGDH NGNH DGDH 825 This form of the closedloop transfer function can assist in quickly composing the equation if the numera tors and denominators of Gs and Hs are known Together the block diagram and the transfer function represent the behavior of a system with feedback mathematically and graphically Example 810 Write the openloop feedforward and feedback transfer functions for the system in Figure 89 Rs Ys Bs Es 1 ss2 1 s Σ Figure 89 The system from Example 810 Introduction to Robotics 286 Solution We substitute appropriate values into Eqs 822824 to get OLTF G s H s 1 s s 2 1 s 1 s2 s 2 FFTF G s 1 s s 2 CLTF G s 1 G s H s 1 s s 2 1 1 s s 2 1 s s s2 s 2 1 We may also calculate the closedloop transfer function directly from Eq 825 as CLTF NGDH NGNH DGDH 1 s 1 1 s s 2 s s 1 s2 s 2 Example 811 Assume that a sensor reads the position of the mass in a massspringdamper system and feeds it back to the inputforce system as shown in Figure 810 Derive the closedloop transfer function for this system Solution Eq 83 repeated here represents the differential motion of the system and its Laplace transform md2x dt2 bdx dt kx F andG s 1 ms2 bs k Assuming that the feedback gain is A the block diagram in Figure 810 represents the system From Eq 825 the closedloop transfer function for the system is CLTF 1 A ms2 bs k 1 ms2 bs k A Notice how the feedback gain is added directly to the spring constant and therefore it can easily augment the stiffness of the spring The following application shows how this can be used in a control system k m F x b Rs Ys Bs 1 ms2 bs k A Σ Figure 810 A massspringdamper system with position feedback Motion Control Systems 287 The jumping robot Imagine a robot that jumps for locomotion There are many examples of robots that have this mode of locomotion including robots that mimic animals such as Spot a robot with four legs that gallops or trots like a horse a pogostick robot with one leg and one that lowers its body and then jumps by quickly extending its legs Most robots of this nature are designed for learning how animals and humans perform their tasks but they have utilitarian applications too In all these the legs contain a spring for energy storage absorption and controlled landing Figure 811 shows a generic depiction of such a system As a result of different loading conditions jump characteristics and control requirements it may be necessary to change the stiffness of the springs inside the legs However readily changing the stiffness of a mechanical spring in situ is no easy task if not impossible As shown in Example 811 a simple feed back gain A can be used to control the effective stiffness of the spring through the feedback loop The same system can also be used in a car to change the effective stiffness of the springs in the suspen sion system therefore forcing it into different modes of operation such a smooth ride sporty ride and so on 88 Block Diagram Algebra In reality block diagrams are not always as simple as the one shown in Figure 88 They may contain multiple parallel and series loops summing junctions and inputs However in general a block diagram can be reduced to the simple form in Figure 88 as long as the results remain the same In this respect remember that The products of the feedforward transfer functions must remain the same The products of the transfer functions around a loop must remain the same Table 84 shows some equivalent block diagrams that may be used in reducing larger block diagrams Example 812 To reduce the block diagram in Figure 812a to a simple standard form do the following 1 Referring to Table 84 the first and second loops can be simplified as G1 1 G1H1 and G3 1 G3H2 as shown in Figure 812b Figure 811 A generic leg design for jumping robots Introduction to Robotics 288 2 Combine the three gains in the forward loop and replace with G4 G1G2G3 1 G1H1 1 G3H2 as shown in Figure 812c 3 Transfer C1 into the loop and replace the gains as shown in Figure 812d 4 Simplify the loop as shown in Figure 812e Table 84 Equivalent block diagrams ABC A ABC B C AB BC A G1 G2 B B G11G1G2 A A AG1G2 G1 G2 A G1G2 A AG1G2 A AG1G2 G1 A G2 G1G2 AG1G2 A AB G AGBG B AGBG G G A B G A AG B AGB A BG ABG G AGB 1G B AG1G2 A A 1G2 G1 AG1AG2 G1 G1 G2 G2 G2 B G1G2 B 1G2 A A Motion Control Systems 289 89 Characteristics of FirstOrder Transfer Functions Firstorder systems are represented in the following standard forms G s Kss τs 1 Kssτ s 1τ Kssa s a 826 where Kss is the steadystate gain and τ is the time constant As you notice the denominator of this equation is a firstorder polynomial with its root called a pole at s a The response of such a system to a step function Put is F s Kssa s a P s PKss s PKss s a The time response can be written as f t PKss 1eat u t 827 The final value of the function is PKss The time response of the firstorder system is shown in Figure 813 The following definitions characterize the response The final value is PKss τ is the time constant an indication of how fast the system responds to the step function A G1 H3 H1 G2 G3 H2 C1 A H3 C1 G4 H3C1 C1G4 A C1G4 1H3G4 A a e d c b A G1 1G1H1 H3 G2 G3 1G3H2 C1 Figure 812 The block diagram for Example 812 Introduction to Robotics 290 a 1τ is a pole The location of the pole in a realimaginary plane relative to the imaginary axis yaxis specifies whether the system is stable and how fast it responds If the pole is to the left of the yaxis negative the response 1eat is bounded If it is to the right of the imaginary axis the response is 1eat which is not bounded To find the time constant let t τ to get x t τ PKss 1eττ PKss 0 63 63 PKss 828 Hence xt reaches 63 of the final value in t τ seconds as shown in Figure 813 This indicates how fast the response is a longer τ indicates a longer time to reach the final value Rise time is the time required between 10 and 90 of the final value and can be found by substituting 10 and 90 into Eq 827 as Tr 2 2τ Settling time is the time from 0 to 98 rise and is Ts 4τ The slope at t 0 can be found by differentiating Eq 827 as dx dt PKss 0 a eat dx dt t 0 PKssa PKss τ 829 This slope is shown in Figure 813 which obviously indicates how fast the rise time is As τ increases the slope decreases Since rise time cannot be zero the slope cannot be infinite In firstorder transfer functions the system responds as soon as ut is applied Now lets look at a closedloop firstorder transfer function as shown in Figure 814 The feedback is unity but there is a proportional gain KP added to the feedforward path Es R 1 KP Kss τs 1 Y Σ Figure 814 A closedloop firstorder system xt 100 98 10 63 XssPKss t 0 90 Rise time τ Figure 813 The time response of a firstorder system to a step function Motion Control Systems 291 Using Eq 825 the transfer function can be written as TF s KPKss KPKss τs 1 Ksys τsyss 1 where τsys τ KPKss 1 and Ksys KPKss KPKss 1 As the proportional gain KP varies it affects the behavior of the system although the plant remains the same For example when KP increases τsys decreases causing the system to respond faster Similarly Ksys approaches 1 making the system more accurate 810 Characteristics of SecondOrder Transfer Functions Secondorder transfer functions are represented in the following standard form G s ω2 n s2 2ζωns ω2 n 830 where ζ is the damping ratio and ωn is the natural frequency The response of such a system to a step function ut is F s ω2 n s2 2ζωns ω2 n 1 s After partial fraction expansion the time response of the system may be written in either of the follow ing forms f t 1eζωnt cosωdt ζ 1ζ2sinωdt 831 or f t 1 1 1ζ2eζωnt sin ωdt α 1 ζ 1 832 where ωd ωn 1ζ2 and α tan1 1ζ2ζ Eqs 831 and 832 have an exponential portion and sinusoidal portions Therefore the response is an oscillatory function influenced by whether the exponential portion is decaying or growing as follows If ζ 0 indicating no damping the exponential portion becomes a constant Consequently the response is a sinusoidal function that oscillates indefinitely as shown in Figure 815a If ζ 1 indicating critical damping the response is an exponential function that eventually achieves the steadystate value Figure 815b If the exponential portion grows the response grows as well indicating an unstable system If the exponential portion decays indicating less than critical damping the oscillations decrease in size until the system stabilizes Figure 815c for ζ 0 2 and Figure 815d for ζ 0 4 Differentiating these equations and setting t 0 reveals that the slope of the response is zero This means that unlike firstorder systems where the initial slope is never zero the initial slope of secondorder transfer functions is always zero indicating a slower initial response The steadystate gain or the final value in response to a step function is Fss lim s 0s ω2 n s2 2ζωns ω2 n P s P Introduction to Robotics 292 Figure 816 shows a typical secondorder response to a step function The following characterize this response The peak time Tp is the time to the maximum response value and can be found by taking the deriv ative of Eq 831 and setting it to zero as Tp πωn 1ζ2 833 The rise time Tr is the time that it takes to go from 10 of the response to 90 Unlike for a firstorder system no time constant is defined for a secondorder transfer function Settling time Ts is reached when the response does not vary more than 2 or Ts 4ζωn 834 Percent overshoot OS is the ratio of the overshoot to the steadystate value or OS F max Fss Fss 100 e ζπ 1 ζ2 100 835 For the response in Figure 816 with ζ 0 2 OS 53 Similarly the OS for zero damping results in 100 overshoot as shown in Figure 815a 2 a b c d 2 15 1 05 0 0 5 10 15 20 2 15 1 05 00 5 10 15 20 15 1 05 00 5 10 15 20 2 15 1 05 00 5 10 15 20 Figure 815 The response of a secondorder transfer function to a step function at different damping ratios a ζ 0 b ζ 1 c ζ 0 2 d ζ 0 4 Motion Control Systems 293 811 Characteristic Equation PoleZero Mapping When the denominator of the transfer function is set to zero the resulting equation is called the character istic equation The roots of the characteristic equation are called poles whereas the roots of the numerator of the transfer function are called zeros Polezero mapping is the graphical representation of the locations of the poles and zeros in a realimaginary plane Example 813 Draw the polezero map of the following transfer function TF s s 3 s 5 s 2 s2 4s 5 Solution The poles and the zeros of the transfer function are s 5 s 2 s2 4s 5 0 s 5 s 2 s 2 j s 0 s 3 Note that complex conjugate roots are always in pairs Figure 817 shows the poles shown as and zeros shown as 0 1 2 5 4 3 1 2 Im Re Figure 817 Polezero mapping of the roots in Example 813 1 09 01 5 10 15 Peak time Tp Rise time Tr ωnt Figure 816 A typical response of a secondorder transfer function and its characteristics Introduction to Robotics 294 The loci of the poles and zeros reveal much information about the system and how it behaves From the graph we can identify the transfer function the order of the system and whether it is underdamped critically damped overdamped stable or unstable For a firstorder transfer function of Eq 826 the only pole is τs 1 0 s 1 τ 836 Therefore the reciprocal of the pole location is the time constant Clearly as s increases indicating a smal ler time constant the response of the system is faster When the pole moves to the right closer to the origin the time constant is larger with a slower response As long as the pole is on the left side of the imaginary axis the system is stable A pole at the origin is a pure integrator which we will study later For secondorder transfer functions the solution for the characteristic equation is s2 2ζωns ω2 n 0 s b b24ac 2a 2ζωn 2ζωn 24 ω2 n 2 s ζωn ωn ζ21 837 Four possibilities exist ζ 1 and therefore s ωn repeated twice This means that there will be two poles at the same loca tion This system is critically damped and the response is as shown in Figure 815b ζ 1 and therefore ζ21 is positive resulting in a pair of real and distinct roots and a system that is overdamped ζ 1 and therefore ζ21 is negative In this case the roots are a complex conjugate pair s ζωn ωn 1ζ2j The system is underdamped as shown in Figure 815cd ζ 0 and therefore s ωnj which is an undamped system with complex conjugate roots on the imaginary axis The response is as shown in Figure 815a Figure 818 shows the mapping of the poles of an underdamped system The following relationships hold true d ζωn 2 ωn2 1ζ2 ωn cosθ ζωn ωn ζ θ cos1ζ and hence when ζ 0 θ 90 and as we saw before the system is undamped and the roots are on the imaginary axis When ζ 1 θ 0 and the system is critically damped with real poles Im θ Re 2 1 d n ζ d ω ω ζ n ω Figure 818 An underdamped system with its pair of complex conjugate poles and its characteristics Motion Control Systems 295 Figure 819 shows how the response of the system changes as the poles move in different directions These conclusions are based on the preceding results Higherorder transfer functions may be analyzed similarly through forming the timedomain response of the system based on partial fraction expansion and plotting the result Usually the result includes exponential portions oscillatory sections as well as step functions Depending on the magnitudes of the poles and zeros it may be possible to assume that certain portions of the time response are negligible while others are dominant Regardless the response can be plotted and analyzed through either timedomain plotting or polezero plot ting For further reading on higherorder systems refer to related books and journal articles on this topic 812 SteadyState Error Figure 820 shows a typical control loop The transfer function for this system is Y s R s k1k2 k2H s τs 1 The steadystate error signal Ess is a function of both the transfer function and the type of input to the system It can be written as Ess Rk1YssH 838 where Yss lim s 0s k1k2 k2H s τs 1 R s 839 E Rs H k2 s1 k1 Ys 1 s τ Figure 820 A typical control loop Im Re slower faster less damping more damping no damping critical damping lines of constant damping higher frequency lower frequency Figure 819 The response of the system changes as the poles move in different directions Introduction to Robotics 296 For a step input the steadystate output and the steadystate error signal are Yss lim s 0s k1k2 k2H s τs 1 1 s k1 H 840 Ess 1 k1 k1 H H 0 841 As Eqs 840 and 841 show although the input to the system was a unit step the output is k1H unless k1 H and the steadystate error signal is zero This can be very handy depending on our application For example in a telerobot such as a surgical robot or a repair robot in space that is meant to follow the opera tors motions accurately the steadystate output should be the same as the input In that case the robots motions will be the same as the operators input joystick onetoone mapping with no steadystate error signal On the other hand a large robot with large motions for example the space shuttle robot that handles satellites must make large motions for small motions of the joystick and therefore must have a large gain even though no steadystate error signal is desired In this case an appropriate gain may be selected to pro vide the desired motions while the steadystate error signal remains zero Note that it is assumed that the dynamics of the robot are included in the model Therefore the previous example must be modified to rep resent a robot appropriately In order to see how the steadystate error can be found for any system lets consider a typical feedback loop as shown in Figure 821 The error signal and the transfer function for the system are E s R s Y s H s Y s G s 1 G s H s R s E s 1 1 G s H s R s Ess lim s 0s 1 1 G s H s R s 842 Assume the openloop transfer function GsHs can be represented as G s H s K τas 1 τbs 1 sn τ1s 1 τ2s 1 843 The value of n in Eq 843 determines the type of the system and is an indication of how many pure inte grators are present in the feedforward path For n 0 the system is type0 for n 1 the system is type1 etc Substituting different inputs for R for different system types in Eq 842 will yield the steadystate error signal Step inputs For step inputs we define the static position error coefficient Kp lims 0G s H s Therefore Ess 1 1 Kp Es Rs Gs Ys Hs Figure 821 The typical control loop Motion Control Systems 297 For a type0 system with n 0 G s H s K τas 1 τbs 1 τ1s 1 τ2s 1 Kp K and Ess 1 1 K 844 For a type1 or higher system with n 1 G s H s K τas 1 τbs 1 sn τ1s 1 τ2s 1 Kp and Ess 0 845 Notice how a type1 system has zero steadystate error compared to a type0 system As we will see later having an additional pole in the denominator is equivalent to adding an integrator to a control system bring ing the error to zero Ramp input For ramp inputs we define the static velocity error coefficient Kv lims 0sG s H s Therefore Ess lim s 0s 1 1 G s H s 1 s2 lim s 0 1 sG s H s 1 Kv For a type0 system with n 0 G s H s K τas 1 τbs 1 τ1s 1 τ2s 1 Kv 0 and Ess 846 For a type1 system with n 1 G s H s K τas 1 τbs 1 s τ1s 1 τ2s 1 Kp K and Ess 1 K 847 Therefore for a ramp input the steadystate error in a type0 system is infinite whereas for a type1 system it is finite A similar analysis may be applied for higherorder inputs 813 Root Locus Method The root locus is the collection of the loci of the roots of the characteristic equation plotted on a real imaginary plane as parameters vary The root locus is a powerful tool for both analysis of the system whether it is stable system sensitivity whether it is underdamped critically damped or overdamped and so on as well as system design to determine the location of roots or the magnitude of the gains for specific system behavior To see how the root locus is formed and what it means lets consider the system shown in Figure 822 The transfer function and characteristic equations for the system in Figure 822a are TF Y R KG KGH 1 and KGH 1 0 848 E R G Y K H E R Y K 5s4 ss3s7 Figure 822 A typical control system Introduction to Robotics 298 If we write the openloop transfer function in polynomial form as GH N s D s the characteristic equation can be written as K N s D s 1 0 KN s D s 0 or K D s N s 849 Therefore using Eq 849 the characteristic equation for Figure 822b is 5K s 4 s s 3 s 7 0 850 The root locus is the loci of the roots of Eq 849 as K varies If K 0 the roots for Figure 822b are the poles s 0 3 7 As K increases the location of the roots change until K approaches at which time the roots converge to the zeros of the openloop transfer function s 4 for Figure 822b For every value of K the roots will be at a different location yielding a different behavior Plotting these roots for all values of K root locus allows us to both analyze and predict the behavior of the system Figure 823 shows the root locus for the system in Figure 822b As you see the roots start at the poles where K 0 and move in the direction of the arrows as K increases One of the conclusions we can make right away is that since the poles and the zero are all to the left of the imaginary axis this system can never be unstable Conclusions such as this make the root locus a very pow erful and useful technique In the next sections we study the root locus technique and its applications in the design of control systems Start and end of the root locus The start of root locus is where K in Eq 849 is zero This corresponds to the poles of the openloop transfer function Therefore by plotting the poles in the realimaginary plane we have the start of all portions of the root locus Each portion of the root locus ends at a zero or at where K in Eq 849 approaches Therefore by plotting the openloop transfer function zeros the ends of root loci can be marked off Each portion starts at a pole and ends at a zero or 10 8 6 4 2 2 4 6 8 10 8 6 4 2 0 2 Re Im Figure 823 The root locus for the system in Figure 822b Motion Control Systems 299 If all the roots are numbered sequentially from right to left the root locus exists to the left of the odd numbered roots only Each section starts at a pole and ends at a zero or continues to Root locus between the start and end points The location of each point on the root locus relative to a pole or zero is represented by a vector with real or realimaginary components The magnitude of the overall transfer function at this point is the ratio of the products of all vectors from this point to each zero and pole or MTF Mzi Mpi Mz1Mz2 Mp1Mp2 851 where Mzi and Mpi are the magnitudes of each vector between the zeros or the poles to the point of interest Similarly the corresponding angles of vectors are added as θ θzi θpi 180 852 Example 814 Calculate the magnitude and the angle of the vectors for the characteristic equation K s1 s 1 s 4 s 6 0 shown in Figure 824 for point s 0 4j Solution Using Eqs 851 and852 we get M 12 42 12 42 42 42 62 42 17 32 52 0 4167 θz1 tan14 1 76 θz2 tan1 4 1 104 θp1 tan14 6 33 7 θp2 tan14 4 45 θ 76 10433 745 101 3 Magnitude criterion Equation 851 can be used as a criterion for both determining the root locus and design purposes Based on Eq 848 if the following magnitude criterion is satisfied the closedloop char acteristic equation is also satisfied and the chosen point is on the root locus KGH 1180 853 4 3 2 1 1 8 6 4 2 0 2 P1 P2 z1 z2 Re Im Figure 824 The vectors between a point in the RealImaginary plane and the poles and zeros Introduction to Robotics 300 Angle criterion Similarly based on Eq 853 since K is a real value the angle criterion is satisfied when GH 180 Example 815 Based on the magnitude and angle criteria point s 0 4j from Example 815 is not on the root locus because neither its magnitude 0 4167 1 nor its angle 101 3 180 satisfies the requirements Asymptotes The total number of asymptotes is α poleszeros 854 Asymptote angles The angles of asymptotes are θ π3π5π α 855 This can be summarized as in Table 85 Asymptote center Designating the real components of the poles and zeros as σp and σz the center of the asymptotes where they intersect the real axis is σA σp σZ α 856 Example 816 As shown in Figure 823 based on Eq 856 the center of the asymptotes is σA σp σZ α 037 4 2 3 Breakaway and breakin Points These are the points where the value of K is the largest on the real axis therefore at these points the system is critically damped with the fastest rise time without any overshoot or any oscillations no imaginary components are present and consequently the system will not oscillate To find these points we may take the derivative of the closedloop characteristic equations and set it to zero as follows KG s H s 1 0 K 1 G s H s Table 85 The angles of asymptotes based on their number α Angles of asymptotes 1 180 2 90 270 3 60 180 300 4 45 135 225 315 Motion Control Systems 301 dK ds d ds 1 G s H s 0 857 Except for simple cases calculation of breakaway and breakin points requires solving higherorder poly nomials which is not always readily possible Therefore an estimate can be made for drawing the root locus followed by an iterative process for the exact location if necessary Example 817 The root locus for the following characteristic equation can be drawn as follows GH 1 s1 s 4 s 6 p 1 4 6 Number of asymptotes α 30 3 Angles of asymptotes 60 180 300 Asymptote center σA σp σZ α 146 0 3 3 Breakaway point dK ds d ds s1 s 4 s 6 0 Solve to get s 0 9 and 5 08 Figure 825 shows the root locus Example 818 The root locus for the following characteristic equation can be drawn as follows s2 Ks ω2 0 s jω sjω Ks see Eq 849 Therefore p jω z 0 Number of asymptotes α 21 1 Angle of asymptote 180 10 8 6 4 2 2 4 6 8 10 8 6 4 2 0 2 Figure 825 The root locus for Example 817 Introduction to Robotics 302 Asymptote center is at σA 0 Breakaway point dK ds d ds s2 ω2 s 0 s ω Figure 826 shows the root locus Root locus with MATLAB Although it is crucial that the details of the root locus be learned to be able to draw it and use it as a design tool it is also convenient to use programs such as MATLAB to draw the root locus See available tutorials in MATLAB to learn how to use the program 814 Proportional Controllers Figure 822a shows a system with a proportional gain in the feedforward loop As we discussed earlier when gain K varies the locations of the poles and zeros of the system change as shown on a root locus Therefore the systems behavior is dependent on the value of this gain K Consequently it is possible to select design a value for the gain that makes the system behave in a particular way For example we may desire a system with an overshoot less than a certain percent an overdamped system or a system whose rise time is less than a certain value This process called pole placement allows the designer to select poles and calculate the value of K that yields the particular pole locations Proportional controllers are simple and very common We only need to change the amplification value of a controller that already exists without having to add anything to the system However it is not always possible to find appropriate pole locations with proportional controllers that yield satisfactory results In that case as we see next we may select other types of controllers Please review Figure 819 before we continue with the next subject Note the lines of constant damping the directions of faster or slower response directions of less or more damping and so on In order to see how the root locus may be used to design a proportional controller we use the following example 10 08 06 04 02 02 04 06 08 1 16 12 08 04 0 04 Figure 826 The root locus for Example 818 Motion Control Systems 303 Example 819 Find a proper value for the proportional gain that yields the following requirements for the system Settling time 1 sec overshoot 5 GH K s 1 s 8 Solution Figure 827 shows the root locus for the system As expected there are two poles at 1 and 8 and two asymptotes at s 4 5 Since the system is secondorder we use Eqs 834 and 835 to get Ts 4ζωn ζωn 4 Ts 4 1 4 OS e ζπ 1 ζ2 100 ζ 0 69 by trial and error θ cos1ζ 46 5 ωn 5 8 radsec We were able to use Eq 834 only because this is a secondorder system Otherwise we need to either use approximation based on which pole is dominant or use MATLAB as we will discuss Applying the minimum requirements for the given specifications ζωn 4 and θ 46 5 to the root locus in Figure 827 we find all the acceptable possible root locations left of the vertical line and between the constant damping lines For example point A and its conjugate A or point B with their corresponding K values can be used as possible roots Now we check the steadystate error Note that this particular system is type0 and with a step input its steadystate error is finite Conforming the given GH to the form in Eq 844 we get G s H s K s 1 s 8 Kp K 8 and Ess 1 1 K 8 5 4 3 2 1 1 2 3 4 5 8 6 4 2 0 2 Point A Point B 465 A Figure 827 The root locus for Example 819 Introduction to Robotics 304 Higher K yields lower steadystate error and therefore we should select point A and its conjugate at s 4 5 4 75j We can use Eq 851 to calculate K as follows K Mpi Mzi 3 52 4 752 3 52 4 752 1 34 8 Ess 1 1 K 8 0 187 Figure 828 shows the response of this system to a unit step function plotted by MATLAB Notice how the steadystate error matches the analytical results Also notice that the overshoot is about 5 above the final value not the desired value of 1 The settling time is also about 1 second Figure 829 shows the response of the system if the roots were selected at point B in Figure 827 As you see the settling time is still about 1 second but there is no overshoot critical damping and the steadystate error is much bigger at about 04 We will discuss how to reduce this error in the next section 08 1 06 04 02 0 Amplitude Step Response 0 02 04 06 08 Time sec 1 12 14 Figure 829 The response of the system from Example 819 with critical damping Step Response 08 06 04 02 0 0 02 04 06 08 Time sec Amplitude 1 12 14 Figure 828 The step response of the system from Example 819 Motion Control Systems 305 Example 820 In Example 82 shown in Figure 86 we studied a hydraulic lift Adding a floating lever to the system as shown in Figure 830a makes this system a proportional servo valve As the lever arm is pushed up the supply fluid will move the power piston down which in turn brings down the spool in the valve and eventually closes it Figure 830b shows the feedback loop Note how the transfer function is type0 proportional controller Y s R s l2 l1 l2 K s 1 l1 l1 l2 K s l2K l1 l2 s l1K 815 ProportionalPlusIntegral Controllers Integral controllers provide a means for eliminating steadystate error in a system This is because an inte grator adds an additional s to the denominator of the transfer function therefore raising its type Referring to Section 812 recall that for type0 systems the steadystate error for a step function is a finite value however for type1 systems it is zero Similarly the steadystate error with a ramp input for a type0 system is infinite but finite for a type1 system Each integrator within the system raises its type reducing the error boundary Now imagine that we are designing a control system for a robot It should be clear that i the response of the robot actuators to a step function to go from one location to another should not overshoot ii it should rise to the value of the input signal as quickly as possible and iii it should not have any steadystate error Obviously if the response has an error all our estimations of acceleration velocity and positional accuracy will be wrong Therefore we need to create a controller that delivers all these requirements simultaneously However as we discussed in Example 819 when a proportional controller was used even allowing an over shoot resulted in a significant steadystate error When we placed the poles on the realaxis making it crit ically damped and eliminating the overshoot the steadystate error was further increased In order to have faster response a high gain is needed but that creates overshoot and error When overshoot is reduced error increases further Consequently a proportional controller alone cannot simultaneously provide for fast response no overshoot and zero steadystate error However a system with both proportional and integral elements will improve system response A proportionalplusintegral PI controller with gains KP and KI can be represented as shown in Figure 831 and derived as follows notice that KP used here is different from Kp the static position error coefficient in Section 812 Load Hydraulic proportional valve x y A B C l1 l2 E R Σ Y l2 l1 l2 l1 l1 l2 K s Figure 830 A proportional hydraulic servo valve Introduction to Robotics 306 G Va E KP KI s KP s KI KP s K s zI s 858 where zI KI KP As Eq 858 shows the controller adds a pole at the origin as well as a zero at zI which is influenced by our choice of KI and KP To not severely affect the shape of the root locus by this addition we should pick zI to be close to the origin Therefore the integral gain should be small compared to the pro portional gain With this choice the pole at the origin and the zero near it add an additional small part to the root locus without changing its general shape The following example demonstrates how this can affect the systems behavior Example 821 The system from Example 819 can be modified into a proportionalplusintegral con troller to eliminate the steadystate error We modify the system by adding an integrator pole at the origin and a zero at zI 0 1 Figure 832 shows the root locus for the system GH K s 0 1 s s 1 s 8 As shown the root locus looks similar to Example 819 except that it has a small portion between the origin and the zero Since the system is no longer secondorder the equation for settling time no longer holds but the acceptable range for roots remains about the same Figure 833a is the step response for the system when the roots are selected at A and its conjugate 4 46 4 75j Notice that there is a 5 overshoot at the beginning but the integrator reduces the steadystate error to zero although it takes a long time Figure 833b shows the step response when E Va KP KI s Σ Figure 831 A proportionalplusintegral controller 10 Point A Point B 5 0 5 10 8 6 4 2 Real Axis Imaginary axis 0 2 Figure 832 The root locus for Example 821 Motion Control Systems 307 the roots are selected at point B Notice that since this corresponds to critical damping there is no overshoot but the response is slower with zero steadystate error Therefore the addition of the inte grator and a zero near it has improved the systems steadystate performance without changing the characteristics of the overall system 816 ProportionalPlusDerivative Controllers Sometimes it is impossible to meet the design requirements with proportional or proportionalplusintegral controllers In these cases the dynamic behavior of the system must be altered in order to achieve the design requirements This may be achieved by a proportionalplusderivative PD controller A PD controller with gains KP and KD can be represented as shown in Figure 834 and derived as G Va E KP KDs KD s KP KD K s zD 859 where z KP KD The controller adds a zero to the root locus and therefore changes its characteristics In order to see how this may affect the system we continue with Example 821 40 35 30 25 20 Time sec Step Response a b 15 10 1 08 06 04 Amplitude 02 0 5 0 90 70 80 60 50 40 Time sec Step Response 30 20 1 08 06 04 Amplitude 02 0 10 0 Figure 833 The step responses for the system from Example 821 E Va KP KDs Figure 834 A proportionalplusderivative controller Introduction to Robotics 308 Example 822 As we discussed earlier the settling time may be an important issue in the design of a system such as a robot In order to improve the positional accuracy of a robot we would like to improve the settling time of the system from Examples 819 and 821 As you see although an integral controller was added to the system in Example 819 and consequently its steadystate error was eliminated the settling time for the system was increased However in both cases the root locus limitation was set at or near 4 for the given settling time In order to improve this design requirement we need to reduce the settling time However since the center of the asymptotes is near 45 on the real axis the best settling time we can get is Ts 4ζωn 44 50 9 Beyond that as shown in Figure 835 there will not be any roots available Now lets assume that the design requirements indicate a settling time of 06 sec with the same 5 overshoot The limits are shown in Figure 835 Lets arbitrarily choose point A and its conjugate at s 6 5 7j as desired points for achieving the design requirements We need to find the location of the derivative portion of a controller that will yield a root locus that includes these points To find the location of this zero we do the following 1 Calculate the angle deficiency For the original transfer function GH K s 1 s 8 the roots are at s 1 and s 8 From Eq 852 the complex vector angles to points s 6 5 7j are θp 1 180tan1 7 6 5 1 128 2 θp 8 tan1 7 6 5 8 77 9 θzi θpi θz 128 2 77 9 180 θz 26 1 5 4 3 2 1 1 2 3 4 5 8 6 4 2 0 2 Point A 465 7 6 6 7 Figure 835 No roots are available for settling time less than 09 Motion Control Systems 309 2 With this deficiency angle the zero should be located at tan26 1 7 6 5 z z 20 8 3 The gain for these points can also be calculated from Eq 851 as MTF Mzi Mpi 5 52 72 1 52 72 14 32 72 4 4 The overall transfer function for the system is GH 4 s 20 8 s 1 s 8 Figure 836 shows the root locus for this system Figure 837 shows the response to a step input As indicated both the overshoot and settlingtime requirements are met However the steadystate error is not zero because we did not include an integrator in the system 25 20 15 10 5 0 5 10 Imag Axis 15 20 25 40 35 30 25 20 Real Axis 15 10 5 0 Figure 836 The root locus for the system from Example 822 1 08 06 04 02 Amplitude 00 01 02 03 04 05 06 07 08 09 Time sec Step Response Figure 837 The response of the system from Example 822 to a step function ζ 0 68 s 6 5 7j gain 4 Introduction to Robotics 310 It is important to note here that a derivative controller especially at high gains is very susceptible to high frequency noise Since this type of controller differentiates the signal when highfrequency or sharply chan ging signals are present the derivative of the signal may become excessively large Therefore it may be nec essary to use filters to reduce highfrequency noise in the system For example in the following equation the amplitude of the highfrequency noise is low but when differentiated its effect can be significant e t 1 sin 10t 0 01 sin 1000t d dte t 10 cos 10t 10 cos 1000t 817 ProportionalIntegralDerivative Controller PID As we saw the addition of a derivative component to a controller changes its behavior allowing the placement of the roots in desirable locations and thereby achieving the design requirements However a proportional and derivative controller may not result in zero steadystate error Many systems including robots may require zero steadystate error in addition to other requirements Therefore it will be necessary to add an integrator to the system as well However care must be taken to ensure that the addition of the integrator does not otherwise change the behavior of the system Figure 838 shows how a PID controller may be constructed The transfer function for this system is G Va E KP KI s KDs KD s2 KP KD s KI KD s KD s z1 s z2 s 860 In orderto maintain the behavior of the system and the general shape of the root locus we may placeone of the zeros in Eq 860 near the origin and therefore cancel the dynamic effect of the integrator pole at the origin called zeropole cancellation With this although the system behavior remains almost unchanged its steadystateerrorwillgotozerobecausethesystemtypeisraisedRememberthatzerosmustberealanddistinct Example 823 To eliminate the steadystate error of the system in Example 822 we add a pole at the origin and a zero near it We can express the system as GH K s 20 8 s 0 5 s s 1 s 8 The root locus of this system is shown in Figure 839 Notice the similarity of this root locus to the one in Figure 836 even though a pole and a zero were added to the transfer function Also notice that the location of the zero was chosen arbitrarily Other values may also be acceptable Figure 840 shows the response of this system to a step function Notice how the design requirements are mostly met E Va KP KDs KI s Figure 838 A proportionalintegralderivative PID controller Motion Control Systems 311 The selected poles are at s 14 3 14 8j with ζ 0 697 The loop gain is 202 From Eq 860 we can calculate the gains of the system as follows G KD s2 KP KD s KI KD s 20 2 s 20 8 s 0 5 s KD s2 KP KD s KI KD 20 2 s2 21 3s 10 4 KD 20 2 KP 430 3 KI 210 1 25 20 15 10 5 0 5 10 15 20 2540 35 30 25 20 Real Axis Imag Axis 15 10 5 0 Figure 839 The root locus of the system from Example 823 with a proportionalintegralderivative controller 14 Step Response 12 1 08 06 Amplitude 04 02 00 01 02 03 04 Time sec 05 06 07 08 09 Figure 840 The response of the system from Example 823 to a step function Introduction to Robotics 312 818 Lead and Lag Compensators Ideal integral and derivative controllers are used to change the response of a plant according to the required design specifications such as the settling time speed of the response percent overshoot and steadystate error elimination However they are both active systems and require power In addition a derivative con troller has a wide bandwidth therefore although it can differentiate high frequencies in the system it can also create problems when noise is present Alternately a lead compensator or a lag compensator may be used In each case the circuits for lead and lag compensators are passive basically consisting of resistors capacitors and inductors A lead compensator has limited bandwidth and therefore may be even better for highfrequency noise reduction Lead and lag compensation is usually performed along with frequencydomain analysis of systems such as the Bode diagram A lag compensator consists of a zero placed near a pole close to the origin The addition of the pole near the origin and not exactly at the origin which makes it a pure integrator acts similar to an integrator but over time the system loses its accuracy as the steadystate error increases Therefore lag compensators are assumed to be leaky The addition of the zero near the pole keeps the root locus about the same A lead compensator consists of a zero near the origin that acts similar to a derivative controller plus a pole near it A lead compensator causes little change in the overall shape of the root locus but provides for passive derivative compensation with limited bandwidth 819 Bode Diagram and FrequencyDomain Analysis The analysis and design techniques associated with the root locus are based on the time or Laplace domain However many systems function with inputs that vary continuously and therefore it is better to analyze them in the frequency domain A Bode diagram is a graphical representation of the openloop transfer function in the frequency domain when s is replaced with jω It consists of two graphs one for the magnitude of GH in the logarithmic scale another for the phase angle as ω varies Figure 841 shows a typical Bode diagram plotted for G s 1 s2 s 10 by MATLAB As you see the magnitude is drawn on a loglog scale in dB where dB 20 log G jω The phase is also drawn Notice how the magnitude outputinput ratio 20 30 40 50 60 70 80 45 0 90 Phase deg Magnitude deg 135 180 100 101 Frequency radsec 102 Bode Diagram Figure 841 A typical Bode diagram for a secondorder system Motion Control Systems 313 increases at the natural frequency of the system ωn 10 Both graphs also vary significantly depending on the damping ratio However it is possible to draw the Bode diagram albeit with some error at the corner frequencies by drawing asymptotes whose slopes are functions of the order of the system For example for the system in Figure 841 since the transfer function is secondorder the magnitude at higher frequencies decreases at 40 dBdecade while the phase change is 90 degreesdecade Since the magnitude and phase are in logarithmic scale the Bode plots of different parts of the characteristic equation can simply be added together to get the Bode diagram of the whole system For more information and for design techniques using the Bode diagram please refer to other sources 820 OpenLoop vs ClosedLoop Applications You may have noticed that both openloop and closedloop representations have been used for different applications The following is a summary of which one is used for which application Remember that the closedloop transfer function and characteristic equation and the openloop transfer function for the system in Figure 842 are CLTF Y s R s KG KGH 1 OLTF KGH Characteristic equation KGH 1 The openloop transfer function represents the output of the system as measured by the feedback sensor Stability The closedloop transfer function poles are plotted They must be in the lefthalf plane Steadystate error Ess This is related to the system type as well as the type of input The openloop transfer function with unity feedback is used to calculate the steadystate error Root locus The openloop transfer function is used The root locus starts at the poles and ends at zeros or 821 MultipleInput and MultipleOutput Systems Most systems we have considered so far are singleinput singleoutput SISO systems where there is one input and one output For example when a voltage is supplied to a motor the motor rotates and its angular velocity output can be measured However many systems have multiple degrees of freedom where more than one variable controls the systems In this case multiple inputs and multiple outputs MIMO may be present The following are simple examples of how linear MIMO systems may be analyzed K H Ys G Rs Σ Figure 842 A typical feedback control system Introduction to Robotics 314 Example 824 Figure 843 shows a multipleinput singleoutput system Derive the relationship between the inputs and the output Solution There are multiple ways of solving this problem However we simply write R1 YH2 R3 H1 G1 R2 G2 Y R1G1G2YH1H2G1G2R3H1G1G2 R2G2 Y G2 R1G1R3H1G1 R2 Y 1 H1H2G1G2 Y G2 R1G1 R2R3H1G1 1 H1H2G1G2 Example 825 Derive the equations that represent each output of the MIMO system in Figure 844 Solution We write the equations relating to each input and output as follows R1Y2H2 G1 Y1 R2Y1H1 G2 Y2 R2 G1 R1 Y H2 H1 G2 R3 Figure 843 Multipleinput singleoutput system from Example 824 R2 G1 R1 Y1 H2 H1 G2 Y2 Figure 844 MIMO system from Example 825 Motion Control Systems 315 Substitute Y2 into Y1 to get R1 R2Y1H1 G2H2 G1 Y1 R1G1R2G1G2H2 Y1 1G1G2H1H2 Y1 R1G1R2G1G2H2 1G1G2H1H2 Similarly substitute Y1 into Y2 to get R2 R1Y2H2 G1H1 G2 Y2 R2G2R1G1G2H1 Y2 1G1G2H1H2 Y2 R2G2R1G1G2H1 1G1G2H1H2 These two equations may be written in matrix form as Y1 Y2 G1 K G1G2H2 K G1G2H1 K G2 K R1 R2 where K 1G1G2H1H2 A multiaxis robot has multiple inputs and multiple outputs that must be controlled simultaneously However in most robots each axis is controlled individually as a SISO unit Although this introduces some error the error is small for most practical purposes The analysis of these systems is beyond the scope of this introduction to control theory For further reading please refer to related books and journal articles on this topic 822 StateSpace Control Methodology The transfer function that describes the relationship between the input and output of a system is only appli cable when the system is initially relaxed no initial conditions otherwise the Laplace transform cannot be applied and only relates the inputs and outputs but not the internal signals within the system An alternative to this method of representation is statespace where different signals within the system may be linked together in order to create a set of firstorder linear equations that are easy to solve and provide information about internal signals Consider the mechanical system in Figure 84 repeated here k m F x b Figure 84 Repeated Introduction to Robotics 316 The equations describing the motions of the mass as a result of the application of force F are given in Eq 83 as md2x dt2 bdx dt kx F The actual motion is of course a function of the initial conditions of the location and velocity of the mass In other words the succeeding motion location and velocity of the mass depends on where the mass is located and its velocity when the force is applied Each one of these variables is a state Therefore we can express the equation in a different form as follows We choose the position of the mass as one state y1 x We also choose the velocity as the second state therefore y2 x y1 As you see both the initial conditions and the states within the system position and velocity are included in our representations Equation 83 can be written as my1 by1 ky1 F or my2 by2 ky1 F y1 y2 my2 by2ky1 F y1 y2 0 1 k m b m y1 y2 0 1 m F The output can be represented as x 1 0 y1 y2 This is the statespace equation describing the system As you see this is a twodimensional linear time invariant equation where the secondorder part of the equation is converted to firstorder by the introduc tion of the velocity state variable y1 and y2 are states of the system that can be measured say with sensors if necessary Now consider the system shown in Figure 845 with three states x1 x2 x3 and its transfer function derived as RE1 a1 s a2 s2 a3 s3 E1 R E1 1 a1 s a2 s2 a3 s3 Y E1 s3 Y R 1 s3 a1s2 a2s a3 861 Now consider the system in Figure 846 where the input to the system is augmented by feedback from the states as shown such that E2 Rk1x1k2x2k3x3 Notice how each state is the integral of the previous state and how these states are available at any given time 1 s 1 s 1 s a1 a3 a2 R x1 x2 x3 E1 Y Figure 845 A system with three states Motion Control Systems 317 The transfer function of the system can be derived as E2E1 a1 s a2 s2 a3 s3 E1 E2 E1 1 a1 s a2 s2 a3 s3 RE1 k1 s k2 s2 k3 s3 E2 R E1 1 a1 k1 s a2 k1 s2 a3 k1 s3 Y E1 s3 Y R 1 s3 a1 k1 s2 a2 k2 s a3 k3 862 From Eqs 861 and 862 it is clear that the two systems are the same except that each root is supple mented with a k value This provides for a very convenient way to place the roots of the characteristic equa tion at any desired place making this a powerful technique to design a control system Example 826 A plant is modeled as Y R 1 s s 1 s 5 with poles at s 0 s 1 and s 5 How ever to change the behavior of the plant we wish to place the poles at s 10 and s 1 j 3 Find the appropriate values of k to accomplish this Solution The original plant is represented by R y 6y 5y and s3 6s2 5s 0 The desired plant may be represented as s 10 s2 2s 4 s3 12s2 24s 40 0 The augmented characteristic equation may be set equal to the desired one as s3 12s2 24s 40 s3 6 k1 s2 5 k2 s k3 And 6 k1 12 5 k2 24 k3 40 k1 6 k2 19 k3 40 Therefore the poles can easily be located at a desired location 1 s 1 s 1 s a1 a3 a2 R x1 x2 x3 k3 k2 k1 E2 E1 Y Figure 846 The representation of a statespace system Introduction to Robotics 318 One additional benefit of this system is that in cases where the states of the system are not available or the cost of measuring the states may be high it is possible to estimate the expected value of the state from the dynamics of the system In other words if the dynamics of the system are known the states of the system may be estimated as shown in Figure 847a Therefore a system may be devised with estimators that provide values for each state the values are fed into the control system and the response is measured and corrected as needed as shown in Figure 847b Estimators are readily used in many systems from rockets to simple devices Example 827 Using statespace methodology derive the equations describing a DC motor as shown in Figure 848 Solution For the electrical circuit portion of the system where vbemf KBθ KB is a constant we may write Ri Ldi dt e t vbemf e t KBθ For the mechanical side of the system with its inertia of the armature and load and damping and Tbemf Kti where Kt is a constant we may write Tbemf Kti Jθ bθ Plant model R Y ˆx3 ˆx2 ˆx1 Plant Corrected plant model k1 k3 k2 R Y ˆ1 x ˆx2 ˆx3 a b Figure 847 The application of estimators in control systems et R L i vbemf Jθ bθ T θ Figure 848 The electromechanical system for Example 827 Motion Control Systems 319 The states of the motor are the current i angular position θ and angular velocity θ Lets select state variables as x1 θ x2 θ x1 and x3 i Therefore these equations can be written as Lx3 e t KBx2Rx3 Jx2 Ktx3bx2 x1 x2 or x1 x2 x3 0 1 0 0 b J Kt J 0 KB L R L x1 x2 x3 0 0 1 L e t and θ 1 0 0 x1 x2 x3 Once again the secondorder equations are transformed into firstorder linear timeinvariant equa tions where the state variables can be measured and used in controls Obviously there is much more to the statespace control methodology than is covered in this section For further reading on this topic please refer to other books and journal articles 823 Digital Control Digital control is used in systems where microprocessors are used for controlling the system and in which signals are sampled Many of the techniques used in analog control are also used in digital control systems including the root locus leadlag proportional integral and derivative control Bode diagrams and others However one essential difference is that digital systems are discrete not continuous Principally a digital system can first be designed in the splane as an analog system and subsequently through digital filtering be converted to the digital domain called the zplane or it can be designed in the digital domain As long as the sampling rate in the system is relatively high both techniques are accept able Otherwise the system should be designed in the digital domain We will discuss the sampling theorem when we discuss vision systems Suffice it to say here that the sampling rate ωs for a system with a maximum frequency of interest of ω should be ωs 2ω Figure 849 shows a general representation for a digital system A microprocessor or computer generates a control signal that must be converted to an analog signal by a hold circuit or a digitaltoanalog converter R Σ Microprocessor or computer Y Sensor G Hold or DAC Sampler or ADC Figure 849 A typical digital system Introduction to Robotics 320 DAC The plants response is read by a sensor If the sensor is not digital the signal must be sampled and converted to digital form with an analogtodigital converter ADC before it can be used by the microproc essor or computer Now consider a differential equation y ay u Since in digital systems an analog signal is sampled and held until the next sample is taken the signal is discrete an updated value is obtained only when a new sample is taken but remains the same during the interval between samples Therefore y must be represented by a finite difference as y Δy Δt y n y n1 T Substituting into the differential equation we get y n y n1 T ay n u n y n 1 1 aT y n1 Tu n 863 where T is the sampling period Therefore we need to be able to relate each value of the sample to the pre vious ones This is done using the ztransform As we saw the Laplace transforms for functions and their derivatives in continuous domain are defined as f t F s 0 f t estdt and f t sF s f 0 Similarly a ztransform for a discrete domain is defined as F z n 0 f n Z n 864 and Z f n1 z1F z 865 Example 828 If f n 1 for n 012 the ztransform of the function is F z n 0 zn 0 1 zn 1 1 z 1 z2 1 1z1 z z1 Example 829 Derive the ztransform of the following equation y u a1y n1 a2y n2 b0u n b1u n1 b2u n2 Solution Using Eqs 864 and 865 we get Y z a1z1a2z2 Y z b0 b1z1 b2z2 U z Y z 1 a1z1 a2z2 b0 b1z1 b2z2 U z Y z U z b0 b1z1 b2z2 1 a1z1 a2z2 Motion Control Systems 321 There is much more to this subject than is presented here as an introduction For more information about digital control systems please refer to related books and journal articles 824 Nonlinear Control Systems A system is considered linear if the differential equation describing it is linear and if the components of the system behave in a linear fashion This means that if a system responds with outputs y1t and y2t for inputs x1t and x2t respectively its response to an input a1x1 t a2x2 t will be a1y1 t a2y2 t Otherwise the system is nonlinear Most systems are inherently nonlinear For example a springs constant is not really constant However for a small range of displacements we may assume the response is linear Other examples of nonlinearity are saturation backlash hysteresis and piecewise behavior such as in a relay In robotic applications too many elements of the system are inherently nonlinear but they may be assumed linear or they may be linearized for small ranges in order to simplify the analysis In other cases it is also possible to multiply the response of an element or system by the inverse of the component that makes the system nonlinear in order to eliminate its effect For example if the output of a component is a function of sin θ multiplying it by 1sin θ linearizes the output Alternately since sin θ may be represented by a Taylor series function ignoring the higherorder terms also linearizes the function albeit for small angles Figure 850 shows examples of nonlinear behavior of system elements Example 830 The nonlinear equation describing the motion of a pendulum shown in Figure 851 may be linearized for small motions close to θ 0 as follows mlθ mg sinθ ld2θ dt2 g sinθ d2θ dt2 g l sinθ 0 sinθ n 0 θn n dn dθn sinθ θ 0 θ θ3 3 θ5 5 Input Output Input Output Figure 850 Examples of nonlinear behavior of system elements l mg m T mlθ2 mlθ θ Figure 851 The pendulum from Example 830 Introduction to Robotics 322 Ignoring the higherorder terms of the Taylor series simplifies and linearizes the equation to d2θ dt2 g l θ 0 for small θ 825 Electromechanical Systems Dynamics Robot Actuation and Control Although hydraulic and pneumatic actuators are used in certain applications most common industrial robots are electromechanical In these systems the role of the actuator whether prismatic or revolute is to move a joint or a link and change its position The role of the feedback control system is to ensure that the position is achieved in a manner that is satisfactory as planned A system whose role is to control the position of a system and track its motions is called a servomechanism Figure 852 shows a simplified depiction of a control system for a robot As we discussed in Chapters 2 5 6 and 7 the joint values displacement velocity acceleration and applied forces and torques are calculated from kinematic dynamic and trajectory analyses These values are sent to the controller which in turn applies appropriate actuating signals to the actuators to run the joints to their destination in a controlled manner The sensors measure the outputs and feed the signals back to the controller which in turn controls the actuating signals accordingly Robot manufacturers create their own controllers in most cases with pro prietary designs to achieve their design specifications A multiaxis robot has multiple inputs and multiple outputs for each joint that must be controlled simul taneously However in most robots each axis is controlled individually called independent joint control as a singleinput singleoutput unit The coupling effects from other joints are usually treated as disturbances and are taken care of by the controller Although this introduces some error the error is small for most practical purposes Additionally robot dynamics equations have nonlinearities that require more sophisticated control schemes which are beyond the scope of this text For more information on nonlinear control theory see related books and journal articles However the following section shows how a robot actuator may be mod eled for control purposes A robots actuator consists of a motor sensors a controller through which a position reference signal is issued and which provides an actuating signal to the motor and the external load These elements form a system as shown in Figure 853 The motor model contains both an electric circuit as well as mechanical elements such as inertia and damping These two systems are coupled together through the backemf torquevoltage For the electrical circuit portion of the system where vbemf KBθ KB is a constant we may write Ri Ldi dt e t vbemf e t KBθ Control system Robot Sensors Trajectory analysis Disturbances 1 s 1 s θd θd θd θ θ θ Figure 852 The feedback loop of a robot controller Motion Control Systems 323 This equation may be written in the Laplace form as E s RI s LsI s KBsΘ s 0 866 For the mechanical side of the system with its inertia of the armature and the load and damping and Tbemf Kti where Kt is a constant we may write Tbemf Kti Jθ bθ This equation may be written in Laplace form as KtI s Js2Θ s bsΘ s 867 Combining Eqs 866 and 867 and rearranging the terms we get E s R Js2 bs Kt Ls Js2 bs Kt KBs Θ s 868 In practice the inductance of the motor L is usually much smaller than the inertia of the rotor and the load combined and can easily be ignored for analysis Consequently Eq 868 may be simplified to E s R Js2 bs Kt KBs Θ s The transfer function between the output Θs and input Es is TF Θ s E s Kt R Js2 bs KtKBs KtRJ s s b J KtKB RJ 869 If we are interested in the velocity of the motor robots arm in response to the input voltage we may multiply the s in the denominator and Θs to get Ωs Therefore the transfer function may be written as TF Ω s E s K s a where K Kt RJ and a 1 J b KtKB R 870 This transfer function is a firstorder differential equation relating the motor angular velocity to the input voltage and may be used to analyze the response of the motor For example when a particular input voltage is applied to the motor we may analyze the response of the motor its steadystate operation how fast the response is and much more Es R L i vbemf Jθ bθ G1 H1 Θs Θs et θ Σ Figure 853 An electromechanical actuating system and its model Introduction to Robotics 324 Example 831 Assume that the input voltage to the system in Figure 853 is a step function Put Determine the response of the motor and its steadystate value Solution Using Eq 870 as the transfer function and referring to Table 83 we get Ω s K s a P s KP s s a a1 s a2 s a where a1 s KP s s a s 0 KP a and a2 s a KP s s a s a KP a Hence Ω s KP sa KP s a a KP a 1 s 1 s a The inverse Laplace transform of the equation is ω t KP a 1eat and is shown in Figure 854 The steadystate velocity output of the motor using the final value theorem is ωss lim s 0s KP s s a KP a Now lets add a tachometer to the system as a feedback sensor The tachometer measures the angular speed of the motor in response to the actuating signal Figure 855 shows the system in Figure 853 with the added tachometer For the tachometer vb Kf θ The circuit representing the tachometer can be expressed in the Laplace domain as I s Ra RL Ls Vb s Kf sΘ s Vo s I s RL Kf sΘ s RL Ra RL Ls t ωt Figure 854 The approximate response of the motor from Example 831 Motion Control Systems 325 The transfer function for the tachometer is TF V0 s sΘ s V0 s Ω s Kf RL Ra RL Ls m s n 871 where m Kf RL L and n Ra RL L Figure 856 shows the completed block diagram of the system in Figure 855 Equation 868 can also be used to calculate the natural frequency and damping ratio of the system It can be rewritten as E s LJs2 s RJ Lb Rb KtKB Kt sΘ s Therefore the transfer function between the input voltage and output angular velocity is Ω s E s Kt LJ s2 s RJ Lb LJ Rb KtKB LJ Since the characteristic equation is secondorder in the form of s2 2ζωns ω2 the damping coefficient and natural frequency of the joint and the connected load can be calculated 826 Design Projects You may now decide how your robots will be controlled and how you will implement the controllers Many different specifications and characteristics must be defined for a proper controller both in terms of what the controller will include as well as how it will influence the behavior of the robot You may try to Es vin i vbemf Jθ bθ G1 H1 Ra L RL vb vo R θ L Θs Θs Σ Figure 855 An electromechanical system with a tachometer feedback sensor K sa m sn Es Ω s Σ Figure 856 Completed block diagram for the robots actuating motor Introduction to Robotics 326 decide these specifications for your robots including overshoots damping settling and rise times and others However remember that this was an introduction to control systems design We will learn about robot actuators and sensors in the following chapters where many of these decisions will be made when the type of actuators loads and other factors are specified Many student projects include relatively simple microprocessors small loads slow motions and simple control schemes It will be your decision what level of sophistication is needed for your particular project 827 Summary In this chapter we studied the basic principles of control systems how they are analyzed and how they may be designed We also studied some introductory robot actuator modeling techniques You should have learned enough material to be able to follow the design methodology for robot controllers However there is much more to control systems beyond what we can cover in one chapter You should learn more from other references if you expect to design a working controller In the following chapters we discuss actuators sensors and applications and you will come to better understand how control systems play a role in the overall robot design References 1 Nise Norman Control Systems Engineering 7th edition John Wiley and Sons 2014 2 Golnaraghi F B Kuo Automatic Control Systems 10th edition 2017 McGraw Hill 3 Lyshevski Sergey Mechatronics and Control of Electromechanical Systems CRC Press 2017 4 Dorf Richard Robert Bishop Modern Control Systems 11th edition PrenticeHall 2008 5 Bateson Robert Introduction to Control System Technology 7th edition 2002 PrenticeHall 6 Sciavicco Lorenzo Bruno Siciliano Modeling and Control of Robot Manipulators McGrawHill 1996 7 Spong Mark W Seth Hutchinson M Vidyasagar Robot Modeling and Control John Wiley and Sons 2006 8 Craig John J Introduction to Robotics Mechanics and Control 3rd edition PrenticeHall 2005 9 Ogata Katsushito System Dynamics 4th edition PrenticeHall 2004 Problems 81 Derive the inverse Laplace transform of the following equation F s 3 s2 5s 4 82 Derive the inverse Laplace transform of the following equation F s s 6 s s2 5s 6 83 Derive the inverse Laplace transform of the following equation F s 1 s 1 2 s 2 Motion Control Systems 327 84 Derive the inverse Laplace transform of the following equation F s 10 s 4 s 2 3 85 Simplify the block diagram in Figure P85 86 Simplify the block diagram in Figure P86 87 Simplify the block diagram in Figure P87 88 Write an equation that describes the output of the system in Figure P88 A G1 H3 H1 G2 H2 B Figure P85 G1 H1 G2 H2 H3 B A Figure P86 G1 H1 B A G2 G3 G4 H3 Figure P87 G1 H1 G2 Y U1 U2 Figure P88 Introduction to Robotics 328 89 Write the equations that describe the inputoutput relationships for Figure P89 810 Sketch the root locus for the following GH K s s 1 s 3 s 4 811 Sketch the root locus for the following GH K s 6 s s 4 812 Sketch the root locus for the following GH K s 6 s s 10j10 s 10 j10 s 12 813 For the system in Problem 810 assume that two of the roots are chosen at s 5 2 55j Find the systems gain damping ratio and natural frequency Show that the angle criterion is met Can you determine from the root locus whether or not the system is stable 814 For the system in Problem 810 assume that two of the roots are chosen at s 4 1 24j Find the systems gain damping ratio and natural frequency 815 For the system in Problem 811 assume that the roots are chosen at s 3 1 73j Find the systems gain damping ratio and natural frequency Show that the angle criterion is met Can you determine whether or not the system may become unstable as the gain changes 816 For the system in Problem 811 find the roots the gain and the steadystate error for a settling time of less that 1 second and overshoot of 4 or less 817 For the following system find the roots gain and steadystate error for the fastest response and a settling time of less than two seconds and an overshoot of less than 4 GH K s 1 s 3 818 For the system in Problem 817 select the locations and the proportional and integral gains to change it to a proportionalplusintegral system with zero steadystate error G1 G2 Y1 U1 U2 U3 Y2 H1 H2 Figure P89 Motion Control Systems 329 819 For the system in Problem 817 we would like to improve the settling time to one second by adding a zero to the system proportionalplusderivative Find a proper location for the zero and the loop gain 820 For the system in Problem 619 add an integrator to the system to make it into a PID system in order to achieve a zero steadystate error Find the location of an additional zero and the proportional deriv ative and integral gains Introduction to Robotics 330 9 Actuators and Drive Systems 91 Introduction If the links and the joints of a robot are its skeleton the actuators are its muscles The actuator must have enough power to accelerate and decelerate the links and to carry the loads and yet be light economical accurate responsive reliable and easy to maintain There are many types of actuators available and undoubtedly there will be more varieties available in the future At least the following types are worth mentioning Electric motors Servomotors Stepper motors Directdrive electric motors Hydraulic actuators Pneumatic actuators Novelty actuators Electric motors and specially servomotors are the most commonly used robotic actuators Hydraulic sys tems were very popular for large robots in the past and are still around in many places but are no longer as popular except for specific applications Pneumatic actuators are used in robots that have a half degree of freedom or onoff type joints as well as for insertion purposes Novelty actuators including directdrive elec tric motors electroactive polymer actuators musclewire actuators and piezoelectric actuators eg for micro positioning are mostly used in research and development work or as specialty items for specific pur poses but may become more useful in the future In the following section we compare the common characteristics of different types of actuators followed by the individual study of each type 92 Characteristics of Actuating Systems The following characteristics may be used to compare different actuating systems In addition to these depending on the special circumstances in which the actuator is used other characteristics may be relevant Examples include underwater systems where waterproof operation of a system is very important and space systems where the liftoff weight and reliability are of absolute importance 921 Nominal Characteristics Weight PowertoWeight Ratio Operating Pressure Voltage and Others It is important to consider the nominal characteristics of actuators These include weight power and power toweight ratio operating pressure operating voltage temperatures and others For example since in serial 331 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed robotic systems the actuators are placed directly at the joints and therefore move with them the weight of the actuator acts as a load on the preceding actuators and must be accelerated and decelerated by them A heavier actuator downstream requires more torque upstream resulting in larger power requirements and heavier actuators Consequently it is crucial to consider the weight and placement of actuators Another important characteristic is the powertoweight ratio For example the powertoweight ratio of electric systems is average Stepper motors are generally heavier than servomotors for the same power and therefore have a lower powertoweight ratio Hydraulic systems have the highest powertoweight ratio However it is important to realize that in these systems the weight is actually composed of two portions the hydraulic actuator and the hydraulic power unit The systems power unit consists of a highpressure pump a reservoir filters electric drive motor to drive the pump cooling unit valves and so on However the power unit is normally stationary somewhere away from the robot itself It does not move with the actu ator The power is brought to the robot via an umbilical tether hose Consequently the actual powerto weight ratio of the actuator is very high for the moving parts If the power unit must also move with the robot eg a hydraulic transportation robot the total powertoweight ratio will be much less Pneumatic actuators deliver the lowest powertoweight ratio The power that the hydraulic system delivers is very high due to high operating pressures This may range from 505000 psi 0345 to 345 MPa Pneumatic cylinders normally operate around 100120 psi 069 to 083 MPa The higher pressures in hydraulic systems create higher power concentrations but also require higher maintenance if a leak occurs they can be more dangerous Electric motors that operate at a higher voltage have a better powertoweight ratio too Additionally as we will see later for the same power output as the voltage to an electric motor increases the required current will decrease reducing the size of the required wires The heat generated in the motor is a secondorder function of the current and therefore as the current decreases the generated heat decreases and efficiency is increased 922 Stiffness vs Compliance Stiffness is the resistance of a material against deformation It may be the stiffness of a beam against bending under the load the resistance of a gas against compression in a cylinder under load or resistance of wine against compression in a bottle during corking operation A stiffer system requires a larger load to deform Conversely a more compliant system requires a smaller load to deform Stiffness is directly related to the modulus of elasticity of the material The modulus of elasticity of fluids can be around 1 106 psi 6900 MPa which is very high As a result hydraulic systems are very stiff and non compliant Conversely because air is compressible pneumatic systems are compliant Stiffsystemshaveamorerapidresponsetochangingloadsandpressuresandaremoreaccurate Obviouslyif a system is compliant it can easily deform or compress under changing load or changing driving force and consequently it is inaccurate Similarly if the driving pressure in a hydraulic ram is increased slightly due to its stiffness it responds more rapidly and more accurately than a pneumatic system that deforms under the load Additionallyastiffsystemresistsdeformationundertheloadandthereforeholdsitspositionmoreaccurately Now consider a robot that is used to insert an IC chip into a circuit board If the system is not stiff enough it will not be able to push the chip into the board because the actuator may deform under the resistive force On the other hand if the part and the holes are not perfectly aligned a stiff system does not deform enough to prevent damage to the robot or the part whereas a compliant system gives to prevent damage So although stiffness causes a more responsive and more accurate system it also creates a danger if all things are not always perfect Consequently a working balance is needed between these two competing characteristics We will discuss a particular solution to this problem called a remotecenter compliance RCC device later 923 Use of Reduction Gears Some systems such as hydraulic actuators and directdrive electric motors are capable of producing very large forces or torques at high resolution This means that the actuator may be moved very slightly while Introduction to Robotics 332 delivering its full force or torque As a result there is no need to use reduction gears to increase the torque it produces and to slow it down to manageable speeds For this reason hydraulic actuators can be directly attached to the links to simplify the design reduce the weight cost and rotating inertia of joints reduce back lash increase reliability of the system due to simpler design and fewer parts and reduce noise On the other hand electric motors rotate at high speeds up to many thousands of revolutions per minute and must be used in conjunction with reduction gears to increase their torque and decrease their speed as no one would want a robot arm to be rotating at such high speeds This of course increases the cost number of parts backlash inertia of the rotating body and so on but also increases the resolution of the system because it is possible to rotate the link a very small angle Now suppose that a set of reduction gears with a ratio of N is connected to a load with inertia Il and to a motor with inertia Im including the inertia of the reduction gears as shown in Figure 91 The torque and speed ratio between the motor and the load are Tl N Tm θl 1 N θm and θl 1 N θm 91 If we write the torque balance equation for the system from freebody diagrams in Figure 92 and substitute from Eq 91 we get Tm 1 N Tl Imθm bmθm and Tl Ilθl blθl Tm Imθm bmθm 1 N Ilθl blθl Tm Imθm bmθm 1 N2 Ilθm blθm 92 where bm and bl are viscous coefficients of friction for the motor and the load As Eq 92 indicates the effective inertia of the load felt by the motor is conversely proportional to the square of the reduction gear ratio or IEffective 1 N2Il and ITotal 1 N2Il Im 93 So the motor will only feel a fraction of the actual inertia of the load which in the case of a robot constitutes both the manipulator and the load it carries Reduction ratios of 20100 are common in manipulator robots Therefore the total inertia applied to the motor from the load may only be 1400th to 110 000th of the actual Il Im Tm N θm θl Tl Figure 91 Inertia and torque relationship between a motor and a load Actuators and Drive Systems 333 inertia allowing the motor to accelerate and decelerate quickly Considering that a rule of thumb for high inertia is Iload 5Irotor this is a significant improvement In both electric and hydraulic directdrive systems the actuators are exposed to the full inertial loads With high gear ratios the inertial effects of the load can actually be ignored in the control system of the robot Note that the opposite is also true that the effect of the inertia of the motor on the load is also 40010 000 times larger To reduce this effect designers opt to use pancake motors or lowinertia motors with long slender rotors Example 91 A motor with rotor inertia of 0015 kgm2 and maximum torque of 8 Nm is connected to a uniformly distributed arm with a concentrated mass at its end as shown in Figure 93 Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the total inertia felt by the motor and the maximum angular acceleration it can develop if the gear ratio is a 3 or b 30 N Free body diagram Inertiaangular acceleration diagram Tl Il Tl Tl bmθm blθl Im Imθm Ilθl Tm N Figure 92 Freebody diagrams of the motor and the load Tm Tl N x y z 05 m m 3 kg m 2 kg Im Figure 93 Schematic drawing of the system from Example 91 Introduction to Robotics 334 Solution This is very similar to a robot arm and a servomotor actuator The total moment of inertia of the arm and the concentrated mass at the center of rotation is Il Iarm Imass 1 3marml2 mmassl2 1 3 3 0 5 2 2 0 5 2 0 75 kgm2 From Eq 93 a ITotal 1 9 0 75 0 015 0 098 kgm2 b ITotal 1 900 0 75 0 015 0 0158 kgm2 As you see with the higher gear ratio the contribution of the load to the total inertia is very little The maximum angular accelerations are a θm Tm Itotal 8 0 098 82 radsec2 b θm Tm Itotal 8 0 0158 506 radsec2 The noload maximum angular acceleration of the motor would be about 530 radsec2 93 Comparison of Actuating Systems Table 91 is a summary of actuator characteristics We will refer to and discuss these characteristics through out this chapter 94 Hydraulic Actuators Hydraulic systems and actuators offer a high powertoweight ratio large forces at low speeds both linear and rotary actuation compatibility with microprocessor and electronic controls and tolerance of extreme hazard ous environments They can hold a load without need for a brake generate less heat at the actuator and apply a torque without the need for gearing Many large robots of the past decades mostly used in automobile pro duction were hydraulic robots However due to the leakage problem that is almost inevitable in hydraulic sys tems and due to their power unit weight and cost they are no longer common Nowadays most robots are electric However many robots in industry still have hydraulic actuators Additionally for special applications such as very large robots in civil and military service hydraulic actuators may be the appropriate choice One important difference between hydraulic actuators and electric motors is that the hydraulic pump not the actuator may be sized for average load whereas electric actuators must be sized for maximum load This is because a hydraulic system uses an accumulator that stores the constant energy of the pump and can han dle larger loads when necessary Another important consideration is that in general an electric motor is located at or near a joint adding to the mass and inertia of the robot However in hydraulic systems only the actuator and the control valves are near the joints The hydraulic power unit may be located remotely reducing the mass and inertia Actuators and Drive Systems 335 The total force that a linear cylinder can deliver can be tremendously large for its size A hydraulic cylinder can deliver a force of F p A lb or N where A is the effective area of the piston or ram and p is the working pressure For example for a 1000 psi pressure every square inch of the cylinder develops 1000 lb of force In rotary cylinders the same principle is true except that the output is a torque where dA t dr T r2 r1 p r dA r2 r1 p r t dr pt r2 r1 r dr 1 2pt r2 2 r2 1 94 where p is the fluid pressure t is the thickness or width of the rotary cylinder and r1 and r2 are the inner and outer radii of the rotary cylinder as shown in Figure 94 Fluid in Fluid out Rotary vane r1 r2 Figure 94 A rotary hydraulic actuator This actuator can be directly attached to a revolute joint without any need for gear reduction Table 91 Summary of actuator characteristics Hydraulic Electric Pneumatic Good for large robots and heavy payloads Highest powerweight ratio Stiff system high accuracy better response No reduction gear needed Can work in wide range of speeds without difficulty Can be left in position without any damage May leak not fit for clean room applications Requires pump reservoir motor hoses etc Can be expensive and noisy requires more maintenance Viscosity of oil changes with temperature Very susceptible to dirt and other foreign material in oil Low compliance High torque high pressure large inertia on the actuator Good for all sizes of robots Better control good for highprecision robots Higher compliance than hydraulics Reduction gears reduce inertia on the motor Does not leak good for clean room Reliable low maintenance Can be sparkfree good for explosive environments Low stiffness Needs reduction gears increased backlash cost weight etc Motor needs braking device when not powered otherwise the arm may fall Many components are usually offtheshelf Reliable components No leaks or sparks Inexpensive and simple Low pressure compared to hydraulics Good for onoff applications and pick andplace Compliant systems Noisy Require pressurized air filter and so on Difficult to control and maintain linear position Deform under load constantly Very low stiffness inaccurate response Lowest powerto weight ratio Introduction to Robotics 336 The flow rate and volume of fluid needed in a hydraulic system are d Vol πd2 4 dx 95 Q d Vol dt πd2 4 dx dt πd2 4 x 96 where dx is the desired displacement and x is the desired velocity of the piston By controlling the volume of the fluid going into the cylinder the total displacement can be controlled By controlling the rate at which the fluid is delivered to the cylinder the velocity can be controlled This is done through a servovalve that con trols both the volume of the fluid as well its rate A hydraulic system generally consists of the following components or subsystems Hydraulic linear or rotary actuators that provide the force or torque needed to move the joints and are controlled by the servovalves or manual valves Hydraulic pump that provides high pressure fluid to the system Electric motor or in cases such as in a mobile unit an engine that operates the hydraulic pump Cooling system or fans to dissipate the generated heat Fluid reservoir tank Accumulators that are used to store extra energy for maximum loads especially when the pump is designed for average use Servovalves that control the amount and the rate of fluid to the cylinders Checkvalves for safety and controlling maximum pressure Holding valves used to prevent the actuator from moving when the system is turned off or power is lost Connecting hoses between the cylinders and the reservoir Filtering system to maintain the quality and purity of the fluid Due to its nature moisture in the fluid damages hydraulic actuators and must be separated from the fluid Sensors that are used as feedback to control the motion of the actuators Figure 95 is a schematic drawing of a typical hydraulic system 95 Pneumatic Devices Pneumatic devices are principally very similar to hydraulic systems A source of pressurized air is used to power and drive linear or rotary cylinders controlled by manual or electrically controlled solenoid valves Since the Hydraulic power unit Source Return Servovalve Servomotor Sensors Controller Accumulator Figure 95 Schematic of a hydraulic system and its components Actuators and Drive Systems 337 source of pressurized air is separate from the moving actuators these systems may have lower inertial loads However since pneumatic devices operate at a much lower air pressure than the hydraulic units usually up to 100120 psi 069 to 083 MPa their powertoweight ratio is much lower than hydraulic systems The major problem with pneumatic devices is that air is compressible and as a result its volume changes under load Consequently pneumatic actuators are usually only used for insertion purposes where the actu ator is all the way forward or all the way back or they are used with halfDOF joints that are fully on or fully off Otherwise controlling the exact position of pneumatic cylinders is very difficult One way to control the displacement of the pneumatic cylinders is called differential dithering In this sys tem the exact location of the piston is sensed by a feedback sensor such as a linear encoder or potentiometer This information is used in a controller that controls the air pressure on the two sides of the cylinder through a servovalve to control the exact position 1 Pneumatic actuators are simple rugged and safe Even if they leak the air is not a contaminant Most com ponents are off the shelf and therefore easy to use and inexpensive They are mostly used either as onoff devices or as accessories in a robotic cell in conjunction with robots for material handling and similar purposes 96 Electric Motors When a conductor wire carrying a current is placed within a magnetic field it experiences an electromotive force emf normal to the plane formed by the magnetic field and the current Consequently each side of the wire coil in Figure 96 experiences a force as shown If the wire is able to rotate about an axis the resulting torque rotates it until the torque is zero Switching the direction of the magnetic field or the current causes a change in the direction of the force If there is a second conductor perpendicular to the first and if we now pass the current through the second conductor it will also rotate 90 Continually passing the current through each conductor can force them to rotate In practice in order to accomplish this change in the cur rent either a set of commutators and brushes or slip rings are used with DC motors the current is electron ically switched in brushless DC motors or AC current is used with AC motors although in this case the permanent magnets and the coil are switched 2 This is the basic principle behind all electric motors Sim ilarly if a conductor is moved within a magnetic field crossing the flux a current is induced in the conductor like a generator This is called backelectromotive force backemf There are many types of motors including AC induction motors AC synchronous motors DC brushed motors DC brushless motors stepper motors directdrive DC motors switched reluctance motors AC DC universal motors and other varieties such as threephase AC motors disk motors and others Although we will discuss a number of issues about electric motors the assumption is that you have already studied different motors and how they operate So the discussion here will be at a minimum and only about the Current Field Force N S Force N S Figure 96 A wire carrying a current placed within a magnetic field will experience a force in a direction normal to a plane formed by the current and the field Introduction to Robotics 338 subjects that are directly related to robotic actuation Please refer to other sources for additional detail about motors and their drive circuitry All types of electric motors can be used as a servomotor as will be discussed later In each case the torque or power output of the motor is a function of the strength of the magnetic fields and the current in the windings as well as the length of the conductors of the coils Some motors have permanent magnets PMs These motors generate less heat since the field is always present and no current is needed to build it Others have a soft iron core and coils where an electric current creates the magnetic field In this case although more heat is generated the magnetic field can be varied when needed by changing the current whereas in permanent magnet motors the field is constant Additionally under certain conditions it is possible that the permanent magnet may get damaged and lose its field strength in which case the motor becomes useless 961 Fundamental Differences Between AC and DCType Motors There are some fundamental differences between AC and DCtype motors that dictate their power range control and applications In the following sections we will discuss these differences and their effects The first major difference between these motors is whether or not their speed can be controlled This will be discussed later with servomotors but suffice it to say that the speed of rotation of a DC motor can be con trolled by changing the current to the windings as the current increases or decreases for the same load on the rotor its speed also increases or decreases However the speed of an AC motor among other things is a function of the frequency of the supplied AC power Since the frequency of the AC power is constant the speed of a synchronous AC motor is generally constant The second major factor in the difference between brushed and brushless motors is the life of the brushes and commutators as well as the physical limitation of mechanical switching by brushes Brushless DC motors AC motors and stepper motors are all brushless and therefore they are sturdy and generally have a long life only limited by the life of the rotor bearings Since brushes wear out the life of brushed motors is limited and they require more maintenance The third important issue in the design and operation of all motors is heat dissipation As with many other devices the generated heat in motors eventually becomes the deciding factor about its size and power The heat is generated primarily from the resistance of the wiring to electric current load related but includes heat due to iron losses including eddy current losses and hysteresis losses friction losses brush losses and shortout circuit losses speed related As we will see in more detail later the generated heat is a function of current W i2R A rule of thumb is that a motor may draw five to seven times its rated amperage during 080 full speed which makes this an additional important consideration Thicker wires generate less heat but are more expensive and heavier more inertia and require more space All motors generate this heat However the rate at which the heat is dissipated is very important as is the path that the heat must take to dissipate The heat path is more important than the amount of heat since if the dissipation is faster more generated heat can be dissipated before damage occurs Figure 97 shows the heatdissipation path to the environment for motors in which the rotor contains the winding versus motors in which the stator contains the winding In motors with the winding carrying the PM stator Air gap Motor body Stator winding Motor body 30 30 30 30 Rotor winding PM rotor Air gap Figure 97 Heatdissipation path of motors Actuators and Drive Systems 339 current within the rotor the heat is generated in the rotor This heat must travel from the rotor through the air gap through the permanent magnets through the motors body and be dissipated into the environment it may also go through the shaft to the bearings and out As you know air is a good insulator Therefore the total heattransfer coefficient for this type of motors is relatively low On the other hand in motors where the winding is within the stator the generated heat is dissipated to the air by conduction through the motors body As a result the total heattransfer coefficient is relatively high especially because no air gap exists Consequently these motors can be exposed to relatively higher currents without damage and therefore they are generally more powerful for the same size AC motors stepper motors and brushless DC motors have windings in their stator Overheating may be the most common cause of failure for electric motors It can lead to Failure of the winding isolation causing shorts or burnouts Failure of the bearings resulting in jamming the rotor shaft Degradation of the magnets permanently reducing the motors torque It is estimated that every 10 C increase in the temperature of the motor beyond the recommended values can cut the life of the insulation by half Heat development in a motor is not linear and is a function of the following 3 The basic heat generated in the winding The increase in the wiring resistance as the winding heats up further increasing heat generation The strength of the magnetic flux which is negatively affected by heat reducing the torque and requiring additional current Increasing heat dissipation as temperature rises Therefore it is possible that the motor may achieve equilibrium at an acceptable temperature or the danger exists that the temperature may continue to rise to failure The heat generated in a motor is Pelectric i2R T2 Kt2Rt 97 where i is the current in the winding R and Rt are the nominal electrical resistance of the winding and the resistance at temperature t and T is the torque Kt is the torque constant at temperature t and is a function of the magnetic field number of turns of the windings the effective area of the air gap the radius of the rotor and material properties The variations in the winding electrical resistance can be described by Rt Rref 1 twinding tref α 98 where Rt and Rref are the electrical resistance at the temperature of interest twinding and room temperature tref and α is a material constant αcopper 0 00393 K 1 The torque constant representing the magnetic field of the motor varies with temperature as Kt Kref 1 tmagnet tref β 99 Here Kt and Kref represent torque constants at the temperature of interest tmagnet and the reference tem perature 20 C and β represents the decay of magnetic fluxdensity a material dependent property Since this decay is negative magnetic flux decreases as temperature increases A simplified model for the final tem perature of the motor can be written as tmotor Pelectric Pfriction Rthermal tref 910 where Rthermal is the thermal resistance between the motor and the ambient Through these equations we can estimate the elevated temperature of the motor and find out whether or not it is at equilibrium Introduction to Robotics 340 Example 92 A motor develops a torque of 12 Nm at its nominal speed with reference electrical resistance of 8Ω The reference torque constant for the motor is 05 NmA and the thermal resistance for the motor is 105 KW Ambient temperature is assumed to be 20 C For the material used in the motor β 0 002 K Friction is ignored a Find whether or not the motor temperature will stabilize and if so find the converged value b Repeat the same assuming that due to improvements in heat dissipation for example by using a fan thermal resistance is reduced to 102 KW Solution a Substituting these values in Eqs 97910 we get the following power based on initial resistance Pelectric T2 Kt2Rt 1 22 0 52 8 46W and tmotor Pelectric Pfriction Rthermal tref 46 0 1 05 20 68 C At this temperature both the resistance and the torque constant change and we get Rt Rref 1 twinding tref α 8 1 6820 0 00393 9 5Ω Kt Kref 1 tmagnet tref β 0 5 1 6820 0 002 0 452NmA Resubstituting these values into Eqs 97 and 910 we get a new temperature of Pelectric 1 22 0 4522 9 5 67W tmotor 67 0 1 05 20 90 C The next iterations of the same process show that the temperature continues to rise At iteration 20 the temperature is 180 C degrees and rising uncontrollably indicating that the motor will overheat b Repeating the same with the new thermal resistance will converge after about 30 iterations to near 130 C Therefore it is clear that the proper dissipation of heat is a major issue in motors It should be clear from the preceding discussion that a motor construction with windings in the stator is preferable when considering heat generation and deterioration of the brushes whereas a motor with the winding within the rotor is preferred for speed control A combination of both characteristics would be ideal As we will see in more detail later brushless DC motors and stepper motors possess these characteristics and therefore are more robust and last longer In the following sections we briefly discuss DC motors servomotors brushless DC motors and stepper motors 962 DC Motors DC motors are very common in industry and have been used for a long time As a result they are reliable sturdy and relatively powerful Actuators and Drive Systems 341 Most DC motors consist of permanent magnet stators with a fixed flux or windings that carry a current and can create a variable flux and a rotor that has the winding coils that carry a current Through brushes and commutators the current flows through the windings sequentially causing the rotor to rotate continuously Conversely if the rotor is forced to rotate within the magnetic field a DC current develops and the motor acts as a generator the output is DC but not constant Figure 98 shows the construction of a DC motor its commutators and brushes and the permanent magnet stator If permanent magnets are used to generate the magnetic field the output torque T is proportional to the magnetic flux ϕ and the current in the rotor windings i Then T α ϕ i kt i 911 where kt is called the torque constant Since in permanent magnets the flux is constant the output torque becomes a function of i and to control the output torque i or corresponding voltage must be changed If instead of permanent magnets soft iron cores with windings are used for the stator as well then the output torque is a function of currents in both the rotor and the stator windings as T ktkf irotoristator 912 where both kt and kf are constants Assuming no power loss during this energy conversion the total input must be equal to the output Therefore P T ω E i E T ω i kt ω 913 which indicates that voltage E is proportional to the angular velocity of the motor ω This voltage is called the backemf voltage and is generated across the motor because the windings cross the magnetic field Therefore as the rotor speed increases so does the backemf voltage Since in reality the rotor windings have both resist ance and inductance we can write Figure 99 V Ri Ldi dt E 914 Figure 98 The stator rotor commutators and the brushes of a DC motor R L i E V M J ω Figure 99 Schematic diagram showing a DC motor armature circuit Introduction to Robotics 342 Substituting Eqs 911 and 913 into 914 and rearranging it we get kt R V T L R dT dt kt 2 R ω 915 L R is called motor reactance and is usually small therefore the differential term may be ignored for simplicity of analysis at this time Consequently we get T kt R V kt 2 R ω 916 Equation 916 shows that as input voltage V increases the output torque of the motor increases as well It also shows that as the angular velocity increases the torque decreases due to backemf Therefore when ω 0 torque is the greatest stalled torque and when ω is at its nominal maximum value T 0 and the motor does not produce any useful torque Figure 910 Referring to Eq 913 the output power of the motor is zero when either the angular velocity of the motor at stall condition or the torque at maximum speed are zero as shown in Figure 910 Through the use of powerful magnets made of rareearth materials and alloys such as neodymium the performance of motors has improved significantly albeit at higher costs As a result the powertoweight ratio of motors is much better than before and they have replaced almost all other types of actuators To overcome the problem of high inertia and the large size of many electric motors a disk also called a pancake or hollow rotor can be used In these motors the iron core of the rotor winding is eliminated to reduce its weight and inertia and as a result these motors are capable of producing very large accelerations zero to 2000 rpm in one ms 4 and they respond very favorably to changing currents for control purposes Figure 911 shows a motor in which the hollow rotor has no soft iron In the disk motor in Figure 912 the Torque Speed Tmax ωmax ωmax V 1 2 Power Figure 910 The output torque and power of a DC motor versus its angular velocity Figure 911 Eliminating the soft iron from a rotor makes it lightweight with low inertia Actuators and Drive Systems 343 rotor is a flat printed thin plate with windings etched into it as if we would flatten a rotor into a disk The permanent magnets are generally small short cylindrical magnets that are placed on the side of the disk As a result disk motors are very thin and are used in many applications where both space and acceleration requirements are important Another alternative to save space and reduce inertia is to use a frameless motor as shown in Figure 913 These motors can be directly integrated into the structure of the joint Similar gear reduction can be used for proper rotational speed and torque requirements 963 AC Motors AC motors use the alternating nature of AC power to switch the direction of flux therefore all commutators and brushes are unnecessary The stator houses the coils In synchronous AC motors the rotor is a perma nent magnet In induction AC motors the rotor is a matrix of conductors either in the shape of a cage called squirrelcage motors or a ferric rotor that carries no current as shown in Figure 914a As the flux generated Figure 912 A disk pancake motor The rotor has no iron core and consequently has very little inertia As a result it can accelerate and decelerate very quickly Source Pictures courtesy of Automation Source Technologies and Printed Motor Works Ltd UK Figure 913 Frameless motors can be directly integrated into the joint structure to save space and reduce weight Source Courtesy of Maxon Precision Motors Introduction to Robotics 344 by the AC current changes the rotor follows it and rotates As a result unlike DC motors AC motors have fixed nominal speeds a function of the number of poles on their rotor and the line frequency eg 60 Hz Since AC motors can dissipate heat more favorably than DC motors they can be more powerful The same principles of backemf see Section 966 hold for AC motors as well Nowadays with the available power electronics it is possible to use methodologies such as flux vector con trol to generate a sinusoidal current with desired frequency and amplitude that enable us to control the speed and torque of an AC motor This is accomplished by converting the AC line voltage to a DC form and creating an approximate pulsed sinusoidal DC current at the desired frequency and magnitude to drive the motor Stepper motors driven in microstepping mode and brushless DC motors are similar attempts at making DC motors operate similar to an AC motor There are also reversible AC motors available In this case the motor winding is centertapped therefore as the current flows in each half of the winding the direction of the flux and consequently the rotation of the rotor changes as shown in Figure 914b However since the current flows in only half of the winding the generated torque is half as much There is a wealth of information about practical applications of both DC and AC motors available far beyond the scope of this book For more information please refer to the internet and references such as 5 in this series of articles commercial motor characteristics construction standards and applications are discussed 964 Brushless DC Motors Brushless DC motors are a hybrid of AC motors and DC motors Although not exactly the same their con struction is very similar to an AC motor The windings constitute the stator and the rotor is a permanent magnet usually with multiple poles The major difference is that brushless DC motors are operated with an electronically switched DC waveform that is similar to an AC current either sine wave or trapezoidal waveform but is not necessarily at 60 Hz As a result unlike AC motors DC brushless motors can be oper ated at any speeds including very low speeds To operate a feedback signal is necessary to determine when to switch the direction of the current In practice a resolver an optical encoder or Halleffect sensors send signals to a controller which switches the current to the stator For smooth operation and almostconstant torque the stator usually has three phases in it 2 6 Therefore three currents with a 120 phase shift are fed into the stator Brushless DC motors are operated by a controller circuit They will not operate if you connect them directly to a DC power source Figure 915a shows a radialtype brushless DC motor with the rotor and stator side by side Figure 915b is the stator of an axialtype brushless motor i i a b Figure 914 An AC motor and centertapped AC motor winding Actuators and Drive Systems 345 965 DirectDrive Electric Motors Directdrive electric motors are very similar in construction to brushless DC motors or stepper motors The major difference is that they are designed to deliver a very large torque at very low speeds with very high resolution These motors are intended to be used directly with a joint without any gear reduction Direct drive motors can be very expensive and very heavy but have impressive characteristics A voice coil may be used as a directdrive actuator for lowtorque but highresolution applications Voice coils are commonly used in disk drives and deliver impressive characteristics in reliability and resolution Figure 916 shows a disk drive voice coil actuator 966 Servomotors An important issue in all electric motors is the backemf As discussed earlier a conductor carrying a current within a magnetic field will experience a force which causes it to move Similarly if a conductor moves within a magnetic field such that it crosses the field lines or if the field strength changes eg when a coil is turned off a current is induced into the conductor This is the basic principle of electric power generation a b Figure 915 Brushless DC motors Figure 916 Disk drive voice coil actuator Introduction to Robotics 346 However it also means that when the wires of the windings in a motor are rotating within the magnetic field of the magnets a current or voltage is induced in them in the opposite direction of the input current back emf which can be thought of as tending to reduce the effective current of the motor The faster the motor rotates the larger the backemf Backemf current is usually expressed as a function of rotor speed as shown in Eq 913 and repeated here E kt ω where kt is typically given in volts per 1000 rpm As the motor approaches its nominal noload speed the backemf is large enough such that the motor speed stabilizes at the nominal noload speed with its corre sponding effective current However at this nominal speed the output torque of the motor is essentially zero The motors velocity is governed by Eq 916 repeated here T kt R V kt 2 R ω As shown in Figure 910 at maximum ω the output torque is zero With constant input voltage V if a load is applied to the motor it slows down resulting in a smaller backemf larger effective current and conse quently a positive net torque The larger the load the slower the motor rotates in order to develop a larger torque If the load becomes increasingly larger there comes a time when the motor stalls there is no back emf the effective current is at its maximum and the torque is at its maximum In each case when the back emf is smaller and the output torque is larger since the net current is larger so is the generated heat Under stall or nearstall conditions the generated heat may be large enough to damage the motor This is why the recommended peak torque is generally very different from continuous duty torque To increase the motor torque while maintaining a desired speed the input voltage V or current to the rotor or stator or both if soft iron magnets are used must be increased In such a case although the motor rotates at the same speed and although the backemf is still the same the larger voltage increases the net effective current and consequently the torque By varying the voltage or corresponding current the speedtorque balance can be maintained as desired This system is called a servomotor It should be men tioned here that monitoring the sudden changes in the required current in a servomotor or a sudden change in the load can be related to a robot hitting an object or colliding with a human Consequently it is possible to use this to control the motions of a collaborative or cooperative robot and to stop it immediately if the load suddenly increases unexpectedly A servomotor is a DC AC brushless or even stepper motor with feedback called an integrated hybrid servomotor that can be controlled to move at a desired speed and torque for a desired angle of rotation To do this a feedback device sends signals to the servocontroller circuit reporting its angular position and velocity If as a result of higher loads the velocity is lower than desired set value the voltage or current is increased until the speed is equal to the desired value If the speed signal shows that the velocity is larger than the desired value the voltage is reduced accordingly If position feedback is used as well the feedback signal is used to shut off the motor as the desired angular position is achieved We will discuss sensors in Chapter 10 Here suffice it to say that many different types of sensors may be used for this purpose including encoders resolvers potentiometers and tachometers If a position sensor such as a potentiometer or encoder is used its signal can be differentiated to produce a velocity signal Figure 917 shows a servomotor with its associated feedback device and circuitry and a schematic drawing of a simple control block diagram for a servomotor 967 Stepper Motors Stepper motors are versatile robust simple motors that can be used in many applications In most applica tions stepper motors are used without feedback although they can be used with feedback as servomotors too This is because unless a step is missed the motor rotates a known angle each time it is stepped Therefore its Actuators and Drive Systems 347 angular position is always known and no feedback is necessary Stepper motors come in many different forms and principles of operation Each type has certain characteristics unique to it making it an appropriate choice for particular applications Most stepper motors can be used in different modes by wiring them differently Unlike regular DC or AC motors but like brushless DC motors if you connect a stepper motor to power it will not rotate Steppers rotate only when the magnetic field is rotated through its different windings In fact their maximum torque is developed when they do not turn Even when not powered steppers have a resistive torque called detent or residual torque An external torque must be applied to turn a stepper motor even when not powered Stepper motors need a microprocessor or drivercontroller indexer circuit for rotation You may either create your own driver or purchase an indexer that drives the stepper motor for you Similar to servomotors which require feedback circuitry stepper motors need drive circuitry So in each application the designer must decide which type of motor is more appropriate For industrial robotic actuation except in small tabletop robots stepper motors are hardly ever used without feedback However stepper motors are used extensively in nonindustrial robots and robotic devices as well as in machines used in conjunction with robots from materialhandling machines to peripheral devices and from automatic manufacturing to control devices Without feedback stepper motors should be used in applications where the certainty of not missing steps is high or the price of missing steps is low or where the motor resets itself repeatedly during operations such that even if a step is missed it will correct itself soon eg a printer For more information about stepper motors versus servomotors see 7 Structure of Stepper Motors Generally stepper motors have soft iron or permanent magnet rotors while their stators house the winding coils Based on the discussion in Section 961 since the heat generated in the coils can more easily dissipate a Motor dynamics Load Desired position and velocity Error Feedback Output position Differentiate Velocity b Figure 917 a A servomotor and b the schematic of a servomotor controller A sensor sends velocity and position signals to the controller which controls the output velocity and position of the servomotor Introduction to Robotics 348 through the motors body stepper motors are less susceptible to heat damage and since there are no brushes or commutators they have long life The rotors of stepper motors are not all alike We will discuss two types of rotors later In each case though the rotor follows a moving magnetic field generated by the coils As a result somewhat similar to both AC motors and brushless DC motors a rotor follows a moving field under the control of a controller or driver In the next sections we study how stepper motors operate Principle of Operation Generally there are three types of stepper motors variable reluctance permanent magnet also called a can stack and hybrid Variable reluctance motors use a soft iron toothed rotor Permanent magnet canstack type motors use a permanent magnet rotor without teeth Hybrid motors have a permanent magnet but toothed rotor These simple differences result in somewhat different principles of operation In the following sections we discuss canstack and hybrid motors The variable reluctance motors operate with the same prin ciple as hybrid motors Imagine a stepper motor with two coils as its stator and a permanent magnet as its rotor as in Figure 918 When one of the coils of the stator is energized the permanently magnetized rotor or soft iron in variable reluctance motors rotates to align itself with the stator magnetic field Figure 918a The rotor stays at this position unless the field rotates When this coil is turned off and the second coil is turned on the rotor rotates to once again align itself with the field in the new position Figure 918b Each rotation is equal to the step angle which may vary from 180 to as little as a fraction of a degree depending on the number of coils and the way they are arranged in this example 90 If the first coil is once again turned in the opposite polarity while the second is turned off the rotor rotates another step in the same direction The process continues as one coil is turned off and another is turned on A sequence of four steps brings the rotor back to exactly the same state it was at the beginning of the sequence Now imagine that at the conclusion of the first step instead of turning off one coil and turning on the sec ond coil both are turned on In that case the rotor rotates only 45 to align itself to the path of least reluctance Figure 918c Later if the first coil is turned off while the second remains on the rotor rotates another 45 This is called halfstep operation and includes a sequence of eight movements Of course with the opposite onoff sequence the rotor will rotate in the opposite direction Typical step pers run between 1895 in fullstep mode Obviously one way to reduce the size of the steps is to increase the number of coils However there is a physical limit to how many coils may be used To further increase the a b c S N S N N S N S S N N S N S Figure 918 Basic principle of operation of a stepper motor As the coils in the stator are turned on and off the rotor rotates to align itself with the magnetic field Actuators and Drive Systems 349 number of steps per revolution different numbers of teeth can be built into the stator and rotor creating an effect similar to a caliper For instance as we will see later 50 teeth on the rotor and 40 teeth on the stator results in a 1 8 step size with 200 steps per revolution CanStack Motors These motors are very common and inexpensive usually have a 7 5 or similar step size and are used in many different applications Due to their construction they are relatively short and lend themselves to applications with low vertical clearance The rotor is a cylinder with alternate strips of northsouth polarities usually made of resin embedded with ferrite particles similar to refrigerator magnets as shown in Figure 919 A typical rotor for a 7 5 stepper motor has 24 pairs of poles on it A refrigerator magnet sticks to ferrite materials on one side only the side that is meant to have a message or advertisement on it does not stick Is it because of the additional print layer Not really It is because there is no magnetic flux on that side but only on the side that sticks These magnets are made of a resin mixed with a ferrite powder that is magnetized as a series of small horseshoe magnets next to each other called a Halbach array as shown in Figure 920a The permanent magnet rotors of many stepper motors and brushless DC motors are made the same way therefore the rotors crosssection is made up of a series of horseshoe magnets next to each other This arrangement creates a unique rotor that allows small steps in a brushless DC motor see Figure 915 and canstacktype stepper motor see Figure 919 Figure 920b shows both a refrigerator magnet and a rotor with soft iron dust sprinkled on them showing the magnetic poles S N S N S N Figure 919 A typical rotor of a canstack stepper motor N S N S N S N S N S N S S S N N a b Figure 920 a magnetic flux pattern on a refrigerator magnet and the rotor of a stepper motor or brushless DC motor b how the Halbach arrays look when iron powder is sprinkled over them Introduction to Robotics 350 The stator is made up of 4 plates each with 12 tabs teeth stacked on top of each other with the tabs stag gered in 1324 order as shown in Figures 921 and 922 One coil is wrapped around plates 1 and 2 and one around plates 3 and 4 The four plates create two independent magnets on top of each other each with a wind ing that is centertapped called bifilar and grounded at the center A current going through one coil and exit ing at the center creates a certain magnetic polarity that is the opposite of the polarity if the current goes in from the other end and exits at the center wire As a result each coil may be energized at either polarity Each winding causes all the tabs on each plate of a pair to be of similar polarity all north or all south Consequently energizing both windings creates repeating patterns of north and south in all four plates Figure 922 is a schematic of a canstack stator linearized for better visualization Plates 1 and 2 are related to coil A1A2 two halves of coil A and plates 3 and 4 to coil B1B2 two halves of coil B If coil A1 is ener gized plate 1 will be north and plate 2 will be south However if coil A2 is energized the polarity of plates 1 and 2 is reversed plate 1 is south and plate 2 is north The same happens to plates 3 and 4 with coils B1 and B2 This is called centertapping and is shown in Figure 923 The advantage of center tapping is that during Figure 921 The stator of a canstack stepper motor Coil A Coil B A1 A2 B1 B2 1 2 3 4 Cross section of four plates staggered A single plate with tabs teeth Figure 922 Canstack stator windings and plates Coil A 12 Coil A1 12 Coil A2 Figure 923 Center tapping of a coil allows changing the polarity of the magnetic field by having the current flow in either half of the coil Actuators and Drive Systems 351 manufacturing a set of two wires is simultaneously wrapped around the pole At the conclusion the two heads of the wires are connected and form the ground while the tails are used as contact points for input current As a result the magnet may easily be energized with either polarity by simply having current in each half of the double winding During the operation of the motor two coils are turned on in the following sequence resulting in the indi cated polarities Step A1 A2 B1 B2 Plate1 Plate2 Plate 3 Plate 4 1 on off on off N S N S 2 off on on off S N N S 3 off on off on S N S N 4 on off off on N S S N Notice that A1 and A2 or B1 and B2 are never turned on simultaneously as they would cancel each others fields During each step of the sequence the poles on the rotor align themselves between the stator poles with the least reluctance such that any south pole on the rotor will be between two north poles on the stator and any north pole on the rotor will be between two south poles on the stator as in Figure 924 In this figure arcs of SN show the polarities of the poles at each step of the sequence At the end of the fourstep sequence the rotor has moved four steps which brings it to exactly the same situation as in the beginning of the sequence Therefore repeating the fourstep sequence will rotate the rotor continuously The faster the sequencing of steps the faster the rotor will rotate As a result by carefully controlling how many sequences are provided and at what speed the rotational displacement as well as angular velocity of the motor can be controlled Note that Figure 924 is drawn with only one quarter of the actual number of stator and rotor poles In actual stepper motors there are a total of 48 poles providing a 7 5 step angle N N S S S N N S S S N N N S S N S S N N S N N S N S S N Sequence 4 3 2 1 N S N S N S Plate 1 Plate 3 Plate 2 Plate 4 2 3 1 4 2 3 1 4 1 2 3 4 Sequence Figure 924 The cross section of a canstack stepper motor Each SN arc shows the polarities of each pole during one step of the sequence of four Introduction to Robotics 352 Instead of always energizing two coils simultaneously if either one or two coils are energized alternately rendering an eightstep sequence the stepper will step at half the angle therefore halfstepping However this is not common in canstack motors Table 92 shows the onoff sequence for fullstepping as well as for halfstepping the stepper motor Reversing the sequence causes the stepper motor to rotate in the opposite direction Hybrid Stepper Motors These steppers are usually made with two coils either center tapped or two independent windings in oppo site directions each with four poles The rotor is made of two collinear cylinders mounted on a stainless steel shaft such that one end of the rotor is north and the other end is south Figure 925 The rotor and the stator poles are all cut to have teeth where the teeth on one half of the rotor are offset by a half tooth from the other half of the rotor However to understand the role of the teeth on the rotor and stator of these motors we first review the concept behind a caliper Table 92 a Fullstep and b halfstep sequence for stepper motors Step A1 A2 B1 B2 1 On Off On Off 2 Off On On Off 3 Off On Off On 4 On Off Off On Step A1 A2 B1 B2 1 On Off On Off 2 Off Off On Off 3 Off On On Off 4 Off On Off Off 5 Off On Off On 6 Off Off Off On 7 On Off Off On 8 On Off Off Off Figure 925 The stator left and rotor right of a hybrid stepper motor Actuators and Drive Systems 353 Lets take two parallel lines of equal length capable of sliding relative to each other each one unit of length long Next divide each line into 10 equal divisions In order to have the division lines aligned with each other when moving one step the sliding line must move one whole division to the next division Figure 926 Similarly take two lines and divide one into 10 equal divisions and the other into 11 equal divisions In this case the divisions are 01 and approximately 009 unit respectively If two of the division lines are aligned and one of the lines slides it will only take a distance of 01 009 001 units to align the next pair of division lines Calipers do exactly the same By dividing the lines into different lengths we can easily measure a dis tance at a fraction of the smallest division The teeth on the stepper motor stator and rotor are similar Since the number of teeth on the stator and rotor are different for each step the rotor only rotates an angle equal to the difference between the two divi sions With 40 teeth on the stator poles and 50 teeth on the rotor the step angle is 1 8 at full steps because 360 40 360 50 9 7 2 1 8 917 The two rotor cylinders Figure 925 are a halfstep out of phase and the stator poles run across the whole length of the stepper Although the way hybrid and canstack stepper motors work is somewhat different driving the motors is similar Figure 927 is a simplified hybrid stepper motor with only two coils on the stator and three teeth on the rotor Actual motors have many more teeth on the stator and rotor As long as the number of teeth in Second divisions aligned Second divisions aligned 01 unit slide 001 unit slide First divisions aligned First divisions aligned Figure 926 Application of unequal divisions for measuring lengths as in a caliper a b N S S S S N S S S S Figure 927 Basic operation of a hybrid stepper motor Introduction to Robotics 354 the stator and the rotor are different the previously mentioned effect is true Now suppose that one coil is energized as shown in Figure 927a The rotor with all its teeth as south on one side and north on the other will align itself to the path of least reluctance as shown If the coil is turned off and the second coil is turned on although the flux or field has turned 90 the rotor will rotate only 30 to the new location in Figure 927b The same sequence will continue similar to a canstack motor and the rotor will rotate accord ingly Changing the sequence backward causes the rotor to rotate backward Applying the sequence faster causes the rotor to move faster Therefore by controlling the sequence its direction and its speed the rotors motion and angular velocity can be controlled Of course the same eightstep sequence can also be applied to these motors for halfstep operation Unipolar Bipolar and Bifilar Stepper Motors Unipolar stepper motors are designed to work with one power source Generally it is desirable to have one power source that powers both the motor windings as well as the drive circuits Unless other techniques of switching are used with one power source it is impossible to simply change the polarity of the coils by chan ging the polarity of the power from the power source as this would ruin the electronic drive circuitry Since the polarity of the coils cannot be changed these motors may not be run in halfstep mode However there is only one power source used which reduces the cost and the motor develops its full power For bipolar motors the assumption is that the polarity of the power source can be changed As a result there are either two power sources where one powers the motor windings and its polarity can be switched and one is used to power the drive circuitry or that more sophisticated switching is used with one power supply to prevent damage to the circuits In this case the motor requires an additional power supply and electronics but can be run either at full or halfstep modes and it develops its full power In bifilar motors the coils are centertapped as was previously discussed In this case the polarity of the coils can be changed simply by passing the current in each half of the coil Therefore with simple circuits and one power supply the motor can be run in either full or halfstep mode but since only half of the coil is energized the motor develops only half of its full power Figure 928 is a schematic drawing for unipolar and bipolar drive circuits The switches are connected to the microprocessor ports and are turned on and off by the microprocessor SW4 SW3 SW2 SW1 SW1 SW3 SW2 SW4 Unipolar drive circuit Bipolar drive circuit Figure 928 Schematic drawing for unipolar and bipolar drive circuits Actuators and Drive Systems 355 Depending on how they are wired internally some motors may be used in different modes Figure 929 shows how stepper motors may be wired internally In an 8lead configuration you may wire the motor in any mode as the coils are completely detached from each other In this case it is also easy to find which two wires are connected to which coil The 6lead motors are connected such that each coil is centertapped but the two coils are detached In 5lead motors the two center taps are connected together Fourlead motors may not be used in bifilar mode By measuring the resistance between different wires we may find which wire is connected to which coil Stepper Motor SpeedTorque Characteristics Stepper motors are very useful in many applications They do not require any feedback although a hybrid servomotor with a stepper motor is possible as it is assumed that stepper motors advance a known angle every time a signal is sent As long as the load on the motor is less than the torque it can deliver the steps will not be missed and this assumption is correct However if the load is too large or if the speed is more than the motor is capable of rotating steps may be missed and since there is no feedback all subsequent positions will be incorrect Stepper motors develop their maximum torque called holding torque at zero angular velocity when the rotor is stationary the torque developed with no power is called detent or residual torque Like all motors as the speed of the stepper motor increases the torque it develops reduces but more significantly than others Therefore it is very important that the designer check the speedtorque characteristic of stepper motors from manufacturers before a choice is made Figure 930 is a typical speedtorque characteristic for a stepper motor The useful torque also called pullout torque depends on the way the stepper is externally wired and the drive power signals used 8 One reason for this poor performance at higher speeds is that since at each step the rotor must accelerate cruise decelerate and stop at the next step and this process must be repeated for every single step stepper motors cannot rotate quickly especially if the rotor is heavy If the signals coming to the motor are too fast the rotor will not have time to acceleratedecelerate and will miss steps So one reason for losing output 4lead 5lead 6lead 8lead Figure 929 Stepper motor lead configurations Torque Speed Figure 930 A typical speedtorque curve for a stepper motor Introduction to Robotics 356 torque at higher speeds is the inertia load However even more important is the changing magnetic field of the stator As was discussed earlier every time a coil is turned off there is a varying in this case decaying flux that causes backemf in the wires of stator coils slowing down the decay of the flux Consequently the back emf flux tends to hold the rotor from rotating slowing it down To remedy this problem and to prevent highcurrent sparking across the switches Figure 931a a free wheeling diode may be added to the circuit as in Figure 931b The diode allows the current to continue flowing through the coil and be dissipated through conversion to heat in the resistor The effectiveness of the process can be increased by adding a Zener diode to the circuit as shown in Figure 931c It is important to realize that the Zener diodes breakdown voltage must be near the transistors breakdown voltage rating Otherwise it will have no effect Microstepping Stepper Motors In microstepping instead of turning the coils on and off abruptly the powerup or powerdown for each coil is done gradually by dividing the changes into smaller divisions as high as 250 steps As an example suppose coil A is on and coil B is off In full stepping the next sequence is for coil A to be off and for coil B to be on In microstepping this is divided lets say into 100 divisions As a result in the next microstep coil A will be 99 on and coil B will be 1 on Therefore the rotor will turn slightly to the point of least reluctance which is a microstep away from the previous original step In the next step coil A becomes 98 strong and coil B is at 2 still microstepping the rotor a little further The process continues until both are equal for the halfstep and then until coil A is turned off and coil B is 100 on This divides the full step into 100 smaller steps For a 200step 1 8 stepper motor this means that with microstepping the motor will have 20 000 steps per revolution In practice each step is usually divided into 125 or 250 microsteps requiring 25 000 or 50 000 microsteps per revolution for a 1 8 stepper This dividing of the voltages is done with electronic circuits that resolve the voltage into smaller divisions and corresponding steps Since unlike full stepping the dissipation of the flux is not abrupt the backemf is much smaller As a result with microstepping a stepper motors performance is improved significantly The motor develops a higher torque and its maximum speed without missed steps is much higher Additionally because microsteps are very small the motors movement is not as piecewise consequently vibration of the motor is smaller and less pronounced Of course the disadvantage is that microstepping requires a more a b c R L V L V R V SW4 SW1 Figure 931 Application of a a resistor b a diode and c a Zener diode with stepper motors for increasing the maximum velocity Actuators and Drive Systems 357 sophisticated driver that is much more accurate with better current resolution and is more expensive Addi tionally the microsteps are not as uniform and accurate as expected In practice instead of dividing the steps into linear and equally divided divisions like 1 divisions the changes follow a sine wave In other words the voltage to each coil is a piecewise digital voltage resolved into up to 250 steps Consequently in this mode the stepper is in fact similar to an AC synchronous motor except that its angular velocity is not fixed with line frequency but is driven by the microstepper driver cir cuit As a result the motor is driven at a desired angular velocity for any desired angular displacement and can be stopped at any instant Stepper Motor Control Stepper motors may be driven by microprocessors or microcontrollers either directly or through driver circuits They can also be driven by a dedicated stepper drivertranslator that motor manufacturers offer To drive a stepper motor directly with a microprocessor the power to the motor coils must be directly controlled by the processor This is accomplished in two ways depending on the microprocessor If the out put port of the processor is low power mA it will not be able to provide a high enough current to the motor windings the output port of a personal computer is an example of this situation As a result the output port must turn on and off power transistors that control the power flow into the motor coils at higher currents If the output ports of the microprocessor can provide high current flow as long as the current requirement of the motor is less than the microprocessors the motor coils can be directly connected to the output ports In either case the microprocessor controls the current flow to the coils of the stepper motor by sequentially turning on and off the output ports as discussed previously The stepper will move in one direction or another depending on the order of the sequence In this situation four output ports are needed to drive one stepper motor but the steppers displacement velocity and direction are all under control Figure 932 shows a schematic arrangement in which a microprocessor with a lowpower output port is used to drive a stepper motor with transistors Figure 932a as well as a microprocessor with high current capa bility which is used without transistors Figure 932b Microprocessor Output port Vin a SW4 SW3 SW2 SW1 Microprocessor Output port b Figure 932 Schematic drawing of the application of a microcontroller in driving a stepper motor a with low current output and b with high current output Introduction to Robotics 358 Alternatively it is possible to use a dedicated integrated circuit IC chip to control the motion of a stepper motor 9 10 These IC chips called stepper drivers with translator are designed to sequence the stepper motor based on the information they receive In most cases the information needed is a stream of pulses Every time the driver receives a pulse the input to the chip changes from low to high it advances the stepper by one step If n signals are received the motor is sequenced for n steps When a driver is used the micro processor only provides the stream of pulses which are always the same and not the sequences A second input pulse to the driver determines the direction of motion Consequently only two output ports are needed to drive a stepper motor for any displacement at either direction at any speed Therefore using stepper dri vers the same number of output ports as before four outputs can drive twice as many stepper motors Most drivers provide a choice of full or half stepping by making one of their pins high or low In this case three output lines are necessary Drivers are very easy to use are very inexpensive and simplify programming of the processors Relatively inexpensive microstepping stepper driver IC chips are also commercially available and may be used for limited microstepping Figure 933 shows how the stepper driver may be used Drivers like microprocessors may be low current or high current If they are low current it is necessary to use power transistors as switches where the driver turns the transistors on and off thus driving the stepper motor If the driver is high current the output port of the driver may directly be connected to the stepper motor simplifying the circuit Another way to run a stepper motor with a driver is to provide the impulse train to the driver by means other than a microprocessor As an example the timer circuit in Figure 934 can provide a steady stream of impulses to the driver causing it to run the stepper motor However to change the velocity of the stepper or to control the total displacement other means of control are needed for example adjusting the potenti ometers in the circuit Still in certain applications where the velocity remains constant or where the total displacement can be controlled by other means such as a microswitch the timer circuit may be very useful The charge time for the circuit when the output signal is high is longer than the discharge time where the signal is low For RH R1 R2 R3 the following equations apply to this circuit thigh 0 693C2 RH R4 tlow 0 693C2 R4 ttotal 0 693C2 RH 2R4 f 1 44 C2 RH 2R4 918 Direction control Stream of pulses input Coil 1 Coil 2 Coil 3 Coil 4 Stepper motor Microprocessor Stepper driver Figure 933 Schematic of a typical stepper motor driver Actuators and Drive Systems 359 For practical purposes R3 should be large The circuit should be stable up to 100 kHz The 001μF capacitor is used to clean the output signal With an appropriate choice of resistors and capacitors a wide range of periods may be achieved For more information on mechatronics applications and design please refer to 11 12 13 14 15 97 Microprocessor Control of Electric Motors As we discussed in Chapter 1 a robot is supposed to be controlled by computers or microprocessors There fore it is important to be able to control the motions of the actuators with microprocessors We have already discussed in some detail how a stepper motor or a brushless DC motor may be controlled by a microproc essor In the following sections a few other common techniques for controlling electric motors are discussed A microprocessor is a digital device It only deals with digital inputs and digital outputs Any voltage lower than about 08 volts is considered low off 0 Any voltage above approximately 24 volts is considered high on 1 The microprocessor can only read the 0s and 1s It can also only output 0s and 1s All analog or continuous input signals or information must be digitized for use by a microprocessor All desired analog or continuous output signals or information must be converted from digital to analog as well Analogtodigital converters ADCs and digitaltoanalog converters DACs are used for this purpose However a key ele ment in both DACs and ADCs is their resolution Digital devices handle numbers and all other information by bits which can only be 0 or 1 A onebit piece of information can only have two states 0 or 1 off or on To add to this capability we may use two bits where there are four possibilities 00 01 10 11 As the number of bits increases the variations increase to 2n There fore a 4bit set has 16 distinct possibilities and an 8bit set has 28 or 256 possibilities Every four bits is called a nibble and every eight bits is a byte Suppose you want to read a variable voltage between 05 volts into your microprocessor and be able to use it for running a device Of course the processor can only read high or low not a continuous number If you use a onebit input port it can only recognize whether the voltage is high or low hardly a continuous process Now suppose you use two bits to read the voltage There are four distinct possibilities for two bits Conse quently the voltage can be divided into four different values perhaps 0 167 334 and 5 which correspond to 00 01 10 and 11 bit mapping Then we may distinguish four different levels of voltage with the processor If this resolution is not enough we would have to increase the number of bits With a 4bit input the 5volt voltage can be divided into 16 portions corresponding to 0000 0001 0010 0011 mapping Then the 8 7 6 5 1 2 3 4 5 5 5 Output 5 VDC Coarse Fine R1 R3 R4 R2 C2 001 μF Figure 934 Schematic drawing of a timer circuit that creates a pulse train which can be used to drive a stepper driver Adjusting the potentiometers will change the period of the output pulses Introduction to Robotics 360 smallest change in voltage we could read resolution is 033 volts As you can see with larger number of bits the resolution improves However what this means is that to read one input voltage four input ports of the processor have to be dedicated to it Additionally you would have to use an ADC to convert the analog volt age signal to a digital form and feed the information from ADC into the processor Conversely suppose you want to control a servomotor with a microprocessor In order to have a variable voltage to control the speed of the motor the digital information must be converted to analog form through a DAC The resolution of this information is also limited to the number of bits used For better resolution more bits are necessary Imagine how many input and output ports would be necessary to have an accurate 6axis robot with multiple servomotors inputs and sensors To control the motions of a robot or to move from one point to another the robot controller calculates the magnitude of the change in each joint based on the kinematic equations governing the motions of the robot If it is desired to also have velocity control the speed at which each joint must move is also calculated This information determines how much and how fast each joint must move which alternately determines how much and how fast the servomotors of each joint must rotate based on the gear ratio of the joint and so on This information is converted to a set of voltages and voltage profiles The voltage is fed to the servomotor and the feedback signals going back to the controller are checked The voltage is adjusted accordingly for desired velocity until the joint is moved a desired amount This process continues until the robots move ments are finished Consequently it is necessary to have control over the voltages that go to each servomotor and to be able to read the feedback signals from each joint It should be mentioned here that a new category of intelligent motor controllers IMC is evolving 16 These dedicated highspeed controllers can be programmed for the highperformance motor control of brushless motors and AC induction motors 971 Pulse Width Modulation As we discussed earlier to be able to run a servomotor with a voltage that is close to analog we would have to dedicate a large number of output ports or bits to it to increase resolution This is expensive and may be impossible if more input and output ports are needed than available Additionally since this voltage is low power and cannot directly run the motor it has to be used as input to a power transistor that controls the motor Now lets see what happens when a transistor is not run in full power mode Figure 935a shows a simple circuit to control a motor VCE of the ideal transistor is controlled by the micro processor which in turn controls the voltage across the motor and therefore the current The power loss in the transistor can be found as i Vm R Ptrans VCE i VinVm i VinVm Vm R 919 Figure 935b shows the power loss of the transistor As Eq 919 indicates when either Vm 0 or Vm Vin power loss is zero this assumes that the internal resistance of an ideal transistor is very low and therefore when fully on the voltage drop across it is very little Otherwise the power loss is a secondorder function of the Vm motor voltage as shown in Figure 935b If the transistor is fully on or off there is no power loss Otherwise it generates and wastes a lot of power Therefore it is beneficial to run the transistor fully on or fully off To overcome both preceding problems a method called pulse width modulation PWM is used PWM can create variable voltages with only one output port of the microprocessor without any loss in the power tran sistors because they are always fully on or off To do this the voltage on the output port of the processor is turned on and off repeatedly many times a second such that by varying the length of time that the voltage is Actuators and Drive Systems 361 on or off the average effective voltage will vary In other words as in Figure 936 as t1 versus t changes the average voltage at the motor changes accordingly The average output voltage in PWM is Vout V t1 t 920 The pulse rate of PWM may be 220 kHz while the natural frequency of a motor is much smaller If the rate of PWM switching remains many times larger than natural frequency of the motors rotor the switching will have little effect on the performance of the motor The motor effectively acts as a lowpass filter and does not respond to onoff signals except through the average value of the input voltage due to PWM PWM can create an audible noise in a motor which becomes inaudible as the frequency increases beyond the hearing threshold of humans On the other hand theoretically the power loss of the transistor is zero when it is off or fully on However in reality every time the transistor is turned on or off it takes a finite time for the voltage to build up or break down causing heat generation As the frequency increases heat gener ation increases as well Therefore it is crucial to use transistors that have very fast switching capability eg MOSFETs for low power and IGBTs for higher power Additionally as the PWM rate increases the back emf voltage in the motor due to L di dt in Eq 914 can also increase Therefore it may be necessary to insert a diode across the motor armature to protect the system Time V Voltage t1 t Effective average voltage Figure 936 Pulse width modulation timing M R i Wasted power 0 Vm Vin V m Vin VCE Maximum power loss Transistor off Transistor fully on a b Figure 935 a Application of a power transistor to control the supplied voltage to a motor b the power loss of the transistor at different voltages Introduction to Robotics 362 By varying the PWM timing continuously a variable voltage can be created that can be used in brushless DC motors servomotors or similar applications Figure 937 depicts sine wave generation with PWM 972 Direction Control of DC Motors with an HBridge Another troublesome issue in motor control with a microprocessor is the changing of polarity for direction change In microprocessor control of motors it is desirable to change the direction of current flow in a motor to change its direction of rotation with only two bits of information In other words instead of actually chan ging the polarity we may change the direction of the flow by changing bit information from the microproc essor A simple circuit called an Hbridge can accomplish this as shown in Figure 938 As shown if all four switches are off the rotor coasts freely If SW1 and SW4 are connected the current flows from A to B and the rotor rotates in one direction whereas if SW2 and SW3 are connected the current flows from B to A and the rotor rotates in the opposite direction In fact if SW3 and SW4 are connected due to backemf a braking effect is created on the rotor Regardless the switches are turned on and off by the microprocessor therefore only two bits are needed to control the Hbridge and the direction of rotation of the motor Figure 939 shows how an Hbridge is wired The diodes are necessary to prevent damage to the circuitry during switching Additionally if two switches on the same side are turned on together a short circuit occurs Time Vcc Voltage Figure 937 Sine wave generation with pulse width modulation Rotor coasts freely Forward direction Reverse direction Braking SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V Figure 938 Directional control of a motor using switches in an Hbridge Actuators and Drive Systems 363 The same is true if one switch on one side does not turn off before the other is turned on Most commercial Hbridges have internal protection built into them 98 Magnetostrictive Actuators When a piece of a material called TerfenolD is placed near a magnet this special rareearthiron material changes its shape slightly This phenomenon called a magnetostriction effect is used to make linear motors with μinch displacement capabilities 17 18 To run the actuator a magnetostrictive rod covered by a mag netic coil is attached to two chassis As the magnetic field changes causing the rod to contract and expand one chassis moves relative to the other A similar concept is used with piezo crystals to create a linear motor with nanoinch displacements including flexible actuators for robots 19 20 21 22 99 ShapeMemory Type Metals One particular type of titaniumnickel shapememory alloy called Biometal muscle wire a patented alloy shortens by about 4 when it reaches a certain temperature The transition temperature can be designed into the material by changing the composition of the alloy but standard samples are set for about 90 C At around this temperature the crystalline structure of the alloy makes a transition from martensitic to austenitic state and consequently it shortens However unlike many other shapememory alloys it switches back to mar tensitic state when it is cooled down This process can continue for hundreds of thousands of cycles if the loading on the wire is low The common source of heat for this transition is an electric current flowing through the metal itself which heats due to its electrical resistance As a result a piece of Biometal wire can easily be shortened by an electric current from a battery or other power sources The major disadvantage of the wire is that the total strain happens within a very small temperature range therefore except in onoff situations it is very difficult to accurately control the strain and thus the displacement 23 Nevertheless the alloy can be used as actuating muscle for many applications including grippers switches and more 910 Electroactive Polymer Actuators EAPs When exposed to highvoltage electric fields due to a phenomenon called Maxwell stress dielectric elasto mers such as silicones and acrylics contract in the direction of the field and expand in the direction normal to it By laminating thin films of the material with layers of electrodes on two sides the elastomer can contract in the direction of the electric field formed between the electrodes that act as a capacitor and expand V SW2 SW1 SW3 SW4 Forward A B Reverse High SW1 SW4 Low High SW2 SW3 Low Direction of rotation Figure 939 Application of Hbridge in controlling the direction of rotation of a motor Introduction to Robotics 364 perpendicularly to it 24 To act as an actuator the laminate can be formed in many shapes in series parallel or series and parallel as well as in cylindrical configuration 25 When in the form of a sheet the material reacts to a voltage between any two points on it and bends locally 911 Speed Reduction Any means of speed reduction common in industry may be used in robots as well This includes fixedaxis and planetary gear trains with many types of gears Additionally particular types of planetary gear trains called Harmonic Drive and Orbidrive as well as a novel design with nutating gears may be used The following sections describe the Harmonic Drive concept as well as the nutating gears concept In planetary gear trains there are normally four basic elements the sun gear the ring gear the arm and the planets For calculation purposes the sun and the ring gears are called first and last gears Although we will not develop the following equation here it can be stated that for a gear train with corresponding angular velocities and number of teeth for the first and last gears the following is true 26 ωLA ωFA ωLωA ωF ωA NF N3 N2 NL 921 where ωF ωL and ωA are the angular velocities of the first and last gears and the arm ωLA and ωFA are the angular velocities of the first and last gears relative to the arm and NL NF N2 and N3 are the number of teeth of the first last and the planet gears as in Figure 940 In this gear train example it is assumed that the first gear is stationary and its angular velocity is zero The input to the system is the arm and the output is the last gear There are two planets designated as gears 2 and 3 For ωF 0 from Eq 921 we get NFN3ωA N2NLωLN2NLωA ωA N2NLNFN3 N2NLωL and e ωL ωA N2NLNFN3 N2NL 922 where e is the gear ratio for the system This can be used to calculate the gear ratio based on the number of teeth of the four gears N3 N2 NF NL Planet gears Internal First gear ωL ωF ωA Internal Last gear Figure 940 Schematic drawing of a planetary gear train Actuators and Drive Systems 365 In Harmonic Drives the number of teeth of the gears are chosen such as to render very large gear ratios with very few gears To do this suppose the teeth are chosen such that NF N2 1 and NL N3 1 In that case Eq 922 reduces to ωA ωL NF 1 NL NF NL 923 For example with NL 50 teeth and NF 45 teeth the gear ratio will be 440 which is huge the negative number of the answer only indicates a direction change between the input and output of the gear train The problem is that although theoretically we can pick the gears such that NF N2 1 and NL N3 1 in practice this will not work because a pair of internalexternal gears engaged with each other and having this many teeth will not rotate relative to each other To overcome this problem the planet in the Harmonic Drive is a flexible metal band with teeth called a flexspline that rolls over a cam wave generator As the wave generator rotates it changes the shape of the flexspline planet such that it remains in contact with the internal gear at two opposing points only while the remaining teeth are disengaged Figures 941 and 942 For more information refer to other references 2729 Cam wave generator Flexspline Last gear Rollers Figure 941 Schematic of the strain wave gearing train Wave generator Flexspline Circular spline Figure 942 A Harmonic Drive strain wave gear Source Reproduced with permission from Harmonic Drive LLC Harmonic Drive is a trademark of Harmonic Drive LLC Introduction to Robotics 366 The nutating gear train concept is somewhat similar Gears that are very close in size wobble relative to each other at their edges 30 As a result after each revolution one gear falls slightly behind the other thus creat ing a large gear ratio The equation governing the system is the same as Eq 922 A simple rendition of the nutating gears is shown in Figure 943 912 Other Systems Many other novel systems can be used in robotic actuation and there will be yet others available in the future For example although not used in any industrial robots there is available a spherical actuator made up of 80 magnets attached to the inside of a hollow sphere The sphere is placed inside a cone made up of 16 circular electromagnets By controlling which magnets are turned on in relation to the permanent magnets on the sphere it can be forced to rotate in any direction 31 Piezoelectrically generated traveling waves can drive a harmonic drive 32 or a planetary speed reducer may use balls instead of gears 33 Look around for other innovations 913 Design Projects In the following section you will find a few suggestions for possible projects These are presented only as a starting point Obviously countless other possibilities exist Be creative and think of other projects as well 9131 Design Project 1 Considering the advantages disadvantages capabilities and limitations of each type of actuator and depend ing on what may be available to you design actuators for your robot Whatever system you pick you will have to consider what components are needed how you can later run and control the actuators their cost weight robustness and availability You must also consider how you will connect the actuators to the joints and links the gear ratios needed and so on Additionally make sure that the actuator you pick can deliver the desired torque or force You must also design and program a controller for controlling the actuators Stepper motors can be easily programmed and controlled by a simple microprocessor with or without driver chips or commercial stepper drivers or with a pulsegenerating circuit and a driver chip Depending on the capability of your driver or controller you may be able to control the speed of your stepper motors as well as their displacements For servomotors you will need a servo controller Commercial servo controllers are expensive However with an appreciable amount of effort one may design and build a servo controller Note that it is relatively easy to make a controller for controlling the position in a servomotor This can be done with a simple feedback device like a potentiometer or an encoder However the design of a servo controller becomes much more complicated if you decide to control the velocity of the robot as well which is why a servomotor would be used Inexpensive simple geared servomotors available commercially that are designed for use with remote control airplanes are a good choice for inexpensive robots or for other actuation These servomotors rotate a specific angle depending on the length of the signal they receive Therefore a simple command signal from your microprocessor can be used to easily control the servomotor Speed control is usually possible too How ever the accuracy and the power of these motors are limited Figure 943 Nutating gears train Actuators and Drive Systems 367 At much higher cost but with much better characteristics robot actuator units such as Figure 944 may also be used if enough funds are available for your project You must also pick an appropriate microprocessor that has enough computing power to calculate the kin ematic equations but also has enough input and output ports for adequate communication with the motors Integrating the robot manipulator with the actuators and the microprocessor will complete your robot When you have completed the programming you will have a functioning robot In the next chapter we learn more about sensors at which time you may integrate desired sensory information into the robot as well 9132 Design Project 2 This project involves the design and manufacturing of a rollingcylinder or sphere robot rover The rolling cylinder robot is meant to consist of two colinear hollow cylinders that can rotate independently and there fore navigate Its power source electronic drive circuitry actuators and sensors are all supposed to be inside the two cylinders As a result from outside the rover should look like a cylinder Figure 945 shows a sample Figure 944 Commercial actuators are available for more sophisticated and advanced projects Source Reproduced with permission of Maxon Precision Motors Inc Motors Platform and electronics Batteries Figure 945 A schematic depiction of a possible arrangement for the cylinder rover Sample made by Nick Supat at Cal Poly Introduction to Robotics 368 cylinder robot with its external cylinders removed You should be able to program the rover to follow a pre determined path or using its sensors navigate through hallways a maze or similar environments Figure 945 also shows the arrangement of the cylinders As shown if the two cylinders rotate relative to each other the rover rotates about a vertical axis If they rotate together in the same direction the rover moves forward The sample robot shows how the circuitry and the drive motors may be mounted on a platform and assembled inside the cylinders Stepper motors or servomotors may be used for actuation each with its own advantages and disadvantages The motors mounted on a platform may be attached to the cylinders by shafts or by rotating friction wheels The center of gravity of the assembly consisting of the platform the motors the power source and the circuitry must be below the centerline of the rotating cylinders bottom heavy This creates a downward gravitational force that keeps the platform from rotating As a result as the motors rotate the cylinders the whole assembly moves You must realize that this is similar to a pendulum attached to a rolling wheel If you write the equations of motion you will see that the system oscillates every time the tor que on the system changes As a result you should expect to have rolling cylinders that oscillate every time they start stop or rotate However increasing the mass of the platform as well as increasing the distance of the center of mass of the platform from the center of the cylinders reduces the frequency of the oscillations Note that since a stepper motors rotation involves stopandgo steps it increases the oscillations of the plat form Therefore a servomotor may be a better choice After you have built a prototype rover you may add damping to the system create additional points of support between the platform and the cylinders or improve your drive programs by controlling accelerations and decelerations to reduce or eliminate the oscillations The motors the sensors as will be discussed in Chapter 10 and the added intelligence can all be controlled by a microprocessor or other control circuitry This design project is intentionally left openended in order to allow you to be as creative as you wish As an example you may use light sensors to start and stop the rover and to navigate it the light can be projected onto a sensor between the two cylinders Alternately you may use a microprocessor that responds to sensed information to do the same or use a wireless communica tion link To complete the design project first choose the cylinders platform size motors control system and sen sors you want to incorporate in the design You must make sure the arrangement of the subsystems will render a bottomheavy system Consider how the motors will be attached to the cylinders After the design details are completed you may proceed with the manufacturing of the design testing and modifying until all problems are solved When the rover is completed you may proceed with programming it to do more sophis ticated navigation and sensory information processing The sphere robot is similar to the cylinder robot except that the outside shell is a sphere that houses the drive unit The drive unit moves inside the sphere forcing the sphere to move forward You may use a cyl inder robot to do this It may appear that as the robot rotates sideways inside the sphere it should force the sphere to turn sideways too However since the sphere already has a forward velocity turning the cylinder robot sideways inside the sphere pushes it up and interferes with the motion Instead design and build a simple gyroscopic steering mechanism In this case one motor turns both wheels together or even three wheels moving the sphere forward but the rotation of the sphere results from a gyroscope To do this imag ine that you attach a flywheel to a motor that constantly rotates about the xaxis Install the flywheel and the motor in gimbals that can rotate about the yaxis on the platform When the flywheel is rotated about this axis it turns the assembly about the zaxis forcing the sphere to change direction Therefore you can control the motions of the sphere by a microprocessor that sends signals to the motors running the wheels and the gyro Figure 946 shows one rendition of this idea 9133 Design Project 3 Design and build a crawling robot with Biometal alloy as its actuators One way to do this is to build a series of links attached in series that act as the crawlers body Attach pieces of Biometal between the links eg as shown in Figure 947 By sending signals from your microprocessor to these simple actuators and Actuators and Drive Systems 369 contracting them sequentially you can create a slithering motion Just remember that you might need to create a onedirectional frictional force in the forward direction at the underbelly of the crawler to force the slithering motion forward The simplicity of Biometal muscle wires is a good choice for this project although other means may also be used You may also design and build other insect robots animal robots and walking machines Use your imag ination to come up with an interesting and unique robot 914 Summary In this chapter a variety of different actuating systems were presented Each system has its advantages and disadvantages that make it useful for particular applications In addition to their application in actuating robots they can also be used in other devices used with robotic systems Although hydraulic systems are no longer common for industrial robots they are still used for heavy pay load robots and for devices that require a high powertoweight ratio Most industrial robots are actuated by servomotors Stepper motors are very common in many other peripheral devices and in small robots Other novel actuators can also be used for specific purposes in robotics The design engineer must consider the best application for each actuator based on the design specifications In the next chapter we discuss a variety of sensors that are used in conjunction with robots and robotic applications Figure 946 A sphere robot Source Cal Poly Robotics Club Biometal actuators Springs Figure 947 A possible design for a crawling robot Designed by Bryan Terry at Cal Poly Introduction to Robotics 370 References 1 Servopneumatic positioning system Festo AG Co 2000 2 Step motors and servomotors control catalog Parker Hannifin 3 Hage Edward Size Indeed Matters Power Transmission Engineering February 2009 pp 3437 4 Mazurkiewicz John From Dead Stop to 2000 rpm in One Millisecond Motion Control SepOct 1990 pp 4144 5 Cowern Edward Baldor Motors Basics series of articles Power Transmission Engineering December 2016 to April 2018 6 McCormik Malcolm A Primer on Brushless DC Motors Mechanical Engineering Feb 1988 pp 5257 7 Jones Dan Step vs Servo Selecting the Best Power Transmission Engineering October 2018 pp 3236 8 Labriola Don Integrated Hybrid Servo Motors vs Standard Integrated Servo Motors How Do They Stack Up Power Transmission Engineering December 2018 pp 7073 9 Technical Information on Stepping Motors Oriental Motors USA Corporation 10 Application of Integrated Circuits to Stepping Motors Oriental Motor USA Corporation 11 Shetty Devdas R Kolk Mechatronics System Design PWS Publishing MA 1997 12 Lyshevski Sergey Mechatronics and Control of Electromechanical Systems CRC Press 2017 13 Stiffler Kent A Design with Microprocessors for Mechanical Engineers McGraw Hill NY 1992 14 Mechatronics 98 proceedings of the 6th UK Mechatronics Forum International Conference Skovde Sweden J Adolfsson J Karlsen editors Pergamon Press Amsterdam 1998 15 Bolton W Mechatronics Electronic Control Systems in Mechanical and Electrical Engineering 6th edition Pearson Education UK 2015 16 Lewin C Intelligent Motor Control ICs Simplify System Design Motion Control Technology Tech Briefs December 2009 pp 5354 17 Ashley S Magnetostrictive Actuators Mechanical Engineering June 1998 pp 6870 18 PushPull Magnetostrictive Linear Actuators NASA Tech Briefs August 1999 pp 4748 19 Tiny Steps for a Big Job NASA Motion Control Tech Briefs August 1999 pp 1b4b 20 MEMSBased PiezoelectricElectrostatic Inchworm Actuator NASA Motion Control Tech Briefs June 2003 p 68 21 Flexible Piezoelectric Actuators NASA Tech Briefs July 2002 p 27 22 Magnetostrictive Motor and Circuits for Robotic Applications NASA Motion Control Tech Briefs August 2002 p 62 23 Toki America Technologies Biometal Reference 24 Ashley Steven Artificial Muscles Scientific American October 2003 pp 5359 25 ElectroactivePolymer Actuators with Selectable Deformations NASA Tech Briefs July 2002 p32 26 Erdman Arthur GN Sandor Mechanism Design Analysis and Synthesis PrenticeHall New Jersey 1984 27 Hollow Shaft Actuators with Harmonic Drive Gearing NASA Motion Control Tech Briefs December 1998 pp 10b14b 28 Orbidrive catalog Compudrive Corporation 29 Planetary Speed Reducer with Balls Instead of Gears NASA Tech Briefs October 1997 p 15b 30 Kedrowski D Scott Slimak Nutating Gear Drivetrain for a Cordless Screwdriver Mechanical Engineering January 1994 pp 7074 31 Stein David Gregory S Chirikjian Experiments in the Commutation and Motion Planning of a Spherical Stepper Motor Proceedings of DETC00 ASME 2000 Design Engineering Technical Conferences and Computers and Information in Engineering Conference Baltimore Maryland September 2000 pp 17 32 Travelling Wave Rotary Actuators Piezoelectrically Generated Travelling Waves Drive Harmonic Gears NASA Tech Briefs October 1997 p 10b 33 Planetary Speed Reducer with Balls Instead of Gears NASA Tech Briefs October 1997 p 15b Actuators and Drive Systems 371 Problems 91 A motor with rotor inertia of 0035 kgm2 and maximum torque of 15 Nm is connected to a uniformly dis tributed arm with a concentrated mass at its end as shown in Figure P91 Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the total inertia felt by the motor and the max imum angular acceleration it can develop if the gear ratio is a 10 b 50 c 100 Compare the results 92 Repeat Problem 1 but assume that the two gears have 0003 kgm2 and 0005 kgm2 inertias respectively 93 A motor with rotor inertia of 005 kgm2 is connected to a load with a moment of inertia of 15 kgm2 through a pair of gears with a ratio of N Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the torque that is needed to accelerate the arm at the rate of θ 500rads2 for a N 1 b N 10 c N 100 94 The threeaxis robot shown in Figure P94 is powered by geared servomotors attached to the joints by worm gears Each link is 22 cm long made of hollow aluminum bars each weighing 05 kg The center of mass of the second motor is 20 cm from the center of rotation The gear ratio is 13 in the servomotor and 15 in the worm gear set The worstcase scenario for the elbow joint is when the arm is fully extended as shown Calculate the torque needed to accelerate both arms together fully extended at a rate of 90 rads2 Assume the inertias of the worm gears are negligible Tm Tl N x y z 05 m m 3 kg m 3 kg Im Figure P91 Worm gear Motors I1 001 kgm2 m3 05 kg m2 05 kg m4 05 kg N 3 N 5 Figure P94 Introduction to Robotics 372 95 Repeat Problem 3 but suppose the maximum torque this motor can provide is 09 Nm Therefore a new motor must be picked Two other motors are available one with inertia of 0009 kgm2 and torque of 085 Nm one with inertia of 0012 kgm2 and torque of 1 Nm Which one would you use 96 Estimate how much the torqueinertia ratio of a disk motor might be if it can go from zero to 2000 rpm in one millisecond and compare it to the motor in Problem 1 97 Using a timer circuit design a pulsegenerating circuit that delivers a range of 100400 pulses per second to a stepper motor driver 98 Calculate the gear ratio for a planetary gear system if a NL 90 NF 80 N2 50 N3 50 b NL 90 NF 80 N2 40 N3 40 c NL 90 NF 80 N2 40 N3 50 99 Calculate the gear ratio for a Harmonic Drive if NL 100 NF 95 N2 90 N3 95 910 Calculate the gear ratio for a Harmonic Drive if NL 100 NF 95 N2 94 N3 99 911 Write a program to generate a variable pulse stream to drive a motor with pulsewidthmodulated voltages of 1 2 3 4 and 5 volts for a 5 volt input 912 Write a program to generate a sinusoidal pulsewidthmodulated output for a constant input voltage 913 If you have access to a microprocessor and electronic components such as transistors make an H bridge and write a control program to drive a motor in either direction or to brake it Be mindful of the problems associated with an Hbridges transistors turning on and off at inappropriate times Actuators and Drive Systems 373 29 10 Sensors 101 Introduction In robotics sensors are used for both internal feedback control and external interaction with the outside world Humans and animals have similar sensors For example when you wake up even before you open your eyes you know where your extremities are you do not have to look to know that your arm is beside you or that your leg is bent This is because neurons in the muscles send signals to the brain and as they are stretched or relaxed with the contracting stretching or relaxing muscles the signal changes and the brain determines the state of each muscle Similarly in a robot as the links and joints move sensors such as poten tiometers encoders and resolvers send signals to the controller allowing it to determine where each joint is located Additionally similar to humans and animals with senses of smell touch taste hearing vision and speech to communicate with the outside world robots may possess sensors that allow them to do the same Some sensors such as vision touch and smell are similar in function to that of humans Others such as a radioactive sensor may be something humans lack There is a huge array of sensors available for measuring almost any phenomenon 1 However in this chapter we only discuss sensors used in robotics and automatic manufacturing 102 Sensor Characteristics To choose an appropriate sensor for a particular need we have to consider a number of different character istics These characteristics determine the performance cost ease of application and utility of the sensor In certain situations different types of sensors may be available for the same purpose Therefore we may con sider the following before a sensor is chosen Cost The cost of a sensor is an important consideration especially when many sensors are needed for one machine However the cost must be balanced with other requirements of the design such as reliability importance of the data they provide accuracy repeatability life and so on Size Depending on the application of the sensor the size may be of primary importance For example the jointdisplacement sensors have to be adapted into the design of the joints and move with the robots body elements The available space around the joint may be limited Additionally a large sen sor may limit the joints range Weight Since robots are dynamic machines the weight of a sensor is very important A heavy sensor adds to the inertia of the arm and reduces its overall payload eg a heavy camera mounted on a robotic insect airplane severely limits its flying capabilities Type of output digital or analog The output of a sensor may be digital or analog and depending on the application this output may be used directly or it may have to be converted For example the output of a potentiometer is analog whereas that of an encoder is digital If an encoder is used in 375 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed conjunction with a microprocessor the output may be directly routed to the input port of the proc essor while the output of a potentiometer has to be converted to a digital signal with an analogto digital converter ADC The appropriateness of the type of output must be balanced with other requirements Interfacing Sensors must be interfaced with other devices such as microprocessors and controllers The interfacing between the sensor and the device can become an important issue if they do not match or if other addon components and circuits such as resistors transistor switches or a power source are needed The length of wires involved is also an important consideration Resolution Resolution is the minimum step size within the range of measurement of the sensor In a wirewound potentiometer it is equal to the resistance of one turn of the wire In a digital device with n bits the resolution is Resolution Full Range 2n 101 As an example an absolute encoder with four bits can report positions up to 24 16 different levels Therefore its resolution is 36016 22 5 Sensitivity Sensitivity is the ratio of a change in output in response to a change in input Highly sen sitive sensors will show larger fluctuations in output as a result of fluctuations in input includ ing noise Linearity Linearity represents the relationship between input variations and output variations This means that in a sensor with linear output the same change in input at any level within the range will produce a similar change in output Almost all devices in nature are somewhat nonlinear with vary ing degrees of nonlinearity Some devices may be assumed to be linear within a certain range of their operation Others may be linearized through assumptions A known nonlinearity in a system may be overcome by proper modeling equations or additional electronics For example suppose a displace ment sensor has an output that varies as a secondorder equation Using the square root of the signal either through programming or by a simple electronic circuit will yield a linear output proportional to the displacement Therefore the output will be as if the sensor were linear Range Range is the difference between the smallest and the largest outputs the sensor can produce or the difference between the smallest and largest inputs with which it can operate properly Response time Response time is the time that a sensors output requires to reach a certain percentage of the total change It is usually expressed in percentage of total change such as 95 It is also defined as the time required to observe the change in output as a result of a change in input For example the response time of a simple mercury thermometer is long whereas a digital thermometers response time which measures temperature based on radiated heat is short A special response time of 632 is called the time constant τ Similarly rise time is the time required between 10 and 90 of the final value Settling time is the time between 0 and 98 rise Frequency response Suppose you attach a very highquality radio tuner to a small cheap speaker Although the speaker reproduces the sound its quality is very low whereas a highquality speaker system with a woofer and tweeter can reproduce the same signal with much better quality This is because the frequency response of the twospeaker system is very different from the single cheap speaker The natural frequency of a small speaker is high and therefore it can only reproduce high frequency sounds On the other hand a speaker system with at least two speakers runs the signal into both the highfrequency tweeter and the lowfrequency woofer The summation of the two frequency responses allows the speaker system to reproduce the sound signal with much better quality in real ity the signals are filtered for each speaker All systems can resonate at around their natural fre quency with little effort As the input frequency deviates from the natural frequency value the response falls off The frequency response is the range in which the systems ability to resonate respond to the input remains relatively high The larger the range of the frequency response Introduction to Robotics 376 the better the ability of the system to respond to varying input Otherwise the quickly changing var iations in the phenomenon may not be measured by the sensor Therefore it is important to consider the frequency response of a sensor and determine whether or not the sensors response is fast enough under all operating conditions we will discuss this in more detail in Chapter 11 Reliability Reliability is the ratio of how many times a system operates properly divided by how many times it is used For continuous and satisfactory operation it is necessary to choose reliable sensors that last a long time while considering the cost and other requirements Accuracy Accuracy is defined as how close the output of the sensor is to the expected value For example a thermometer should read 100 C when placed in pure boiling water at sea level Repeatability The output of a sensor to a series of similar input values may vary Repeatability is defined as the radius of a circle that encompasses all output values if a sufficient number of measure ments are made In general repeatability is more important than accuracy We can generally measure or predict systematic inaccuracies in the response and compensate for the error However repeat ability is generally random and cannot be easily compensated Figure 101 The following is a review of some sensors used in robotics mechatronics and automation 103 Sensor Utilization Figure 102a shows a basic sensor circuit with a voltage source As the sensor turns on and off due to the backemf principle the wires act as inductors and consequently a voltage spike is generated in the wires that can create false readouts To prevent this it is advisable to add a monolithictype capacitor to the circuit as shown in Figure 102b The capacitor should be placed as close to the sensor as possible Similarly if long wires longer than a few inches are used to connect a sensor to a voltage source or to where the signal is read the wires can act as antennae and interfere with the signal The solution is to use shielded or coaxial wires or to twist the wires together Accurate and repeatable Inaccurate but repeatable Inaccurate and not repeatable Target Figure 101 Accuracy versus repeatability Device Output signal V V Device Output signal a b Figure 102 a Basic sensor circuit b application of a capacitor added to prevent voltage spikes in reading sensors Sensors 377 By the way this is true in other cases too For example long wires that connect a motor to a voltage source can also act as antennae and therefore it is better to twist the wires together Similarly voltage spikes can create problems with integrated circuit chips Therefore it is advisable to place a capacitor between the voltagein and ground pins of an IC chip as close to it as possible for example next to or under the chip 104 Position Sensors Position sensors are used to measure displacements both angular and linear as well as movements In many cases such as in encoders the position information may also be used to calculate velocities The following are common position sensors used in robotics 1041 Potentiometers A potentiometer converts position information into a variable voltage through a resistor As the sliding con tact wiper slides on the resistor due to a change in position the proportion of the resistance before or after the point of contact with the wiper compared to the total resistance varies Figure 103 The resistive external load RL is in parallel with R2 and both are in series with R1 Since in this capacity the potentiometer acts as a voltage divider the output will be proportional to the resistance as Vout R2RL R1RL R2RL R1R2 Vcc 102 Assuming that RL is large the quantity R1R2 can be ignored and the equation simplifies to Vout Vcc R2 R1 R2 103 Example 101 Assume that R1 R2 1kΩ Calculate the difference between the values of Vout based on Eqs 102 and 103 if a RL 10kΩ and b RL 100kΩ Solution a Vout 10 10 10 1 Vcc 10 21Vcc 0 476Vcc versus Vout 1 2 Vcc 0 5Vcc b Vout 100 100 100 1 Vcc 100 201Vcc 0 498Vcc versus Vout 1 2 Vcc 0 5Vcc Clearly it is crucial that the resistive load be large enough for acceptable accuracy Vcc R1 R2 Vout RL Figure 103 A potentiometer as a position sensor Introduction to Robotics 378 Potentiometers can be rotary or linear and therefore can measure linear or angular motions Rotary poten tiometers can also be multipleturn enabling the user to measure many revolutions of motion Potentiometers are either wirewound or use a conductive polymer resistor paste a deposit of a thin film of resistive carbon particles in a polymer or ceramic and metal mix called cermet on a phenolic substrate The major benefit of conductive polymers is that their output is continuous and therefore less noisy As a result it is possible to electronically differentiate the output of this type of resistor to find velocity However since the output of a wirewound potentiometer is stepwise it cannot be differentiated Potentiometers are generally used as internal feedback sensors in order to report the position of joints and links Potentiometers are used both alone as well as together with other sensors such as encoders In this case the encoder reports the current position of joints and links whereas the potentiometer reports the startup positions As a result the combination of the sensors allows minimal input requirement with maximum accu racy This will be discussed in more detail later 1042 Encoders An encoder is a simple device with a digital output signal for each small portion of a movement The encoder disk or strip is divided into small sections as in Figure 104 Each section is either opaque or transparent it can also be either reflective or nonreflective A light source such as an LED on one side projects a beam of light onto the other side of the encoder disk or strip where it is seen by a lightsensitive sensor such as a phototransistor If the disks angular position or in the case of a strip the linear position is such that the light is revealed the sensor on the opposite side is turned on and has a high signal If the angular position of the disk is such that the light is occluded the pickup sensor is off and its output is low therefore a digital output As the disk rotates it continuously sends signals If the signals are counted the approximate total displacement of the disk can be measured at any time Incremental Encoders There are two basic types of encoders incremental and absolute Figures 104ab are incremental encoders In this type of encoder the areas arcs of opaque and transparent sections are all equal and repeating Since all arcs are the same size each represents an equal angle of rotation If the disk is divided into only two portions each portion is 180 and its resolution is also 180 Within this arc the system is incapable of reporting any more accurate information about the displacement or position If the number of divisions increases the accu racy increases as well Therefore the resolution of an optical encoder is related to the number of arcs of trans parentopaque areas Typical incremental encoders can have 512 to 1024 arcs reporting angular a b c Figure 104 a A simple rotary incremental encoder disk mounted on a motor shaft This encoder measures angular rotations b A rotary encoder disk with its light source and pickup sensor c A reflectivetype linear absolute encoder that can measure linear movements and a rotary incremental encoder disk with 1024 slots Sensors 379 displacements with a resolution of 07035 Highresolution encoders with thousands of pulses per revo lution PPR are also available and constantly improving Optical encoders either have an opaque disk with the material removed for transparent areas or are clear material like glass with printed opaque areas Many encoder disks are also etched such that they either reflect the light or do not reflect the light In that case the light source and the pickup sensor are both on the same side of the disk An incremental encoder is like an integrator It only reports changes to angular position it reports the change in location which is the displacement However it cannot report or directly indicate the actual value of the position In other words an incremental encoder can only tell how much movement is made But unless the initial location is known the actual position cannot be discerned from the sensor An incremental encoder acts as an integrator because the controller actually counts the number of signals the encoder sends determining the total positional change and consequently integrating the position signal Unless the con troller knows the startup position it can never determine where the robot is In all systems that track posi tions with incremental encoders it is necessary to reset the system at the beginning of operations or at wake up or to measure the startup position with other sensors in some Adept robots a 16bit encoder is used together with a Halleffect sensor to provide 20 μm accuracy The controller subsequently integrates the data received from the incremental encoder to track the actual position at all times Most photodetectors are analog devices This means that as the magnitude of the light varies their output varies too Therefore as one section on the encoder disk approaches the detector and the projected light intensity increases to a maximum the output of the detector rises before falling again as it departs Conse quently a squaring circuit is used to condition the signal Figure 105 shows the output of an incremental encoder If only one set of slots is used it is impossible to determine whether the disk is rotating clockwise or counterclockwise To remedy this encoder disks have two sets of slots two channels a half step out of phase with each other Figure 104a As a result the output signals of the two sets of slots are also a half step out of phase with each other The controller can compare the two signals and determine which one changes from high to low or vice versa before the other signal Through this comparison it is possible to determine the direction of rotation of the disk By counting both the leading edges as well as the trailing edges of the output signals of the encoders on both channels we may increase resolution of the output of incremental encoders without increasing the number of slots Channel A Channel B Output of leading edges for one channel only Output of leading and trailing edges for one channel only Output of leading and trailing edges for two channels High Low Figure 105 Output signals of an incremental encoder Introduction to Robotics 380 Note that it is crucial to set up your system to look for changes in the signal not whether the signal is high or low If your circuit keeps counting when the signal is high it may register a significantly high false count especially if your system is fast compared to the rotational speed of the shaft Only counting when there is a change high to low or low to high ensures that a correct number of signals are registered and counted Absolute Encoders An alternative to incremental optical encoders is an absolute encoder Each portion of the encoder disks angular displacement has a unique combination of clearopaque sections that give it a unique signature Through this it is possible to determine the exact position of the disk at any time without the need for a starting position In other words even at start time the controller can determine the position of the disk by the unique signature of the disk at that location Similar to Figure 106 there is a multiple row of sections each one different from the others The first row may have only one clear and one opaque section one on one off The next row has 4 or 22 followed by 8 or 23 and so on Each row must have its own light source and light detector assembly Each sensor assembly sends out one signal Therefore two rows require two inputs to the controller two bits three rows require three bits and so on As shown in Figure 106 an encoder with 4 rows can have 24 16 distinct combinations each section covering an angle of 22 5 This means that within this section of 22 5 the controller cannot deter mine where the encoder is Therefore the resolution is only 22 5 To increase the resolution there would have to be more sections or bits An encoder with 1024 divisions on one row has 10 1024 210 bits of information that must be communicated to the controller With 10bit resolution a robot with 6 joints would require 60 input lines to the controller Consequently it is necessary to consider the advantages and disadvantages of incremental and absolute encoders Commercial encoders with higher bit counts are available Figure 106 also shows the difference between a binary code and a gray code In the binary code system there are many instances where more than one set of bits change sign simultaneously whereas in gray code at any particular location there is always only one bitchange to go back or forth The importance of this dif ference is that in digital measurements unlike popular perception the values of signals are not constantly read but the signal is measured sampled and held until the next sample reading In binary code where multiple bits change simultaneously if all changes do not happen exactly at the same time they may not all register In gray code since there is only one change the system will always find it Table 101 lists the gray code for numbers 011 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 45 45 45 45 45 45 45 45 90 90 90 90 180 180 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 45 45 45 45 45 45 45 45 90 90 90 90 180 180 Binary Code Gray Code Figure 106 Each portion of the absolute encoder disk has a unique signature Through this signature the angular position of the encoder can be determined Sensors 381 1043 Linear Variable Differential Transformer LVDT A linear variable differential transformer or transducer is actually a transformer with a moving coil through which a distance is measured it outputs a variable analog voltage as a result of this displacement In general a transformer is an electrictoelectric energy converter that changes the voltagecurrent ratio Except for losses the total input energy to the device is the same as the total output energy When a transformer increases or decreases a voltage in proportion to the number of turns in its coils the corresponding current changes inversely with it This occurs because there is a primary and a secondary coil with different number of turns The electrical energy into the primary coil creates a flux that induces a voltage in the secondary coil proportional to the ratio of the number of turns in the windings As the number of turns in the secondary coil increases the voltage increases proportionally consequently the current decreases proportionally The induction of voltage in the secondary is a function of the strength of the flux If no iron core is present the flux lines can disperse reducing the strength of the magnetic field As a result the induction of voltage in the secondary is minimal Due to the much larger permeability of iron compared to air in the presence of an iron core the flux lines are gathered inward increasing the density of the field and consequently the induced voltage This is used to create the variable output voltage in the LVDT proportional to the level at which the iron core is within the windings as in Figure 107 If the total number of turns in the primary and the secondary are the same the voltages are proportional to the strength of the flux itself a function of the position of the core In LVDTs the secondary coil consists of two parts wound in opposite directions Con sequently as the core moves in each direction away from the center position the direction of the output voltage changes as well The output of an LVDT is almost linear and proportional to the input position of the core Table 101 Binary and gray codes Gray code Binary code Gray code Binary code 0 0000 0000 6 0101 0110 1 0001 0001 7 0100 0111 2 0011 0010 8 1100 1000 3 0010 0011 9 1101 1001 4 0110 0100 10 1111 1010 5 0111 0101 11 1110 1011 Vout Displacement Vin Voltage out Position AC Primary coil Secondary coils Figure 107 Linear variable differential transformer Introduction to Robotics 382 Assuming that the input voltage is Vin A sin ωt the output voltage created by each half of the secondary coil is V1 k1 sin ωtϕ and V2 k2 sin ωtϕ Vout k1k2 sin ωtϕ When k2 is larger than k1 the direction of output voltage changes 1044 Resolvers Resolvers are very similar to LVDTs in principle but are used to measure an angular motion A resolver is also a transformer where the primary coil is connected to the rotating shaft and carries an alternating current either through slip rings or from a brushless transformer within it Figure 108 There are two secondary coils placed 90 apart from each other As the rotor rotates the flux it develops rotates with it When the primary coil in the rotor is parallel to either of the two secondary coils the voltage induced in that coil is maximum while the voltage induced in the other secondary coil perpendicular to it is zero As the rotor rotates eventually the voltage in the first secondary coil goes to zero while the second coil develops its max imum voltage For all other angles in between the two secondary coils develop a voltage proportional to the sine and cosine of the angle between the primary and the two secondary coils Although the output of a resolver is analog it is equal to the sine and cosine of the angle eliminating the necessity to calculate these values later Resolvers are reliable robust and accurate 1045 Linear Magnetostrictive Displacement Transducer LMDT or MDT In this sensor a pulse is sent through a conductor which bounces back as it reaches a magnet The time of travel to the magnet and back is converted to a distance if the speed of travel is known By attaching the moving part to either the magnet or to the conductor the displacement can be measured A simple schematic of the sensor is shown in Figure 109 The IBM 7565 hydraulic gantry robot displacement sensors were of this type as shown in Figure 1010 V1 V2 Voltage out Vin V sinωt V2 K sinωt cosθ V1 K sinωt sinθ θ θ θ Figure 108 Schematic of a resolver Magnet Time Displacement Figure 109 Schematic drawing of a magnetostrictive displacement sensor Sensors 383 1046 Halleffect Sensors A Halleffect sensor works on the Halleffect principle where the output voltage of a conductor carries a current changes when in the presence of a magnetic field Therefore the output voltage of the sensor changes when a permanent magnet or a coil that produces a magnetic flux is close to the sensor A Halleffect trans ducers output is analog and must be converted for digital applications It is used in many applications including the sensing of the position of the permanent magnet rotors of brushless DC motors 1047 Global Positioning System GPS GPS units are generally used in mobile robots and navigation systems to determine the current position of the device relative to a global reference frame GPS is based on a radionavigation system for civilian use freely available to anyone With a GPS receiver we can determine a global position and time that can be used for navigation and mapping The system includes many satellites orbiting the Earth at about 20 000 km a control and monitoring station on Earth and the GPS receivers The receiver uses the transmitted data from the satellites to calculate its position This information can be sent directly to the control system of a mobile robot for positioning purposes and navigation Each satellite sends signals at precise intervals with information about the time the signal was sent and location of the satellite The GPS unit reads the signals sent by four satellites and using the difference between the current time and the time at which each signal was sent which is contained in the message received calculates the distance to the satellite Each distance forms a sphere centered at the satellite on which the GPS unit resides The intersection between these spheres is the location of the GPS unit In theory signals from only three satellites should suffice the GPS unit should be able to determine its location relative to three satellites two spheres intersect at a circle and the circle generally intersects the third sphere at two points the one closer to the Earths surface is the desired location However because the signals move at the speed of light the accuracy of the system is greatly dependent on the accuracy of the GPS units clock The commercially massproduced GPS clocks are not accurate enough to yield precise positioning Therefore the signal from a fourth satellite is also used to increase the accuracy of the system from about 100 meters to about 20 meters Military devices use a more accurate clock and highperformance signals for improved positional accuracy A GPS unit can be integrated into a robotic system for navigation and positioning The position information is fed into the microprocessor which uses it to decide the succeeding actions or motions A 3D rollpitchyaw compass may also be used for global direction and navigation Although this compass is not a GPS system it can provide directional information about the three axes of motion and therefore aid in controlling a robots position and orientation A GPS system can also determine speed of the device by calculating the change in position versus time as well as a time stamp from the signal Magnets Tubes Figure 1010 IBM 7565 magnetostrictive displacement transducers Introduction to Robotics 384 1048 Other Devices Many other devices can be used as position sensors some novel and hightech some simple and old For example in order to measure the angles of finger joints in a glove such as in a virtualreality glove conductive elastomer strips were attached to the glove above the fingers Conductive elastomer is a urethanebased synthetic rubber filled with conductive carbon particles Its electrical resistance decreases as the tension on it increases Therefore as the finger bends within the glove it stretches the strip changing its resistance which can be measured and converted to a position signal 2 In another device onehalf side of a nonconductive shaft is coated with a conducting material Two half cylinder conductive electrodes with radii slightly larger than the shafts are mounted concentrically over the shaft creating a capacitor between the shaft and the stationary electrodes Figure 1011 As the shaft rotates the capacitance changes too Used as a capacitor within a tunneldiode oscillator circuit the output frequency varies as the capacitance varies relative to the shaft position Therefore by measuring the frequency of the oscillation the position of the shaft can be measured 3 An inductive noncontact position sensor developed for measuring defects in space shuttle windows has an accuracy of better than 400 nanometers and a range of 200 microns 4 105 Velocity Sensors The following are the more common velocity sensors used in robotics Their application is very much related to the type of position sensor used Depending on the type of position sensor used there may not even be a need to use a velocity sensor 1051 Encoders If an encoder is used for displacement measurement there is in fact no need to use a velocity sensor Since encoders send a known number of signals for any given angular displacement by counting the number of signals received in a given length of time dt velocity can be calculated A typical number for dt may be 10 ms However if the encoder shaft rotates slowly the number of signals received may be too small for an accurate calculation of velocity On the other hand if the time is increased in order to increase the total number of signals per cycle the rate at which velocity is updated and sent to the controller decreases diminishing the accuracy and effectiveness of the controller In some systems the cycle time dt is varied depending on the angular velocity of the encoder shaft A smaller number is used if it rotates fast increasing the effectiveness of the controller and a larger number is used otherwise to gather enough data 1052 Tachometers A tachometer is in fact a mechanicaltoelectrical energy converter Its output is an analog voltage propor tional to the input angular speed Tachometers are generally inaccurate at very low speeds Shaft Conducting coating Two stationary conductive electrodes Figure 1011 Shaftangle measuring device based on a tunneldiode oscillator and capacitance between a shaft and stationary electrodes Sensors 385 1053 Differentiation of Position Signal If the position signal is clean it is possible and simple to differentiate the position signal and convert it to velocity signal For this it is necessary that the signal be as continuous as possible to prevent large impulses in the velocity signal Therefore it is recommended that a resistor with conductive polymer film be used for position measurement as a wirewound potentiometers output is piecewise and unfit for differentiation Regardless differentiation of a signal is always noisy and should be done very carefully Figure 1012 shows a simple RC circuit with an opamp that can be used for differentiation where the velocity signal is Vout RC dVin dt 104 Similarly the velocity or acceleration signal can be integrated to yield position or velocity signals as Vout 1 RC Vindt 105 106 Acceleration Sensors Accelerometers are very common sensors for measuring accelerations but generally not used with industrial robots Regardless acceleration measurements have been used for highprecision control of linear actuators 5 and for joint feedback control of robots 6 107 Force and Pressure Sensors 1071 Piezoelectric Piezoelectric material compresses with a voltage across it and produces a voltage if compressed This was used in devices such as the phonograph to create a voltage from the variable pressure caused by the grooves in the record Similarly a piece of piezoelectric can be used to measure pressures or forces in robotics The analog output voltage must be conditioned and amplified for use In one application 7 intended for an arti ficial skin for prosthetic devices and robots piezoelectric sensors were embedded in stretchable substrates in the shape of a thumb 6 sensors and a hand 30 sensors to measure the force exerted on the skin at different locations 1072 ForceSensing Resistor The forcesensing resistor FSR is a polymer thickfilm device that exhibits a decreasing resistance with increasing force applied perpendicular to its surface 8 9 10 In one particular model the resistance changes Position signal Velocity signal Position signal Velocity signal R C C R Figure 1012 Schematics of differentiating and integrating RC circuits with an opamp Introduction to Robotics 386 from about 500 kΩ to about 1 kΩ for forces of 10 to 10 000 gr See Figure 1013 In another application an RFID pressure sensor wirelessly sends signals to its controller based on changes in pressure 11 1073 Strain Gauge A strain gauge can also be used to measure force The output of the strain gauge is a variable resistance proportional to the strain which itself is a function of applied forces Therefore measuring the resistance we can determine the applied force Strain gauges are used to determine the forces at the end effector and the wrist of a robot Strain gauges can also be used for measuring the loads on the joints and links of the robot but this is not very common Figure 1014a is a simple schematic drawing of a strain gauge Strain gauges are used within a Wheatstone bridge as shown in Figure 1014b A balanced Wheatstone bridge would have similar potentials at points A and B When the resistance in any of the four resistors changes there is a current flow between two junctions A and B Consequently it is necessary to first calibrate the bridge for zero flow in the galvanometer By carefully adjusting the resistance of one of the other resistors until the current flow becomes zero the change in the resistance of the strain gauge can be determined from R1 R4 R2 R3 106 Strain gauges are sensitive to changes in temperature To remedy this problem a dummy strain gauge can be used as one of the four resistors in the bridge to compensate for temperature changes V A B R1 R2 R3 R4 G a b Figure 1014 a A strain gauge and b a Wheatstone bridge Figure 1013 A typical forcesensing resistor FSR The resistance of this sensor decreases as the force acting on it increases Sensors 387 1074 Antistatic Foam The antistatic foam used for transporting IC chips is conductive and its resistance changes due to an applied force It can function as a crude and simple yet inexpensive force and touch sensor To use a piece of anti static foam insert a pair of wires into two sides of it and measure the voltage or resistance across it 108 Torque Sensors Torque can be measured by a pair of strategically placed force sensors Suppose that two force sensors are placed on opposite sides of a shaft A torque applied to the shaft generates two opposing forces on the shafts body causing strains in opposite directions The two force sensors can measure the forces which can be converted to a torque To measure torques about different axes three pairs of mutually perpendicular sensors must be used However since forces can also be measured with the same sensors a total of six force sensors can generally report forces and torques about three axes independent of each other as depicted in Figure 1015 Pure forces generate similar signals in a pair while a torque generates pairs of signals with oppo site signs Figure 1016 shows typical industrial forcetorque sensors Fx Mx Fy My Fz Mz Figure 1015 Arrangement of three pairs of strain gauges along the three major axes for force and torque measurements Figure 1016 Typical industrial forcetorque sensors Source Reproduced with permission from ATI Industrial Automation Introduction to Robotics 388 Miniature load sensors designed to be used as fingertips for anthropomorphic robot hands use a spring instrumented with at least six strain gauges The wires are attached to a small interface board at the base of the spring The sensor is attached to an AD converter as close to the sensor as possible The data is trans mitted to the controller by wires routed at the neutral axis of the fingers 12 Figure 1017 shows a schematic depiction of a system in which flexural springs attached to a shaft form a pair of capacitors used as part of a tunneldiode oscillator circuit As the shaft rotates slightly under the load the capacitance of each pair changes causing a change in the oscillation frequency of the circuit By measur ing the frequency of oscillations the torque can be determined 13 109 Microswitches Microswitches although extremely simple are very useful and common in all robotic systems They cut off the electrical current and therefore can be used for safety purposes for determining contact for sending signals based on displacements and many other uses Microswitches are robust simple and inexpensive 1010 Visible Light and Infrared Sensors These sensors react to the intensity of light that is projected onto them by changing their electrical resistance If the intensity of light is zero the resistance is at maximum As the light intensity increases the resistance decreases and consequently the current increases These sensors are inexpensive and very useful They can be used for making optical encoders and other devices as well They are also used in tactile sensors as will be discussed later A phototransistor can also be used as a light sensor where in the presence of a certain intensity of light it turns on otherwise it is off Phototransistors are usually used in conjunction with an LED light source A light sensor array can be used with a moving light source to measure displacements as well This has been used to measure deflections and small movements in robots and other machinery 14 Light sensors are sensitive to the visible light range Infrared sensors are sensitive to the infrared range Since infrared is invisible to human eyes it does not disturb humans For example if a device needs light to measure a large distance for navigation purposes infrared can be used without attracting attention or dis turbing anyone Shaft Housing Flexural springs Figure 1017 The torque can be found by measuring the changes in the frequency of oscillation of a tunnel diode oscillator when the capacitance of the flexural springs changes due to the applied torque Sensors 389 1011 Touch and Tactile Sensors Touch sensors are devices that send a signal when physical contact has been made The simplest form of a touch sensor is a microswitch which either turns on or off as contact is made The microswitch can be set up for different sensitivities and ranges of motion As an example a strategically placed microswitch on a mobile robot can send a signal to the controller if it reaches an obstacle during navigation More sophisticated touch sensors may send additional information For example a force sensor used as a touch sensor may not only send touch information but also report the magnitude of the contact force A tactile sensor is a collection of touch sensors which in addition to determining contact can also provide additional information about the object This additional information may be about the shape size or type of material In most cases a tactile sensor is a collection of many touch sensors arranged in an array or matrix form as shown in Figure 1018 In this design an array of six touch sensors is arranged on each side of a tactile sensor Each touch sensor is made up of a plunger an LED and a light sensor As the tactile sensor closes and each plunger moves in or out it blocks the light from the LED projecting onto the light detector The output of the light sensor is proportional to the displacement of the plunger As you can see these touch sensors are in fact displacement sensors Similarly other types of displacement sensors may be used for this purpose from microswitches to LVDTs pressure sensors magnetic sensors and so on As the tactile sensor comes in contact with an object depending on the shape and size of the object dif ferent touch sensors react differently in a different order This information is used by the controller to deter mine the size and the shape of the object Figure 1019 shows three simple setups one touching a cube one touching a cylinder and one touching an arbitrary object As can be seen each object creates a different unique signature that can be used for detection Attempts have also been made to create somewhat of a continuous skinlike tactile sensor that could func tion similarly to human skin In most cases the design revolves around a matrix of sensors embedded between layers of polymertype material 7 15 16 17 Touch sensor Light sensor LED Plunger Figure 1018 Tactile sensors are generally a collection of simple touch sensors arranged in an array form with a specific order to relay contact and shape information to the controller Figure 1019 A tactile sensor can provide information about the object Introduction to Robotics 390 1012 Proximity Sensors A proximity sensor is used to determine that an object is close to another object before contact is made This noncontact sensing can be useful in many situations from measuring the speed of a rotor to navigat ing a robot There are many different types of proximity sensors such as magnetic eddy current and Hall effect optical ultrasonic inductive and capacitive The following is a short discussion of some of these sensors 10121 Magnetic Proximity Sensors A magnetic sensor activates when it is close to a magnet It can be used in applications such as turning a circuit on and off or for measuring rotational speeds and the number of rotations of a shaft of a motor or a wheel and therefore can be used in calculating positional changes Imagine a mobile robot where the total displacement of the robot is calculated by counting the number of times a particular wheel rotates multi plied by the circumference of the wheel A magnetic proximity sensor can be used to track wheel rotations by mounting a magnet on the wheel or its shaft and the sensor on the chassis Similarly the sensor can be used for other applications including for safety For example many devices have a magnetic proximity sensor that sends a signal to stop the rotating or moving parts when the door is open 10122 Optical Proximity Sensors Optical proximity sensors consist of an emitting light source either internal to the sensor or external to it and a receiver which senses the presence or absence of light The receiver is usually a phototransistor and the emitter is usually an LED The combination of the two creates a light sensor and is used in many applications including optical encoders As a proximity sensor it is set up such that the light emitted by the emitter is not reflected to the receiver unless an object is within range Figure 1020 is a schematic drawing of an optical proximity sensor Unless a reflective object is within the range of the switch the light is not seen by the receiver and therefore there is no signal Figure 1021 shows another variation of an optical proximity sensor In this simple system that can deter mine both proximity as well as shortrange distance and therefore act as a range finder for short distances a beam of light is passed through a prism that refracts the light into its constituent primary colors Depend ing on the distance of the object from the sensor one particular color of light is reflected back to the sen sors photodetector By measuring the energy of the reflected light the distance can be determined and reported Emitter Receiver In range Emitter Receiver Out of range too far Emitter Receiver Out of range too close Figure 1020 Optical proximity sensor Sensors 391 10123 Ultrasonic Proximity Sensors In these sensors an ultrasonic emitter emits frequent bursts of high frequency sound waves There are two modes of operation for ultrasonic sensors opposed mode and echo diffused mode In opposed mode a receiver is placed in front of the emitter whereas in echo mode the receiver is either next to or integrated into the emitter and receives the reflected sound wave If the receiver is within range or if the sound is reflected by a surface close to the sensor it is sensed and a signal is produced Otherwise the receiver does not sense the wave and there is no signal All ultrasonic sensors have a blind zone near the surface of the emitter in which the distance and presence of an object cannot be detected Ultrasonic sensors cannot be used with surfaces such as rubber and foam that do not reflect the sound waves in echo mode Refer to Section 10131 for more information about ultrasonic sensors Figure 1022 is a schematic drawing of this type of sensor 10124 Inductive Proximity Sensors Inductive sensors are used to detect metal surfaces The sensor is a coil with a ferrite core an oscillatordetec tor and a solid state switch In the presence of a metal object in the close vicinity of the sensor the amplitude of the oscillation diminishes The detector senses the change and turns off the solid state switch When the part leaves the range of the sensor it turns on again Emitter Prism Photodetector Figure 1021 An alternative optical proximity sensor Emitter Receiver Emitter Receiver Echo Mode Object Opposed Mode Figure 1022 Ultrasonic proximity sensors Introduction to Robotics 392 10125 Capacitive Proximity Sensors The capacitive sensor reacts to the presence of any object that has a dielectric constant more than 12 In that case when within range the materials capacitance raises the total capacitance of the circuit This triggers an internal oscillator to turn on the output unit which will send out an output signal Consequently the sensor can detect the presence of an object within a range Capacitive sensors can detect nonmetal materials such as wood liquids and chemicals 10126 Eddy Current Proximity Sensors As we discussed in Chapter 9 when a conductor is placed within a changing magnetic field an elec tromotive force emf is induced in it that causes a current to flow in the material This current is called eddy current An eddy current sensor typically has two coils where one coil generates a changing mag netic flux as reference In the close proximity of conducting materials an eddy current is induced in the material which in turn creates a magnetic flux opposite to that of the first coil effectively reducing the total flux The change in the total flux is proportional to the proximity of the conducting material and is measured by the second coil Eddy current sensors are used to detect the presence of conductive materials as well as the nondestructive testing of voids and cracks thickness of materials and so on 1013 Range Finders Unlike proximity sensors range finders are used to find larger distances to detect obstacles and to map the surfaces of objects Range finders are meant to provide advance information to the system Range finders are generally based on light visible light infrared light or laser and ultrasonics Two common methods of meas urement are triangulation and timeofflight or lapsed time Triangulation involves illuminating the object by a single beam of light that forms a spot on the object The spot is seen by a receiver such as a camera or photodetector The range or depth is calculated from the tri angle formed between the receiver the light source and the spot on the object as shown in Figure 1023 As is evident from Figure 1023a the particular arrangement between the object the light source and the receiver only occurs at one instant At this point the distance d can be calculated by tanβ d l1 tanα d l2 and L l1 l2 a b Rotating emitter Receiver l1 l2 L d α l1 Rotating emitter Receiver l2 L β Figure 1023 Triangulation method for range measurement The receiver will only detect the spot on the object when the emitter is at a particular angle which is used to calculate the range Sensors 393 Substituting and manipulating the equations yields d L tanα tanβ tanα tanβ 107 Since L and β are known if α is measured d can be calculated Except for this instant as shown in Figure 1023b the receiver does not see the reflected light Consequently it is necessary to rotate the emitter and as soon as the reflected light is observed by the receiver record the angle of the emitter and use it to calculate range In practice the emitters light such as laser is rotated continuously by a rotating mirror and the receiver is checked for signal As soon as the light is observed the angle of the mirror is recorded Time of flight or lapsed time ranging consists of sending a signal from a transmitter that bounces back from an object and is received by a receiver The distance between the object and the sensor is half the distance traveled by the signal which can be calculated by measuring the time of flight of the signal and by knowing its speed of travel This time measurement must be very fast to be accurate For small distance measurements the wavelength of the signal must be very small 10131 Ultrasonic Range Finders Ultrasonic systems are rugged simple inexpensive and low powered They are readily used in cameras for focusing in alarm systems for motion detection in helping the visually impaired by mapping what is in front of them on a tactile navigation device or by vocalizing a printed newspaper 18 and in robots for navigation and range measurement Their disadvantage is in their limited resolution which is due to the wavelength of the sound and natural variations of temperature and velocity in the medium and in their maximum range which is limited by the absorption of the ultrasound energy in the medium Typical ultrasonic devices have a frequency range of 20 kHz to above 2 MHz Most ultrasonic devices measure the distance using the timeofflight technique in which a transducer emits a pulse of high frequency ultrasound that is reflected back when it encounters a separation in the medium and a receiver that receives the reflected signal The distance between the transducer and the object is half the distance traveled which is equal to the time of flight multiplied by the speed of sound Of course the accuracy of the measurement depends on the wavelength of the signal and the accuracy of the time meas urement and the speed of sound The speed of sound in a medium is dependent on the frequency of the wave at above 2 MHz level and the density and temperature of the medium To increase the accuracy of the meas urement a calibration bar is usually placed about an inch in front of the transducer which is supposed to calibrate the system for varying temperatures This is only good if the temperature is uniform throughout the traveled distance which may or may not be true Time measurement accuracy is also very important for accurately measuring distance Usually the worst case error in time measurement is 12 wavelength if the clock is stopped as soon as the receiver receives the returned signal at a minimum threshold Therefore higherfrequency ultrasound devices yield better accu racy For example for 20 kHz and 200 kHz systems the wavelengths will respectively be about 067 and 0067 inches 17 and 17 mm yielding a minimum worstcase accuracy of 034 and 0034 inches 85 and 085 mm Crosscorrelation phasecomparison frequencymodulation and signalintegration methods have been used to increase the resolution and accuracy of ultrasonic devices However although higher frequencies yield a better resolution they attenuate much faster than the lowerfrequency signals which severely limits their range On the other hand the lowerfrequency transducers have wide beam angles and a severely dete riorated lateral resolution Consequently there is a tradeoff between the lateral resolution and signal atten uation in relation with the beam frequency Background noise is another problem with ultrasonic sensors Many different industrial and manufacturing operations and techniques produce sound waves that contain ultrasonics as high as 100 kHz which can inter fere with the ultrasonic device operation As a result it is recommended that frequencies above 100 kHz be utilized in industrial environments Introduction to Robotics 394 Ultrasonics can be used for distance measurement mapping and flaw detection A singlepoint distance measurement is called spot checking versus range array acquisition for multiple datapoint acquisition tech niques used for 3D mapping In this case a large number of distances to different locations on an object are measured The collection of distance data provides a 3D map of the surface of the object It should be noted that since only half the surface area of a 3D object can be ranged these measurements are also referred to as 25D The backside of the object or areas obscured by other parts cannot be ranged Many mobile robots and autonomous vehicles use similar devices to map the area in front of the robot or vehicle and determine distance to objects obstacles or drop off 10132 LightBased Range Finders Lightbased including infrared and laser range finders measure the distance from an object by three differ ent methods direct timedelay measurement indirect amplitude modulation and triangulation The direct timedelay measurement method measures the time required for a collimated beam of light usually laser since it does not divert to travel to an object and back similar to an ultrasonic sensor Since the speed of light in air is 186 000 milessec 300 000 kmsec it travels about 1 ft 30 cm in 1 ns Therefore extremely high speed electronics and high resolutions are required to use this method In one indirect method the time delay is measured by modulating a long burst of light with a lowfrequency sinusoidal wave timetoamplitude converter TAC and measuring the phase difference between the mod ulations between the emitted light and the backscattered light This in effect is slowing down the wave speed to measurable scales by substituting the speed of light with lowspeed modulations but still taking advantage of the long travel range of laser lights Triangulation is the common technique used in range finding using light beams For shorter distances encountered in navigation triangulation yields the most accurate and best resolution among the three dif ferent techniques Another technique for measuring range with light sources is stereo imaging which we will discuss in Chapter 11 A variation of this technique involves the use of a small laser pointer along with a single camera 19 In this technique the location of the laser light within the camera image is measured relative to the center of the image Since the laser light and the axis of the camera are not parallel the location of the laser dot within the image is a function of the distance between the object and the camera LiDAR light detection and ranging is similar to radar but uses light instead of radio waves A beam of light laser or infrared is fired toward the target and the properties of scattered light are measured to find the range andor other information about a distant target To gather information on a continuous basis thou sands of pulses of light are reflected by a rotating mirror For example in a system developed by Velodyne LiDAR Figure 1024 a set of laser emitters fire thousands of pulses per second while the unit rotates It can collect data about the environment at 360 azimuth and 15 to 25 elevation with a range of 200 meters Figure 1024 A commercial LiDAR device and a scene captured by it Source Reproduced with permission from Velodyne LiDAR The original picture is in color Sensors 395 20 at nearly 12 million points per second These range finders are very popular in mobile robots in auton omous vehicles and in security arrangements 1014 Sniff Sensors Sniff sensors are similar to smoke detectors They are sensitive to particular gases and send a signal when they detect the gas They are used for safety purposes as well as for search and detection purposes 21 22 23 When appropriate a sniff sensor may be incorporated in a robot for enhanced capability and for operations such a search and rescue 1015 Vision Systems Vision systems are perhaps the most sophisticated sensors used in robotics Due to their importance and complexity they will be discussed separately in Chapter 11 Note that vision systems are in fact sensors and that they relate the function of a robot to its environment as do all other sensors 1016 VoiceRecognition Devices Voice recognition involves determining what is said and taking an action based on the perceived information Voicerecognition systems generally work on the frequency content of spoken words As you may remember from other courses any signal may be decomposed into a series of sines and cosines of different frequencies at different amplitudes which when combined reconstruct the original signal We will discuss this in more detail in Chapter 11 However it is useful to realize that signals have certain major frequencies that constitute a signature spectrum and that this spectrum differs from other signals spectrum The signature spectrums of particular words or sentences are used in voicerecognition systems to recognize the spoken words Voice recognition systems may be trained individually for specific applications such as speaking to a robot or be designed for public applications such a telephone systems To do this the system is trained by speaking the words a priori to allow it to create a lookup table of the major frequencies that represent the expected spoken words Later when a word is spoken and its frequen cies are determined the result is compared to the lookup table If a close match is found the word is recog nized For better accuracy it is necessary to train the system with more repetitions On the other hand a moreaccurate list of frequencies reduces allowable variations in the way the word is spoken such as accents This means that if the system tries to match a larger number of frequencies for better accuracy in the pres ence of any noise or any variations in the spoken words the system does not recognize the word On the other hand if limited number of frequencies is matched in order to allow for variations the system may recognize a similar but incorrect word A universal system that recognizes all accents and variations in speaking may not be either possible or useful Many robots are equipped with voicerecognition systems in order to commu nicate with the users In most cases the robot is trained by the user and can recognize words that trigger a certain action in response For example a particular word may be programmed to relate to a certain position and orientation When the voicerecognition system recognizes the word it sends a signal to the controller which in turn runs the robot to the desired location and orientation This has been particularly useful with robots that aid the disabled as well as for medical robots Humanoid robots would require a much larger collection of words and understanding of the spoken language and grammar to be able to communicate and understand a dialogue Introduction to Robotics 396 1017 Voice Synthesizers Voice synthesis although not truly a sensor is included in this chapter because it is directly related to voice recognition and to a robots ability to communicate with the outside world For example in an animatronic face that mimics speaking lips a voicesynthesis system was used to recreate typed words by reproducing the sounds through a speaker while the artificial lips moved accordingly 24 This would enable a robotic face to read from books read emails for the blind or speak to humans Voice synthesis is accomplished in two different ways One way is to recreate the words by combining phonemes and vowels In this case each word is recreated when the phonemes and vowels are combined This can be accomplished with commercially available phoneme chips and a corresponding program Although this type of system can reproduce any word it sounds unnatural and machinelike As an example of the difficulty encountered by this kind of system consider the two words power and mower Although both these words are written very similarly they are pronounced differently This kind of a system will not be able to recognize this unless every conceivable exception is programmed into the chip The alternative is to record the words that the system may need to synthesize and to access them from memory as needed Telephone announcements video games and many other machine voices are prere corded and accessed as needed Although this system sounds very natural it is limited As long as all the words the machine needs to say are known a priori this system can be used We should expect to see sig nificant advances in this area in the future 1018 Remote Center Compliance RCC Device Although a remote center compliance RCC device is not an actual sensor it is discussed here because it acts as a sensing device for misalignments and provides a means of correction for robots However RCC devices also called compensators are completely passive and there are no input or output signals An RCC device is an attachment added to the robot between the wrist and the end effector It is designed to provide a means of correction for misalignments between the end effector and a part Suppose a robot is to push a peg into a hole in a part as shown in Figure 1025 If the hole and the peg are exactly the right sizes and if they are exactly aligned both laterally and axially the robot may push the peg into the hole However this is often impossible to achieve Imagine the hole is slightly off such that the cen terline of the hole and the peg are a small distance apart as in Figure 1025b a c d b Figure 1025 Misalignment of assembling elements Sensors 397 If the robot is in positioncontrol mode it can attempt to push the peg into the hole even if there is a mis alignment As a result either the robot or the part will deflect or break A stiffer robot a sign of a good robot worsens this problem If the robot has some compliance it is actually possible to cut a chamfer Figure 1025c around the hole or the peg or both to allow the robot to move laterally to align itself with the hole and prevent deflections or breakage Alternately it is possible to allow the part to move to align itself with the robot Now assume that instead of an axial misalignment there is an angular cocking misalignment between the two centerlines as in Figure 1025d In this case even if the peg and the hole are exactly aligned at the mouth of the hole if the peg is pushed in one of the two has to either deflect or break unless one is allowed to move However a compliant robot that gives enough to prevent breakage will probably have unacceptable accuracy Imagine that in order to resolve these problems a spring is used to connect the end effector to the robot wrist In this case the misalignment can be overcome but the compliant connection between the robot and the part does not allow insertion of the peg into the hole the spring simply compresses instead Therefore a device is needed that can provide selective compliance to the end effector to allow the robot to correct itself in directions where correction is needed but without affecting its accuracy in other directions A remote center compliance device provides this selective compliance through simple 4bar mechanisms To understand how the RCC device works consider a simple 4bar mechanism as shown in Figure 1026 In a mechanism there are a total of M n n1 2 instantaneous centers of zero velocity where n is the num ber of links including the ground Each instantaneous center of zero velocity is a point where the instanta neous velocity of one body relative to another is zero In a 4bar mechanism there are a total of six such centers Each of the two pin joints O1 and O2 attached to the ground is a center of rotation for the two links attached to the ground The other two pin joints A and B are centers of rotation or zero velocity of the coupler AB relative to links O1A and O2B and vice versa However in addition to these there are two more centers of instantaneous zero velocity one between the ground and the coupler and one between the two links O1A and O2B To find the instantaneous center of zero velocity for the coupler in which we are interested for this subject we need to find the velocities of two arbitrary points on it The instantaneous center of zero velocity for the coupler will be at the intersection of two lines perpendicular to the velocities of the two points on the coupler such as points A and B This is true because since V ω ρ the velocity of any point is normal to its radius of curvature ρ As a result the instantaneous center of zero velocity must be somewhere on the normalto velocity line which is along the length of each link where two such lines intersect Since this point has O1 O2 A B IC1 VA VB Figure 1026 Instantaneous centers of zero velocity for a 4bar mechanism Introduction to Robotics 398 a zero instantaneous velocity it means that at this instant it is not moving and consequently the body must be rotating about it Therefore at the instant shown the coupler link AB is rotating about point IC1 This point will be at another location in the next instant and as a result its acceleration cannot be zero Now consider a parallelogram 4bar mechanism as shown in Figure 1027a Since the two normals to the two velocities at A and B are parallel the instantaneous center of zero velocity for the coupler is at infinity indicating that the coupler is not rotating but is in pure translation This means that the coupler always trans lates to the left or right without any rotation although its motion is curvilinear Figure 1027b shows an isosceles trapezoid 4bar mechanism and the instantaneous center of zero velocity for its coupler which allows an instantaneous rotation of the coupler link about the IC These two mechanisms can provide simple translation or rotation about a remote center when needed An RCC device is a combination of these two mechanisms such that when needed it can provide slight translation or rotation of the object about a distant point therefore remotecenter compliance The distant point is the point of contact between the two parts such as the peg and the hole which is remote from the robot However notice that this compliance is only lateral or angular where it is needed The robot is still axially stiff since the mechanism does not provide any motion in the direction normal to the coupler As a result it provides a selective compliance in the direction needed without reducing the robots stiffness and consequently its accuracy Figure 1028 is a schematic drawing of how an RCC device works In reality each device provides a certain stiffness or compliance in lateral and axial directions or in bending and cocking directions and must be picked based on need Each device also has a given centertocenter distance which determines its remote b a A B IC B A Figure 1027 Special 4bar mechanisms the basis for a remotecenter compliance device RCC device The part Robots wrist Figure 1028 Schematic depiction of how an RCC device operates Sensors 399 center location relative to the center of the device Therefore there may be a need for multiple RCC devices if more than one part or operation is performed and must be picked accordingly 25 Figure 1029 shows a commercial RCC device 1019 Design Project At this point you may want to incorporate into your robots as many sensors as you want or have available to you Some of the sensors are necessary for feedback that is essential if you are to control the robots Others are added based on need and availability This is a very interesting part of any robotic project You may exper iment with different sensors for different applications and even come up with your own You may experiment with other sensors that have not been mentioned here but are available from electronic warehouses You may integrate sensors to a mobile robot of your choice for control and added intelligence too For example a visible light or infrared sensor located on the platform of the mobile robot allows you to com municate with it by projecting a visible or infrared light beam Proximity sensors and range finders as well as a GPS positioning system can also be used to determine proximity or distance to walls and other obsta cles and for navigating in different environments 1020 Summary In this chapter we discussed a variety of different sensors that are used in conjunction with robots and robotic applications Some of these sensors are used for internal feedback Others are used for communica tion between the robot and the environment Some sensors are easy to use and inexpensive while others are expensive difficult to use and require a lot of support circuitry Each sensor has its own advantages and dis advantages As an example an incremental encoder can provide simple digital position and velocity infor mation with minimum input requirements However the absolute position cannot be measured with it An absolute encoder provides absolute position information in digital form but requires many input port to the controller that may not be available A potentiometer can also provide absolute position information is very simple to use and is very inexpensive but its output is in analog form and therefore must be digitized before a microprocessor can use it However in some applications an encoder and a potentiometer are used together one to report the absolute position at wakeup and one to accurately report the changes in the posi tion Together they provide all the information needed to run the system It is the role of the design engineer to decide what type of sensor is needed or is best suited for a particular application Figure 1029 A commercial RCC device Source Reproduced with permission from ATI Industrial Automation Introduction to Robotics 400 References 1 Encyclopedia of Sensors edited by Craig A Grimes EC Dickey and MV Pishko httpwwwaspbscom eoshtml 2 Glove Senses Angle of Finger Joints NASA Tech Briefs April 1998 3 ShaftAngle Sensor Based on TunnelDiode Oscillator NASA Tech Briefs July 2008 pp 2224 4 Inductive NonContact Position Sensor NASA Tech Briefs December 2018 p 31 5 Tan KK SY Lim TH Lee H Dou High Precision Control of Linear Actuators Incorporating Acceleration Sensing Journal of Robotics and Computer Integrated Manufacturing vol 16 no 5 October 2000 pp 295305 6 Xu WL JD Han Joint Acceleration Feedback Control for Robots Analysis Sensing and Experiments Journal of Robotics and Computer Integrated Manufacturing vol 16 no 5 October 2000 pp 307320 7 Miller Ross Artificial Skin Tactile Sensor for Prosthetic and Robotic Applications masters thesis mechanical engineering Cal Poly San Luis Obispo California 2010 8 Interlink Electronics Santa Barbara California 9 Force Imaging Technologies Chicago Illinois 10 Jameco Electronics catalog Belmont California 11 Pressure Sensor Mechanism NASA Tech Briefs April 2018 p 18 12 Miniature SixAxis Load Sensor for Robotic Fingertips NASA Tech Briefs July 2009 p 25 13 Torque Sensor Based on TunnelDiode Oscillator NASA Tech Briefs July 2008 p 22 14 Puopolo Michael G Saeed B Niku Robot Arm Positional Deflection Control with a Laser Light Proceedings of the Mechatronics 98 Conference Skovde Sweden Adolfsson and Karlsen editors Pergamon Press Sep 98 pp 281286 15 Hillis Daniel A High Resolution Imaging Touch Sensor Robotics Research 12 MIT Press Cambridge MA 16 Flexible Circuit Boards for Modular ProximitySensor Arrays NASA Tech Briefs January 1997 p 36 17 Feeling in a Second Skin Mechanical Engineering Magazine January 2016 p 12 18 Kosowatz John High Tech Eyes New Independence for People with Visual Impairment Mechanical Engineering Magazine March 2017 pp 3641 19 Niku SB Active Distance Measurement and Mapping Using Non Stereo Vision Systems Proceedings of Automation 94 Conference July 1994 Taipei Taiwan ROC vol 5 pp 147150 20 wwwvelodynecomlidar 21 Sensors That Sniff High Technology February 1985 p 74 22 Electronic Noses Made From Conductive Polymer Films NASA Tech Briefs July 1997 pp 6061 23 NASAs Robotic Sniffer Finds Space Station Leak NASA Tech Briefs September 2018 p 60 24 Jones Adam Animatronics Lips with Speech Simulation ALiSS masters thesis Cal Poly San Luis Obispo California 2002 25 ATI Industrial Automation catalogs for remote center compliance devices Sensors 401 Avaliação Final xx 1 Modelar e Simular a Cinemática direta e inversaDeslocamento Velocidade aceleração dos seguintes exercícios a Cap 6 NIKU Robótica 3rd Edição b Manipulador SCARA c Plataforma de Stewart 2 Modelar e Simular a Dinâmica Inversa e Direta dos itens abc NEWTONEULER e LAGRANGE 11 Image Processing and Analysis with Vision Systems 111 Introduction Vision systems have become an integral part of many robotic systems regardless of type allowing the robot to see the environment in which it is and to gather necessary information to do its job In such systems either a commercially available vision system is integrated to work with the robot or an original vision system is developed specifically for it There is a huge body of vision routines available and many more are created every year A large subset is also developed for use with autonomous vehicles and mobile humanoid robotic systems Obviously it is only possible to discuss vision systems in this chapter as an introduction into some basics of how vision systems work and on what they are based Commercially available vision systems and programs including Photoshop MATLAB Image Processing Toolbox Optimas and many other educational and industrial systems may be used to learn from practice with or use with robotic systems In this chapter we study some fundamental techniques for image processing and image analysis with a few examples of routines developed for certain purposes If interested it is recommended that you continue studying about the subject through other references 112 Basic Concepts The following sections include some fundamental definitions of terms and basic concepts that we will use throughout the chapter 1121 Image Processing vs Image Analysis Image processing relates to the preparation of an image for later analysis and use Images as captured by a camera or other similar techniques such as a scanner are not necessarily in a form that can be used by imageanalysis routines Some may need improvement to reduce noise some may need to be simplified others may need to be enhanced altered segmented filtered or modified Image processing is the collection of routines and techniques that improve simplify enhance and otherwise alter an image Image analysis is the collection of processes by which a captured and processed image is analyzed to extract information about the content and to identify objects or other related facts about the objects within the image or the environment 1122 Two and ThreeDimensional Image Types Although the real world is threedimensional 3D images can either be twodimensional 2D lacking depth information or 3D containing depth information Most images with which we normally deal obtained by 403 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed cameras are 2D However other systems such as Computed Tomography CT and CAT scans create 3D images that contain depth information Therefore these images can be rotated about different axes in order to better visualize the depth information Stereo vision systems also contain depth information A 2D image is extremely useful for many applications even though it has no depth information This includes feature extrac tion inspection navigation parts handling and many more Threedimensional images are used with applications that require motion detection depth measurement remote sensing relative positioning and navigation CADCAMrelated operations also require 3D image processing as do many inspection and object recognition applications For 3D images one slice of the object at a time is scanned and later all images are put together to create a 3D image representation of the internal characteristics of the object All 3D vision systems share the problem of coping with manytoone mapping of scenes to images To extract information from these scenes imageprocessing techniques are combined with artificial intelligence techniques When the system is working in environments with known characteristics eg controlled light ing it functions with high accuracy and speed On the other hand when the environment is unknown or noisy and uncontrolled eg underwater operations the systems are not very accurate and require additional processing of the information and therefore operate at lower speeds 1123 The Nature of an Image An image is a representation of a real scene either in black and white or in color and either in print or in digital form Printed images may be reproduced either by multiple colors and grays such as CMYK in color print or halftone black and white print or by a single ink source For example to reproduce a photograph with real halftones we use multiple gray inks which when combined produce a somewhat realistic image How ever in most print applications only one ink color is available such as black ink on white paper in a news paper or copier In this case all gray levels must be produced by changing the ratio of black versus white areas the size of the black dot Imagine that a picture to be printed is divided into small sections In each section if the ink portion of the section is smaller than the white the section will look a lighter gray Figure 111 If the black ink area is larger than the white area it will look a darker gray By changing the size of the printed dot many gray levels may be produced Similar to printed images electronic and digital images are also divided into small equal sections called picture cells or pixels in 3D images they are called volume cells or voxels To capture an image the intensity of each pixel is measured and recorded and similarly to recreate an image the intensity of light at each pixel location is varied Therefore an image file is the collection of the data representing the light intensities of a large number of pixels This file can be recreated processed modified or analyzed A color image is essen tially the same except that the original image is separated by filters into three images of red green and blue Figure 111 Examples of how gray intensities are created in printed images In print only one color ink is used while the ratio of black to white in each small section is changed to create different gray levels Introduction to Robotics 404 colors before capturing and digitization When the three colors with different intensities at each pixel loca tion are superimposed color images are recreated 1124 Acquisition of Images All digital still and video cameras are practically similar A digital video camera takes multiple still images every second and rapidly records or saves them in a file The image data is ultimately stored in binary form Therefore weultimatelydealwithafileofahugesequenceofnumbers0and1fromwhichweextractinformationandmake decisionsAppendixB contains a short discussionabout digital cameras and how theimage is captured The final outcome is a file that contains sequential pixellocation and pixelintensity data that we use in our discussions 1125 Digital Images The light intensities at each pixel location are measured and converted to digital form regardless of the type of camera or imageacquisition system The data is stored in memory in a file or in recording devices with an image format such as TIFF JPG bitmap and so on or displayed on a monitor If stored the file can be accessed and read by a program duplicated and manipulated or rewritten in a different form Vision routines too may access this information to perform functions on the data and either display the result or store the manipulated result in a new file A fundamental need is to be able to extract information or manipulate this collection of 0 and 1 values in a meaningful way To understand this better consider the simple lowresolution image in Figure 112 Each pixel is referred to by row and column numbers Assuming the system is digitized with only 4 bits we will further discuss this shortly there will be up to 24 16 distinct light intensities possible The sequence of 0 and 1 numbers repre senting the tenth row of the image looks as shown in the figure all with only 4 bits per pixel Different file formats list these numbers differently In a simple portable gray map PGM format the intensities are listed sequentially as shown A header at the beginning of the file indicates the number of pixels in each row and column in this case it is 12 12 The program knows that every 4 bits is one pixel Therefore it can access intensity of each pixel directly However as you notice the file is reduced to a string of 0 and 1 values to which imageprocessing routines are applied and from which information is extracted Now imagine the size of the string of 0 and 1 values that represents a large image sometimes in megapixel range at up to 24 bits per pixel for three primary colors RGB in color images Intensity values Row 10 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 7 3 1 0 3 9 10 3 3 11 14 10 1 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 7 3 1 0 3 9 10 3 3 10 14 11 a b c d e f g h i j k l Figure 112 An image and the binary representation of its first row using 4 bits per pixel Image Processing and Analysis with Vision Systems 405 An image with only shades of gray is called a gray image A color image results by superimposing three images of red green and blue hues RGB each with varying intensities Therefore when the image is digi tized it has three strings of 0s and 1s for the three hues an alternative way is to assign a number to each color all declared in a header at the beginning of the image file Then the number representing the pixel represents the color reference and intensity A binary image is an image where each pixel is either fully light or fully dark either a 0 or a 1 To achieve a binary image in most cases a gray image is converted using the histogram of the image and a cutoff value called a threshold A histogram of the pixel gray levels shows the distribution of the different gray levels We can pick a value that best determines a cutoff level with the least loss of information and use this value as a threshold to assign a 0 or off to all pixels whose gray levels are below the threshold and to assign a 1 or on to all pixels whose gray values are above the threshold Changing the threshold changes the binary image The advantage of a binary image is that it requires far less memory and it can be processed much faster than gray or colored images 1126 Frequency Domain vs Spatial Domain Many processes used in image processing and analysis are based on either the frequency domain or the spatial domainInfrequencydomainprocessingthefrequencyspectrumoftheimageisusedtoalteranalyzeorprocess theimageInthiscasetheindividualpixelsandtheircontentsarenotusedInsteadafrequencyrepresentationof thewholeimageisusedfortheprocessInspatialdomainprocessingtheprocessisappliedtotheindividualpixel values As a result each pixel is affected directly by the process Both techniques are equally important and pow erful and are used for different purposes It should be noted here that although spatial and frequencydomain techniques are used differently they are both related For example suppose a spatial filter is used to reduce noise in an image As a result of this noise reduction the frequency spectrum of the image is also affected The following sections discuss some fundamental issues about frequency and spatial domains This discus sion although general helps us throughout the entire chapter 113 Fourier Transform and Frequency Content of a Signal As you may remember from your mathematics or other courses any periodic signal may be decomposed into a collection of sines and cosines of different amplitudes and frequencies called Fourier series as follows f t a0 2 n 1 an cos nωt n 1 bn sin nωt 111 When these sines and cosines are combined the original signal is reconstructed This conversion to fre quency domain results in a Fourier series and the collection of different frequencies present in the equation yields the frequency spectrum or frequency content of the signal Of course although the original signal is in the timeamplitude domain the frequency spectrum is in the frequencyamplitude domain To understand this better lets look at an example Consider a signal in the form of a simple sine function like f t sin t Since this signal consists only of one frequency and a constant amplitude the frequency spectrum representing it consists of a single value at the given frequency as shown in Figure 113 Obviously if we plot the function represented by the arrow in Figure 113b with the given frequency and amplitude we have the same sine function reconstructed Sim ilarly the plots in Figure 114 represent f t n 13 15 1 n sin nt The frequencies are also plotted in the fre quencyamplitude domain As you see when the number of frequencies contained in ft increases the summation gets closer to a square function Figure 115a shows a signal from a sensor and its frequency content Although the signal is not a true sine function the dominant frequency is 075 Hz However due to the discrepancies and the variations in the Introduction to Robotics 406 Time Amplitude ftsint13sin3t 1 Amplitude Frequency 08 1 06 04 02 0 02 04 06 08 1 3 Amplitude ftsint13sin3t15sin5t 1 Amplitude Frequency Time 08 1 06 04 02 0 02 04 06 08 1 5 3 Amplitude ftsint13sin3t115sin15t Amplitude Frequency Time 08 1 06 04 02 0 02 04 06 08 1 15 13 11 9 1 3 5 7 Figure 114 Sine functions in the time and frequency domains for a successive set of frequencies As the number of frequencies increases the resulting signal gets closer to a square function a b 1 Amplitude Frequency Time Amplitude ft sint 08 1 06 04 02 0 02 04 06 08 1 Figure 113 Timedomain and frequencydomain plots of a simple sine function signal the frequency spectrum contains many other frequencies Figure 115b shows a signal with larger var iations and its frequency spectrum Clearly many more sine and cosine functions must be added in order to reconstruct this signal therefore the spectrum contains many more frequencies Theoretically to reconstruct a square wave from sine functions an infinite number of sines must be added together Since a square wave function represents a sharp change this means that rapid changes such as impulses pulses square waves or other similar functions decompose into a large number of frequencies The sharper the change the higher the number of frequencies needed to reconstruct it Therefore any video or other signal that contains sharp changes such as noise edges high contrasts impulse and step functions or has detailed information such as highresolution signals will have larger number of frequencies in its fre quency spectrum a b Frequency 10 Hz 15 075 Arbitrary Units 1 Sec 70 Target Arbitrary Units 10 Hz 1 Sec 100 Figure 115 Two signals and their frequency spectrums Introduction to Robotics 408 A similar analysis can be made on nonrepeating signals too called the Fourier transform particularly fast Fourier transform FFT Although we will not discuss the details of the Fourier transform in this book suf fice it to say that an approximate frequency spectrum of any signal can be found Although theoretically there are infinite frequencies in the spectrum generally there are some major fre quencies within the spectrum with larger amplitudes called harmonics These major frequencies or harmo nics are used in identifying and labeling a signal including recognizing voices shapes objects and the like Additionally depending on needs the frequency spectrum may be manipulated to obtain the desired results 114 Frequency Content of an Image Noise and Edges Figure 116 shows a lowresolution artificial image and a graph of its pixel intensities versus their positions for one row The intensity of pixel number 9h is very different from the ones before and after it and may indicate noise which is generally information that does not belong to the surrounding environment The intensities of pixels 9k9m are also different from the neighboring pixels and may indicate an edge Although this is a discrete digitized signal as discussed earlier it may be transformed into frequency domain as a large number of sines and cosines with different amplitudes and frequencies which if added reconstruct the signal As discussed earlier portions of the signal that change slowly such as small changes between succeeding pixel gray values will require fewer sines and cosines to be reconstructed and conse quently contribute more low frequencies to the spectrum On the other hand parts of the signal that vary quickly or significantly such as large differences between pixel gray levels at edges or noise require a large number of higher frequencies to be reconstructed and as a result contribute more high frequencies to the spectrum Both noises and edges are among cases where one pixel value is substantially different from the neighboring pixels Therefore noises and edges contribute to the higher frequencies of a typical frequency spectrum whereas slowly varying gray level sets of pixels representing the object contribute to the lower frequencies of the spectrum If a highfrequency signal is passed through a lowpass filter a filter that allows lower frequencies through without much attenuation in amplitude but which severely attenuates the amplitudes of the higher frequen cies in the signal it reduces the influence of all high frequencies including the noises and edges This means Row of interestext Intensity Pixel p Possible noise Possible edge 10 50 100 9a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a b c d e f g h i j k l m n o p h k m Figure 116 Noise and edge information in an intensity diagram of an image The pixels with intensities that are much different from the neighboring pixels can be considered to be edges or noise Image Processing and Analysis with Vision Systems 409 that although a lowpass filter reduces noise it also reduces the clarity of an image by attenuating the edges and softening the image throughout A highpass filter on the other hand increases the apparent effect of higher frequencies by severely attenuating the lowfrequency amplitudes In such cases noise and edges will be left alone but slowly changing areas will disappear from the image The application of different methods for noise reduction and edge detection is discussed further in later sections of this chapter 115 Resolution and Quantization Two measures significantly affect the usefulness of an image and the data contained within it The first one is resolution which is affected by how often a signal is measured and read or sampled Higher number of sam ples at equally spaced periodic times result in higher resolution and therefore more data The resolution of an analog signal is a function of sampling rate The resolution of a digital system is a function of how many pixels are present Fundamentally these two are the same measure reading the light intensity of the image at more pixel locations is in fact the same as sampling more often Figure 117 shows an image sampled at a 480 320 b 240 160 c 120 80 and d 60 40 pixels The clarity of the image is lost when the sampling rate decreases a b c d Figure 117 Effect of different sampling rates on an image at a 480 320 b 240 160 c 120 80 and d 60 40 pixels As the resolution decreases the clarity of the image decreases accordingly Introduction to Robotics 410 The second issue is how accurately the value of the signal at any given point is converted to digital form This is called quantization a function of how many bits are used to represent the digitized magnitude of the sampled signal Depending on the number of bits used for quantization the grayness variations of the image will change The total number of gray level possibilities is 2n where n is the number of bits For a 1bit analogtodigital converter ADC there are only two possibilities on and off black and white or 0 and 1 called a binary image For quantization with an 8bit ADC the maximum number of gray levels is 256 Therefore the image will have 256 different gray levels 0255 Quantization and resolution are completely independent of each other For example a highresolution image may be converted into a binary image where there are only on and off pixels 0 and 1 or dark and light or the same image may be quantized into 8 bits which can yield a spectrum of 256 different shades of gray Figure 118 shows the same image quantized at a 2 levels 1 bit b 4 levels 2 bits c 8 levels 3 bits and d the original 256 levels 8 bits Both the resolution and quantization must be sufficiently high in order to provide adequate information for a specific task A lowresolution image may not be adequate for recognition of parts with high detail but enough for distinguishing between a bolt and a nut Low bitcount quantization may be enough for many applications where binary images are adequate but not in others where different objects must be distin guished from each other For example a highresolution image is necessary for reading the license plate of a car or recognition of faces with a security camera However because the license plate consists of primarily a b c d Figure 118 An image at different quantization levels of 2 4 8 and 256 gray levels As the quantization resolution increases the image becomes smoother Image Processing and Analysis with Vision Systems 411 dark letters on a light background even a binary image only one bit per pixel may be sufficient with good lighting A similar image must be quantized at a higher bitcount in order to allow face recognition When choosing a camera both these values must be considered The sampled light at a pixel when quantized yields a string of 0 and 1 values representing the light at that pixel location The total memory required to store an image is the product of the memory needed for the total number of samples pixels and the memory needed for each digitized sample A larger image with higher resolution total number of pixels and a higher number of gray levels requires a larger memory size The total memory requirement is a function of both values Example 111 Consider an image that is 256 by 256 pixels The total number of pixels in the image is 256 256 65536 If the image is binary it will require 1 bit to record each pixel as 0 or 1 Therefore the total memory needed to record the image is 65 536 bits or with 8 bits to a byte 8192 bytes If each pixel were to be digitized at the rate of 8 bits for 256 shades of gray it would require 65536 8 524288 bits or 65 536 bytes For a color video clip changing at the rate of 30 images per second the memory requirement is 65536 30 1966080 bytes per second per color channel RGB Of course this is only the memory requirement for recording the image pixels and does not include index information and other bookkeeping requirements The actual memory requirement may be lower depending on data compression and the format in which the image is recorded 116 Sampling Theorem Can you tell what the image in Figure 119 represents Of course since this is a very lowresolution 16 16 image it is difficult to guess what the content is This simple illustration signifies the relationship between sampling rate and the information obtained from it To understand this lets first discuss some fundamental issues about sampling Consider a simple sinusoidal signal with frequency f as shown in Figure 1110a Suppose the signal is sampled at the rate of fs The arrows in 1110b show the corresponding sampled amplitudes Now suppose we want to use the sampled data to reconstruct the signal This would be similar to sampling a sound source such as a CD and trying to reconstruct the sound from the sampled data through a speaker One possibility would be that by chance the same signal might be reconstructed However as you can see in Figure 1111 it is very possible that another signal with a different frequency matches the sampled data Figure 119 A lowresolution 16 16 image Introduction to Robotics 412 exactly the same way Both and in fact many others are valid and match the sampled data Therefore it is unclear what the reconstructed signal might be This loss of information is called aliasing of the sampled data and it can be a very serious problem So how do we make sure that the original signal can be reconstructed as closely as possible In order to prevent aliasing according to what is called sampling theorem the sampling frequency ωs must be at least twice as large as the largest frequency present in the signal or at least twice as large as the highest desired frequency of interest ωd In that case we can reconstruct the original signal up to the frequency of interest without aliasing The highest frequency present in the signal can be determined from the frequency spectrum of the signal If a signals frequency spectrum is found using the Fourier transform it theoretically contains infinite frequencies However as we have seen the higher frequencies have smaller amplitudes We can always pick a maximum frequency that may be of interest while assuming that the frequencies with very low amplitudes beyond that point can be ignored without much effect in the signals total representation The sampling rate of the signal must be at least twice as large as this frequency In practice the sampling rate is zero Sampling period a zero Sampling period b Figure 1110 a Sinusoidal signal with a frequency of f b sampled amplitudes at the rate of fs Second signal Original signal Figure 1111 Reconstruction of signals from the sampled data too More than one signal may be reconstructed from the same sampled data Image Processing and Analysis with Vision Systems 413 generally chosen to be larger than this minimum to further ensure that aliasing of the signal will not occur Frequencies four to five times as large as the desired maximum frequency are common For example human ears can theoretically hear frequencies up to about 20000 Hz If a CD player is to reconstruct the digitized sampled music the sampling rate of the CD must be at least twice as large namely 40 000 Hz In practice CD players sample at the rate of about 44100 Hz At lower sampling rates the sound may become distorted In reality if a signal changes more quickly than the sampling rate the details of the change will be missed and therefore the sampled data will be inadequate For example it has been shown that the resulting vibra tion from a rotating gear with a broken tooth is distinctly different from a regular gear Figure 1112 How ever at a low sampling rate the sampled data may be completely void of this important information Similarly in Figure 1113 the sampling rate is lower than the higher frequencies of the signal As shown although the lower frequencies of the signal are reconstructed the signal does not contain the higher fre quencies of the original signal The same is true with sound and image signals If a sound signal is sampled at a low rate the highfrequency information will be lacking and the reconstructed sound will lack high frequency sounds The output of the system even if the best speakers are used will be distorted and different from the real signal For images too if the sampling rate is low resulting in a lowresolution image the sampled data may be lacking in adequate information to reconstruct the image with adequate detail In general the number of pixels needed is such that the size of the pixel is at least half the size of the smallest detail needed in the image Figure 119 is sampled at a very low rate and the information is lost not adequate for the details we need This is why you cannot decipher the image However when the sampling rate is increased there is eventually enough information to recognize the image The stillhigher resolutions or sampling rates will transfer more information and therefore increasingly more detail can be recognized Figure 1114 is the same image as in Figure 119 but at 2 4 and 16 times higher resolutions Now suppose you need to recognize the difference between a bolt and a nut in a vision system in order to direct a robot to pick up the parts Because the infor mation representing a bolt and a nut is very different a lowresolution image still enables you to determine what the part is as shown in Figure 1114de However in order to determine if a part is assembled correctly a highresolution image is needed to extract enough information about the details Amplitude Time Figure 1112 An inappropriate sampling rate may completely miss important data within a signal Time Amplitude Time Amplitude a b Figure 1113 The original signal in a is sampled at a sampling rate that is lower than the higher frequencies of the signal The reconstructed signal in b does not contain the higher frequencies of the original signal Introduction to Robotics 414 117 ImageProcessing Techniques As mentioned earlier imageprocessing techniques are used to enhance improve or otherwise alter an image and to prepare it for image analysis During image processing information is usually not extracted from an image Instead the intention is to remove faults or trivial information or information that may be important but not useful to improve the image As an example suppose an image was obtained while the object was moving and as a result the image is not clear It would be desirable to see if the blurring in the image could be reduced or removed before the information about the object such as its nature shape location orientation and so on could be determined Also consider an image corrupted by reflections due to direct lighting or an image that is noisy because of low light In all these cases it is desirable to improve the image and prepare it before imageanalysis routines are used Similarly consider the image of a section of a city fully detailed with streets cars shadows and so on It may actually be more difficult to extract information from this image than if all unnecessary detail except for edges were removed Image processing is divided into many sections including histogram analysis thresholding masking fil ters edge detection segmentation region growing modeling and many more In the next sections we will study some of these techniques and their applications 118 Histograms of Images A histogram is a representation of the total number of pixels of an image at each gray level Histogram infor mation is used in a number of different processes including thresholding For example histogram informa tion can help in determining a cutoff point for converting the image into binary form It can also be used to a b c d e Figure 1114 The image in Figure 119 presented at higher resolutions of a 32 32 b 64 64 c 256 256 and a bolt and a nut at resolutions of d 32 32 and e 256 256 Image Processing and Analysis with Vision Systems 415 decide if there are any prevalent gray levels in an image For instance consider a systematic source of noise in an image that causes many pixels to have one noisy gray level A histogram can be used to determine the noisy gray level in order to attempt to remove or neutralize the noise The same may be used to separate an object from the background as long as they have distinctly different colors or gray values Figure 1115a shows a lowcontrast image that has all its pixel gray levels clustered between two relatively close values In this image all pixel gray values are 80150 as shown by the histogram in Figure 1115c As a result the image is not very clear and details are not visible Now suppose that we equalize the histogram such that the same 32 gray levels are spread out between 0255 gray levels As a result of this histogram equal ization the image is vastly improved as shown in Figure 1115b with its corresponding histogram in d Notice that the number of pixels at each gray level is the same in both cases but the gray levels are spread out Example 112 Assume the histogram of an image is spread between 100 and 150 out of the maximum grayness level of 255 What is the effect of multiplying the range by 15 or by 2 What is the effect of adding 50 to all gray values Solution The two operations mentioned here are common in formatting images and in many vision systems When all gray values are increased by the same amount the image becomes brighter but the contrast does not change As long as the added value does not increase the grayness level of any pixel beyond the 255 level no information is lost and the original image may be regained by decreasing all pixel values by the same amount If the pixel grayness levels are multiplied by a number as long as the maximum available gray levels are not exceeded the histogram range is extended and contrast is increased In this example since the range is between 100 and 150 equalizing the histogram by 15 increases the range to between 150 and 225 However multiplying the pixel levels by 2 extends the histogram to between 200 and 300 therefore saturating the image beyond 255 and changing its nature Unless the original image is saved dividing the pixel values by 2 yields an image with a histogram between 100 and 127 a c d b 80 of pixels of pixels 150 0 255 Gray level intensity Gray level intensity Figure 1115 Effect of histogram equalization in improving an image Introduction to Robotics 416 Figure 1116a shows an original image that was later altered by an imageformatting routine for increased brightness Figure 1116c and increased contrast Figure 1116e As is evident in the histo grams 1116bd when an image is brightened its histogram distribution simply shifts in this case by 30 points When the contrast of the image is increased in this case by 50 the distribution of pixel gray levels is expanded although the relationship remains the same However unlike the previous example the distribution of gray levels is different because new gray values are introduced Level Count Percentile Mean Std Dev Median Pixels Level 174 5503 Count Percentile 8208 13416 4427 139 786432 a b c d e f Mean Std Dev Median Pixels 13407 2220 136 786432 Mean Std Dev Median Pixels Level 190 7212 Count Percentile 8915 16407 2220 166 786432 Figure 1116 Increasing the contrast in an image expands the histogram to include new gray values Image Processing and Analysis with Vision Systems 417 119 Thresholding Thresholding is the process of dividing an image into different portions or levels by picking a certain gray ness level as a threshold comparing each pixel with the threshold value and assigning the pixel to the dif ferent portions or levels of interest depending on whether the pixels grayness level is below the threshold off zero or not belonging or above the threshold on 1 or belonging Thresholding can be performed either at a single level or with multiple thresholding values where the image is processed by dividing the image into layers each layer with a selected threshold To aid in choosing an appropriate threshold many different techniques have been suggested These techniques range from simple routines for binary images to sophisticated techniques for complicated images Early routines were used for a binary image where the object was bright and the background was completely dark This condition can be achieved in controlled lighting in industrial situations but may not be available in other environments In binary images the pixels are either on or off therefore choosing a threshold is simple and straightforward In other situations the histogram may be a multimodal distribution In this case the valleys are chosen as the threshold value More advanced techniques use statistical information and distribution characteristics of the image pixels to develop a threshold value For example the lowest value between two peaks the midpoint between two peaks the average of two peaks and many other scenarios may be used As the threshold value changes so does the image Figure 1117a shows an original image with 256 gray levels and the result of thresholding at grayness levels of Figure 1117b 40 and Figure 1117c 190 Thresholding is used in many operations such as converting an image into binary form filtering operations masking and edge detection Example 113 Figure 1118a shows the image of a bolt and a washer The histogram shows the con centration of pixels at three different levels emphasizing the bolt the washer and the background Figures 1118bc show how the bolt and the washer can be isolated by selecting threshold levels at 30 and 190 out of 255 Example 114 Figure 1119a shows an image of a cutting board and its histogram Due to the nature of this image there are four peaks in the histogram Figures 1118bd show the effect of thresholding at different levels In fact in this case different types of wood can be identified and separated from each other due to their colors a b c Figure 1117 Thresholding an image a with 256 gray levels at two different values of b 40 and c 190 Introduction to Robotics 418 1110 Spatial Domain Operations Convolution Mask Spatial domain processes access and operate on the individual pixel information As a result the image is directly affected by the operation Many processes used in vision systems are in the spatial domain One of the most popular and most common techniques in this domain is convolution which can be adapted to many different activities such as filters edge finders morphology and many more Many processes in com mercial vision systems and photography software are based on convolution too The following is a discussion of basic principles behind convolution Later we will apply the convolution idea to different purposes Imagine an image composed of pixels each with a particular gray level or color information as symbolically depicted by letters A B C in Figure 1120 as part of a larger image Lets also assume that there is a 3 3 kernel or mask as shown which has values in its cells as indicated by m1 through m9 a b c Figure 1118 An image and its histogram binarized at different threshold levels of 30 and 190 Image Processing and Analysis with Vision Systems 419 a b c d Figure 1119 Images and histograms for Example 114 Introduction to Robotics 420 Applying the mask onto the image involves superimposing convolving the mask first on the upperleft corner of the image and taking the summation of the product of the value of each pixel multiplied by the corresponding mask value and dividing the summation by a normalizing value We get please follow carefully R A m1 B m2 C m3 E m4 F m5 G m6 I m7 J m8 K m9 S 112 where S is the normalizing value This is usually the summation of the values in the mask or S m1 m2 m3 m9 113 If the summation is zero substitute S 1 or choose an alternate number The result R is substituted for the value of the pixel in the center of the block that was superimposed In this case R will replace the pixel value of F R Fnew Usually the substitution takes place into a new file in order to not alter the original file The mask is then moved one pixel to the right and the same is repeated for a new R that will replace G as follows R Gnew B m1 C m2 D m3 F m4 G m5 H m6 J m7 K m8 L m9 S The result is now substituted for G in a new file The mask is then moved over one more pixel and the operation is repeated until all the pixels in the row are changed Then the operation continues in a raster scan fashion with the following rows until the image is completely affected The resulting image will show characteristics that may be slightly or very severely affected by the operation all depending on the m values in the mask The first and last rows and columns are not affected by this operation and therefore are usually ignored Some systems insert zeros for the first and last rows and columns or retain the original values Another alternative is to copy the first and last rows and columns into an additional layer of rows and col umns around the image in order to calculate new values for these pixels A B C D E F G H m1 m2 m3 I J K L m4 m5 m6 M N O P m7 m8 m9 Figure 1120 When a convolution mask kernel is superimposed on an image it can change the image pixel by pixel Each step consists of superimposing the cells in the mask onto the corresponding pixels multiplying the values in the masks cells by the pixel values adding the numbers and normalizing the result The result is substituted for the pixel in the center of the area of interest The mask is moved over pixel by pixel and the operation is repeated until the image is completely processed Image Processing and Analysis with Vision Systems 421 For an image IRC with R rows and C columns of pixels and for a mask Mnn with n rows and columns in the mask as shown in Figure 1121 the value for the pixel Ixynew as the center of a block can be calculated by Ixy new 1 S n i 1 n j 1 Mij I x n 1 2 i y n 1 2 j 114 S n i 1 n j 1 Mij if S 0 S 1or largest number if S 0 115 Note that the normalizing or scaling factor S is arbitrary and is used to prevent saturation of the image The user can always adjust this number to get the best image without saturation Example 115 Consider the pixels of an image with values as shown in Figure 1122 as well as a con volution mask with the given values Calculate the new values for the given pixels Solution We substitute zeros for the first and last columns and rows because they are not affected by this proc ess For the remaining pixels we superimpose the mask on the remaining cells of the image and use Eqs 112 and 113 to calculate new pixel values as shown in Figure 1123a with the result shown in Figure 1123b Superimposing the mask on the image as shown for each remaining element we get 22 5 0 6 0 2 1 3 1 3 1 5 1 4 1 3 0 2 0 5 3 4 23 6 0 2 0 8 1 3 1 5 1 6 1 3 1 2 0 6 0 5 5 32 3 0 3 0 5 1 4 1 3 1 2 1 8 1 6 0 5 0 5 4 4 33 3 0 5 0 6 1 3 1 2 1 6 1 6 1 5 0 9 0 5 4 6 In reality grayness levels are integers and therefore all numbers are rounded to whole numbers I11 I12 I13 I14 I15 I21 I22 I23 I24 I25 M11 M12 M13 I31 I32 I33 I34 I35 M21 M22 M23 I41 I42 I43 I44 I45 M31 M32 M33 Figure 1121 The representation of an image and a mask 5 6 2 8 3 3 5 6 0 0 1 4 3 2 6 1 1 1 8 6 5 9 1 0 0 Figure 1122 An example of a convolution mask Introduction to Robotics 422 Example 116 Apply the 7 7 mask shown to the image in Figure 1124 Solution Applying the mask to the image results in Figure 1125 As you notice in Figure 1125 the oncells in the mask have convolved into the same shape within the image albeit upside down and mirror image when applied to a single onpixel in the image assuming that the summation of the numbers in the mask is 1 it results in the same image intensity This in fact demonstrates the real meaning of the convolution mask Any set of numbers used in the mask will convolve into the image and will affect it accordingly Therefore the choice of numbers in the mask can have a significant effect on the image Also notice that for a 7 7 convolution mask the first and last three rows and columns remain unaffected Note that whenever the result is 1 it replaces the pixel located where the center of the mask is 22 23 32 33 50 60 21 8 31 31 51 6 41 30 20 6 8 6 5 9 0 0 1 1 1 1 1 0 0 5 60 20 81 3 31 51 61 4 31 20 60 8 6 5 9 0 0 1 1 1 1 1 0 0 5 6 2 8 30 30 51 6 41 31 21 6 81 60 50 9 0 0 1 1 1 1 1 0 0 5 6 2 8 3 30 50 61 4 31 21 61 8 61 50 90 0 0 1 1 1 1 1 0 0 and and a 0 0 0 0 0 3 5 0 0 4 5 0 0 0 0 0 b Figure 1123 a Convolving the mask onto the cells of the image b the result of the operation Image Processing and Analysis with Vision Systems 423 1111 Connectivity During the application of many vision routines we need to decide whether neighboring pixels are somehow connected or related to each other This connectivity establishes whether they are of the same properties such as being of the same region or object similar textures or colors and so on To establish this connectivity of neighboring pixels we first have to decide a connectivity path or connectivity rule For example we need to decide whether only pixels on the same column and row are connected or diagonally situated pixels are also accepted as connected There are three fundamental connectivity paths for 2D image processing and analysis 4 or 4 connectivity H6 or V6connectivity and 8connectivity In 3D connectivity between voxels volume cells can range from 6 to 26 Referring to Figure 1126 we define the following 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 1124 The mask and image for Example 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 1125 The result of convolving the mask on the image from Example 116 Introduction to Robotics 424 4connectivity A pixel ps relationship is only considered with respect to the four pixels immediately above below to the left and to the right of the pixel bdeg 4connectivity A pixel ps relationship is only considered with respect to the four pixels diagonally across from it on four sides acfh For pixel pxy these are defined as For 4connectivity x 1 y x1 y x y 1 x y1 116 For 4connectivity x 1 y 1 x 1 y1 x1 y 1 x1 y1 117 H6connectivity A pixel ps relationship is only considered with respect to the six neighboring pixels on two rows immediately above and below the pixel abcfgh V6connectivity A pixel ps relationship is only considered with respect to the six neighboring pixels on two columns immediately to the right and to the left of the pixel adfceh For pixel pxy these are defined as For H6connectivity x1y 1 xy 1 x 1y 1 x1y1 xy1 x 1y1 118 For V6connectivity x1y 1 x1y x1y1 x 1y 1 x 1y x 1y1 119 8connectivity A pixel ps relationship is considered with respect to all eight pixels surrounding it abcdefgh For pixel pxy this is defined as x1y1 xy1 x 1y1 x1y x 1y x1y 1 xy 1 x 1y 1 1110 Example 117 In Figure 1127 starting with pixel 4c find all succeeding pixels that can be consid ered connected to each other based on 4 4 H6 V6 and 8connectivity rules a b c d p e f g h Figure 1126 Neighborhood connectivity of pixels x a b c d e f 2 3 4 5 6 1 Figure 1127 The image for Example 117 Image Processing and Analysis with Vision Systems 425 Solution Figure 1128 shows the results of the connectivity search Please follow each one You must take one pixel find all others connected to it based on the applicable connectivity rule and search the pixels found to be connected to the previous ones for additional connected pixels until done The remain ing pixels are not connected We use the same rules later for other purposes such as region grow ing The H6 V6 and 8connectivity search is left for you to do as an exercise So far we have studied general issues and fundamental techniques used in image processing and analysis Next we discuss particular techniques that are used for specific applications 1112 Noise Reduction Similar to all other information mediums images contain noise Some noise is systematic and comes from dirty lenses faulty electronic components bad memory chips and low resolution Other noises are random and are caused by environmental effects or bad lighting The net effect is a partially corrupted image that needs to be preprocessed to reduce or eliminate the noise In addition some images have low quality due to hardware and software inadequacies and therefore have to be enhanced and improved before other ana lyses can be performed on them For example at the hardware level an onchip correction scheme was devised for defective pixels in an image sensor 1 In this scheme readouts from the nearest neighbors were x x 4 x 4 H 6 x 2 3 4 5 6 1 a b c d e f x V 6 2 3 4 5 6 1 a b c d e f x 8 2 3 4 5 6 1 a b c d e f 2 3 4 5 6 1 a b c d e f 2 3 4 5 6 1 a b c d e f Figure 1128 The results of the connectivity searches for Example 117 Introduction to Robotics 426 substituted for identified defective pixels However in general software schemes are used for most filtering operations Filtering techniques are divided into two categories of frequency domain and spatial domain Frequency related techniques operate on the Fourier transform of the signal whereas spatialdomain techniques operate on the image at the pixel level either locally or globally The following is a summary of a number of different operations for reducing noise in an image 11121 Neighborhood Averaging with Convolution Masks As discussed in Section 1110 a mask may be used for many different purposes including filtering operations and noise reduction In Section 114 it was also discussed that noise along with edges creates higher fre quencies in the spectrum It is possible to create masks that behave like lowpass filters such that the higher frequencies of an image are attenuated while the lower frequencies are not changed much and thereby reduce the noise Neighborhood averaging with a convolution mask can be used to reduce the noise in images but it also reduces the sharpness of an image Consider the 3 3 mask in Figure 1129a with its corresponding values as well as a portion of an imaginary image with its gray levels shown We assume all the pixels but one are at a gray value of 20 The pixel with a gray level of 100 may be con sidered noise since it is different from the pixels around it Applying the mask starting at the corner of the image with a normalizing value of 9 summation of all values in the mask and continuing with the next pixels yields R 20 1 20 1 20 1 20 1 100 1 20 1 20 1 20 1 20 1 9 29 for the pixels shown in Figure 1129b As shown the pixel with a value of 100 causes the surrounding pixel values to all change to 29 Consequently the large difference between the noisy pixel and the sur rounding pixels 100 versus 20 becomes much smaller 29 versus 20 thus reducing the noise while 20 20 20 20 20 20 20 20 20 20 20 20 1 1 1 20 20 100 20 20 20 1 1 1 20 20 20 20 20 20 1 1 1 20 20 20 20 20 20 a 20 20 20 20 20 20 20 29 29 29 20 20 20 29 29 29 20 20 20 29 29 29 20 20 20 20 20 20 20 20 b Figure 1129 Neighborhood averaging mask Image Processing and Analysis with Vision Systems 427 increasing the neighboring pixel values The operation has no effect on the remaining pixels Notice how the noise and the clarity of the images are both reduced With this characteristic this mask acts as a low pass filter because it attenuates the sharp differences between neighboring pixels but has little effect on pixels whose intensities are similar Notice that this routine introduces new gray levels in the image 29 and therefore changes the histogram of the image Figure 1130 shows a an original image b an image corrupted with noise c the image after a 3 3 averaging filter application and d the image after a 5 5 averaging filter application The 5 5 filter is more effective in reducing both the noise and the sharpness There are other averaging filters such as Gaussian also called mild isotropic lowpass shown in Figure 1131 This filter similarly improves the image but with a slightly different result 11122 Image Averaging In this technique a number of images of the exact same scene are averaged together Since the camera has to acquire multiple images of the same scene all actions in the scene must completely stop As a result in addi tion to being time consuming this technique is not suitable for operations that are dynamic and change rap idly Image averaging is more effective at increased numbers of images and is fundamentally useful for random noise If the noise is systematic image averaging has no effect on the image If we assume that a b c d Figure 1130 Neighborhood averaging of an image 1 4 6 4 1 1 2 1 4 16 24 16 4 2 4 2 6 24 36 24 6 1 2 1 4 16 24 16 4 1 4 6 4 1 55 33 Figure 1131 5 5 and 3 3 Gaussian averaging filters Introduction to Robotics 428 an acquired image Axy has random noise Nxy then the desired image Ixy can be found by averaging the images because the summation of random noises approaches zero or A xy I xy N xy n A xy n n I xy N xy n n I xy n n N xy n 0 I xy 1111 Although image averaging reduces random noise unlike neighborhood averaging it does not blur the image or reduce its focus 11123 Frequency Domain When the Fourier transform of an image is calculated the frequency spectrum might show a clear frequency for the noise which in many cases can be selectively eliminated by proper filtering 11124 Median Filters One of the main problems in using neighborhood averaging is that along with removing noise the filter also blurs the edges and reduces sharpness of the image A variation to this technique is to use an n n median filter in which the value of the pixel is replaced by the median of the values of the pixels within the area of the mask around the pixel sorted in ascending order The median of a set of numbers is the value where half of the values in the set are below and half are above the median also called the 50th percentile Since unlike an average the medians final value is independent of the value of any single pixel in the set the median filter will be much stronger in eliminating spikelike noises with less blurring of the image Suppose we apply a 3 3 median filter to pixel number 33 of the image in Figure 1129a The sorted values in ascending order will be 20 20 20 20 20 20 20 20 100 The median is 20 the fifth one from the left Replacing the center pixels value with 20 completely eliminates the noise Of course noise is not always this easily removed But this example shows how the effect of median filters can be very different from averaging Notice that median filters do not create any new gray levels but they do change the histogram of the image Figure 1132 shows a an original image b the image corrupted with random noise c the image improved with a 3 3 median filter and d the image improved with a 7 7 median filter Generally larger size median filters are more effective in reducing noise but make the image less sharp a b c d Figure 1132 a The original image b is the same image corrupted with a random noise c the image improved by a 3 3 median filter and d the same image improved with a 7 7 median filter Image Processing and Analysis with Vision Systems 429 Median filters tend to make the image grainy especially if applied more than once Consider the image in Figure 1133a The values in ascending order for the topleft corner are 1 2 3 4 5 6 7 8 9 The middle value is 5 resulting in the image in Figure 1133b The values for the second set of 9 pixels are 1 2 2 3 4 5 6 7 9 and the median is 4 As you can see the image has become grainy because the pixel sets with similar values appear longer as in 5 and 5 or 4 and 4 Figure 1133c shows the effect of a 3 3 median filter applied once versus Figure 1133d when it is applied three times The image is grainier 1113 Edge Detection Edge detection is a general name for a class of routines and techniques that operate on an image and result in almost a line drawing of the image The lines represent changes in values such as crosssections of planes textures lines and colors differences in light intensities between parts and backgrounds or features such as holes and protrusions as well as differences in shading and textures Some techniques are mathematics oriented some are heuristic and some are descriptive techniques They generally oper ate on the differences between the gray levels of pixels or groups of pixels through masks or thresholds The final result is a line drawing or similar representation that requires much less memory can be pro cessed more easily and saves in computational and storage costs Edge detection is also necessary for some other processes such as segmentation and object recognition Without edge detection it may be impossible to find overlapping parts calculate features such as diameter and area or determine parts by region growing Different techniques of edge detection yield slightly different results and therefore should be chosen carefully and used wisely Except in binary images edges are generally not ideal This means that instead of a clear distinction between two neighboring pixels gray levels the edge is spread over a number of pixels as shown in Figure 1134 A simple comparison between two neighboring pixels may be inadequate for edge detection The first and second derivatives of the graph are also shown It is possible to assume that the edge is at the peaks 2 1 3 2 8 9 4 7 7 5 6 2 2 1 3 2 8 5 4 4 7 5 6 2 a b c d Figure 1133 Application of a median filter Introduction to Robotics 430 of the first derivative or at the zero crossing of the second derivative and to use these values to detect the edges The problem is exacerbated when the image is noisy and therefore the derivatives have excessive numbers of peaks or zero crossings Generally the edges are at regions of rapid intensity change Referring to Figure 1135 the magnitude and direction of the gradient of image intensity can be calculated as I I xI y I magnitude I x 2 I y 2 1112 I direction tan1 Iy Ix 1113 Ideal edge x 255 0 fx Real edge x 255 0 fx x f x Edgemin peak x f x Edgezero crossing Figure 1134 Edge detection with first and second derivatives I y I x Intensity gradient Figure 1135 Gradient of image intensity Image Processing and Analysis with Vision Systems 431 Similarly the second gradient of the intensity called the Laplacian is shown as Eq 1114 The magnitude and orientation of the second gradient can be calculated in a similar fashion 2I 2I x22I y2 1114 Digital Implementation Since images are discrete a finite difference approach is taken to calculate the gradients For a one dimensional system the finite difference between successive elements is f x lim dx 0 f x dx f x dx 1115 In an image dx is one pixel wide Therefore the finite difference for an image can be simplified to F x F x 1 F x and be implemented by kernel 1 1 For a 2D system the same is applied in both x and y directions Referring to Figure 1136 notice that when the finite difference is calculated it does not relate to the center of the pixel of interest rather there are two midpoints between successive pixels to which the gradients apply To remedy this the finite difference can be calculated between the pixels before and after the point of interest and averaged using the modified kernel mask 1 2 1 0 1 yielding dF dx F x 1 F x1 dF dy F y 1 F y1 1116 Similarly the second derivative of the image intensities can be calculated with finite difference as F x 2F x2 F x 1 F x F x 1 F x F x F x1 F x1 2F x F x 1 1117 which can be implemented by a kernel 1 2 1 Therefore the approximate magnitude of the Laplacian for a 2D image can be calculated by applying the following kernel mask x x1 Location of the gradient Figure 1136 Intensity gradient between successive pixels Introduction to Robotics 432 Laplacian 090 0 1 0 1 4 1 0 1 0 Laplacian 45 1 0 1 0 4 0 1 0 1 1118 As we will soon see this is a common way of detecting edges In fact many other common masks used for edge detection are variations of the gradient scheme As discussed earlier like noise edges are high frequency and therefore can be separated by highpass fil ters Masks can be designed to behave like a highpass filter reducing the amplitude of the lower frequencies while not affecting the amplitudes of the higher frequencies as much and thereby separating noises and edges from the rest of the image Consider the image and the Laplacian kernel mask in Figure 1137 As you see this mask has negative numbers Applying the mask to the image at the corner yields R 20 1 20 0 20 1 20 0 100 4 20 0 20 1 20 0 20 1 1 320 The normalizing factor is 1 because we do not divide by zero resulting in the value of 320 replacing the 100 comparatively accentuating the original difference from 100 versus 20 to 320 versus 20 while applying the mask to the set of pixels in columns 3 4 5 yields zero indicating that the difference between pixels is not changed Since this mask accentuates largeintensity variations higher frequencies while ignoring similar intensities lower frequencies it is a highpass filter This also means that the noise and edges of objects in images will be accentuated As a result this mask acts as an edge detector Some highpass filters act as an image sharpener Figure 1138 shows some other highpass filters 20 20 20 20 20 20 100 20 20 20 1 0 1 20 20 20 20 20 0 4 0 20 20 20 20 20 1 0 1 Figure 1137 The Laplacian1 highpass edge detector mask 1 8 1 1 1 6 1 1 5 1 1 1 1 0 1 0 0 1 0 Laplacian2 Sharpen Low Sharpen Medium 1 1 1 0 0 1 0 0 Figure 1138 Other highpass filters Image Processing and Analysis with Vision Systems 433 The three masks 2 3 4 5 6 called the Sobel operator Roberts edge and Prewitt shown in Figure 1139 effectively do the same gradient differentiation with somewhat different results and are very common When applied to an image the two pairs of masks calculate the gradients in the x and y directions which are added and compared to a threshold Notice how these follow the gradient equations developed earlier Figure 1140 shows a an original image and the image with its edges detected by b a Laplacian1 c Laplacian2 d Sobel operator and e Roberts edge You must realize that although in this example the results are as shown the result for other images may be different This is because the histogram of the image and the chosen thresholds have great effects on the final outcome Some routines allow the user to change the thresholding values and some do not In each case the user must decide which routine performs the best a d e b c Figure 1140 a An image and its edges from b Laplacian1 c Laplacian2 d Sobel operator and e Roberts edge 1 0 a Sobel Roberts Prewitt b c 0 1 1 2 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 0 2 0 0 0 1 0 1 1 2 1 1 0 1 1 1 1 1 0 1 Figure 1139 The Sobel Roberts and Prewitt edge detectors Introduction to Robotics 434 Other methods can be used for binary images that are simple to implement and yield continuous edges In one example 7 a search technique dubbed leftright LR in this book is used to quickly and efficiently detect edges in binary images of single objects that look like a blob Imagine a binary image as shown in Figure 1141 Lets assume that gray pixels are on or the object and white pixels are off background Assume a pointer is moving from one pixel to another in any direction up down right left Any time the pointer reaches an on pixel it turns left Any time it reaches an off pixel it turns right Of course as shown depending on the direction of the pointer left and right might mean different directions Starting at pixel 11 moving to 12 to the end then row 2 and then row 3 the pointer finds the first on pixel at 33 turns left and encounters an off pixel turns right twice then left and goes on The process continues until the first pixel is reached The collection of the pixels on the pointers path is one continuous edge Other edges can be found by continuing the process with a new pixel In this example the edge is pixels 3c 3d 3e 3f 3i 4i 4j 4k Table 111 shows how a simple computer program can be developed to do the search U and V are pixel coordinates Left Right Left Right Left Right Left Right Rows 1 2 3 Columns a b c 4 l j k i f g h e d 5 Figure 1141 Leftright search technique for edge detection 7 Table 111 Possible LR schemes based on the direction of search If VpresentVprevious 0 left Unext Upresent 1 right Unext Upresent 1 if VpresentVprevious 0 right Unext Upresent 1 left Unext Upresent 1 If UpresentUprevious 0 right Vnext Vpresent 1 left Vnext Vpresent 1 If UpresentUprevious 0 right Vnext Vpresent 1 left Vnext Vpresent 1 Image Processing and Analysis with Vision Systems 435 Masks may also be used for the intentional emphasis of some characteristic of the image For example a mask may be designed to emphasize horizontal lines vertical lines or diagonal lines Figure 1142 shows three such masks Figure 1143 shows a an original image along with the effects of b a vertical mask c a hor izontal mask and d a diagonal mask Notice how the lines are emphasized in each one 1114 Sharpening an Image Image sharpening can be accomplished in many different ways The simplest is to apply a mild highpass filter to the image that increases the sharpness of the image by eliminating some of the lower frequencies from the edges However in sharpening operations noise is increased too therefore as the level of sharpening increases so does the noise level Figure 1138 partially repeated here shows two simple sharpening masks Multiple applications of sharpening filters will quickly ruin the image as noise increases and is emphasized during each application 3 6 3 3 3 3 3 3 6 3 6 3 6 6 6 3 6 3 3 6 3 3 3 3 6 3 3 Vertical emphasis mask Horizontal emphasis mask Diagonal emphasis mask Figure 1142 These masks emphasize the vertical horizontal and diagonal lines of an image a b c d Figure 1143 a An original image with effects of b a vertical emphasis mask c a horizontal emphasis mask and d a diagonal emphasis mask 0 1 0 0 0 1 1 1 1 1 1 6 5 0 1 0 0 0 Sharpen Low Sharpen Medium Figure 1138 Repeated Introduction to Robotics 436 Figure 1144 shows a moresophisticated method to sharpen images In this case b a 3 3 mask was applied to the original image to decrease noise followed by c a lowsharpening mask followed by d a Sobel edge detector e The result was added to the original image As you can see the image shows more detail and is somewhat sharpened but there is also more noise present 1115 Hough Transform As you have probably noticed in most edgedetection techniques the resulting edges are not continuous However there are many applications where continuous edges are either necessary or preferred For exam ple as we will see later in region growing edges that define an area or region must be continuous and com plete before a region growing routine can detect and label it Additionally it is desirable to be able to calculate the slope of detected edges in order to either complete a broken line or to detect objects The Hough trans form 8 is a technique used to determine the geometric relationship between different pixels on a line including the slope of the line For example we can determine whether a cluster of points is on a straight line or not This also aids in the further development of an image in preparation for object recognition since it relates individual pixels into recognizable forms The Hough transform is based on transforming the image space xy into either r θ or mc space The normal from the origin to any line will have an angle of θ with respect to the xaxis and a distance of r from the origin The transformation into the r θplane also called the Hough plane showing these values is called the Hough transform Figure 1145a Note that since all the points constituting the line in xyplane have the same r θ values they are all represented by the same point A in the r θplane Therefore all points on a straight line are represented by a single point in the Hough plane a b d e c Figure 1144 a The original image b after an averaging mask was applied to it c the result of sharpening with a lowsharpening mask d Sobel edge e the result of adding the Sobel edge to the original image Image Processing and Analysis with Vision Systems 437 Similarly a line in the xyplane with a slope m and intercept c can be transformed into a Hough plane of mc with x and y as its slope and intercept Figure 1145b Therefore a line in the xyplane with a particular slope and intercept will transform into a point in the Hough plane Since all points on this line have the same m and c they are all represented by the same point in the Hough plane Now consider the line in Figure 1146a described by its slope m and intercept c as y mx c 1119 Equation 1119 can also be written in terms of m and c as variables as c xm y 1120 where in the mcplane the x and y are the slope and the intercept As discussed earlier the line of Eq 1119 with m and c converts to a single point A in the mcplane Whether the line is drawn with this equation or in polar coordinates with r θ the result is the same Thus a line and all the points on it are represented by a point in the Hough plane The opposite is also true As shown in Figure 1147 an infinite number of lines may go through a point in the xyplane all intersecting at the same location Although these lines have different slopes m and intercepts c x θ θ y r Hough plane r A a b x y m Hough plane c m c A Figure 1145 The Hough transformation from the xyplane into the r θplane or mcplane a b m c m1 c1 A Line 1 Line 2 Line 3 x y x1 x2 y1 y2 m c B C D Figure 1146 Hough transform Introduction to Robotics 438 they all share the same point xy which become the slope and intercept in the Hough plane Therefore the same x and y values represent all these lines and consequently a point in the xyplane is represented by a line in the Hough plane The Hough transform converts the pixels edges within an image into lines in the Hough plane If a group of points are colinear their Hough transforms will all intersect at one point By checking this it can be deter mined whether a cluster of pixels is on a straight line or not Hough transforms can also be used in deter mining the angle or orientation of a line This application has found use in determining the orientation of an object in a plane by calculating the orientation of a particular line in the object Since the intercept and slope of the line are now known a broken line can easily be completed by additional points Example 118 The x and y coordinates of five points are given as 154 0634 152 23 and 31 Using the Hough transform determine which points are on the same line Find the slope and intercept of the line Solution Of course any two points form a line So we will look for at least three points that will be on the same line Clearly looking at the graph of the points it is a trivial matter to answer the questions However in com puter vision since the computer does not have the intelligence to understand an image it must be cal culated Imagine having thousands of points in a computer file representing an image It is impossible whether for a computer or a human to tell which points are on the same line and which ones are not We will perform a Hough transform to determine which points fall on the same line Table 112 summarizes the lines formed in the mcplane that correspond to the points in the xyplane Figure 1148 shows the five corresponding lines drawn in the mcplane As you see four lines inter sect at the same location while line 4 does not indicating that all points except 23 are on the same line The slope and intercept of the line are 067 and 3 respectively Of course any two points are on a line as well consequently line 4 intersects with all other lines This shows how the Hough transform x x y Line 1 Line 2 Line 3 y A x y m c Figure 1147 Transformation of a point in the xyplane into a line in the Hough plane Table 112 Lines formed in the mcplane corresponding to the points in the xyplane y x xy mc 1 4 15 4 m15 c c 15 m 4 2 34 06 34 m06 c c 06 m 34 3 2 15 3 m2 c c 2 m 3 4 3 2 2 m15 c c 15 m 2 5 1 3 1 m3 c c 3 m 1 Image Processing and Analysis with Vision Systems 439 can be cluttered with an exceeding number of intersecting lines Determining which lines are intersect ing is the main issue in Hough transform analysis The equation representing the line is y 0 67x 3 Using this equation additional points lying on the line can be assigned to the group therefore completing broken lines Coincidentally the same analogy may be made for circles and points instead of lines and points All points on a circle will correspond to intersecting circles in the Hough plane and vice versa For more information refer to 3 The Hough transform has many desirable features For example since each point in the image is treated independently all points can be processed simultaneously with parallel processing methods This makes the Hough transform a suitable candidate for realtime processing It is also insensitive to random noise since individual points do not greatly contribute to the final count of the part itself However the Hough transform is computationally intensive To reduce the number of calculations needed to determine whether lines are actually intersecting with each other at the same point we may use a circle within which if the lines approx imately intersect with each other they are assumed to be intersecting Many variations to the Hough trans form have been devised to increase its efficiency and utility for different tasks including object recognition 9 1116 Segmentation Segmentation is a generic name for a number of different techniques that divide the image into segments or constituents The purpose is to separate the information contained in the image into smaller entities that can be used for other purposes For example an image can be segmented by the edges in the scene or by division into small areas blobs and so on Each of these entities can subsequently be used for further processing representation or identification Segmentation includes but is not limited to edge detection region growing and texture analysis The early segmentation routines were all based on edge detection of simple geographic models such as polyhedrons In 3D analysis of objects models such as cylinders cones spheres and cubes were used as well Although these shapes and figures did not necessarily match any real objects they provided a means for early developmental work that evolved into more sophisticated routines and techniques They also 1 2 3 4 5 m c 4 lines intersect here Figure 1148 Hough transform for Example 118 Introduction to Robotics 440 provided a means to develop schemes that could process complicated shapes and recognize objects As an example the routines could model a tree as a cone or sphere mounted on a cylinder Figure 1149 and could match it with a model of a tree requiring very little processing power the tree could be expressed with only a few pieces of information such as the diameters of the cone and cylinder and their heights while representing all the information pertaining to a tree could be enormous in comparison Similarly a house could be represented with a few pieces of information regarding width length and height of cubes or prisms Imagine the information needed by an autonomous vehicle or a drone to avoid a tree or a house Does it need to know all the details or just enough to avoid it Figure 1150 shows an image captured by a LiDAR A similar approach can be taken to segment the information into areas or objects and even rep resent them with similar known objects 1117 Segmentation by Region Growing and Region Splitting In addition to edgedetection routines region growing and image splitting are other common techniques of segmentation Through these techniques an attempt is made to separate the different parts of an image into segments or components with similar characteristics that can be used in further analysis such as in object detection Edges found by an edge detector are lines of textures colors planes and gray levels and therefore may or may not be continuous However segmentation by regions naturally results in complete and closed boundaries For a survey of other segmentation techniques see 10 Two approaches are used for region segmentation One is to grow regions by similar attributes such as a range of gray levels or other similarities The other is region splitting which will split images into smaller areas using their finer differences Figure 1149 Representation of objects such as a tree or a house with models such as cones spheres cylinders cubes and prisms can reduce processing requirements Figure 1150 An image captured by a LiDAR Source Reproduced with permission from Velodyne LiDAR Company The original image is in color Image Processing and Analysis with Vision Systems 441 One technique of region splitting is thresholding The image is split into closed areas of neighboring pixels by comparing them to a thresholding value or range Any pixel that falls below a threshold or between a range of values will belong to a region and otherwise to another This splits the image into a series of regions or clusters of pixels that have common or similar attributes Generally although this is a very simple tech nique it is not very effective since choosing an appropriate threshold is difficult The results are also highly dependent on the threshold value and change accordingly when the thresholds change Still it is a useful technique under certain conditions such as silhouettes and for images with relatively uniform regions In region growing first nuclei pixels or regions are formed based on some specific selection law Regions nuclei are the clusters of pixels that are formed at the beginning of segmentation They are usually small and act as a nucleus for subsequent growing and merging as in alloys The result is a large number of little regions Successively these regions are combined into larger regions based on some other attributes or rules Although these rules can merge many smaller regions to create a smoother set of regions they may unnec essarily combine certain features that should not be merged such as holes smaller but distinct areas or dif ferent distinct areas with similar intensities The following is a simple search technique for growing regions for a binary image or with the application of thresholding for gray images as well that uses a bookkeeping approach to find all pixels that belong to the same region 11 Figure 1151 shows a binary image Each pixel is referred to by a pair of index numbers Assume a pointer starts at the top and searches for a nucleus to start a region As soon as a nucleus is found which does not already belong to another region the program assigns a region number to it All pixels con nected to it receive the same region number and are placed in a stack The search continues with all the pixels in the stack until the stack is emptied The pointer will then continue searching for a new nucleus and a new region number 1 2 3 4 4connectivity Search Next 2d 3d Regionn Regionn Search Next 2d 3d 3c 3e 4d Regionn Regionn Search Next 2d 3d 3c 3e 4d 3b Regionn Regionn Stack Stack Stack Round 1 Round 2 Round 3 Continue until stack is empty Rows Columns a b c d e f g h 1 2 3 4 5 6 7 8 9 Figure 1151 Region growing based on a search technique With a 4connectivity search regionn is as shown Introduction to Robotics 442 It is important to decide what form of connectivity is to be used in growing regions as this will change the final outcome As discussed in Section 1111 4 4 H6 V6 and 8connectivity can be used for region growing In Figure 1151 the first nucleus is found at pixel 2d Suppose we have chosen 4connectivity The program will check the four corresponding pixels around the nucleus to determine connectivity If there is an on pixel its location index numbers are placed in a stack the cell is given the region number n and the pointer is moved down in the stack to the next cell 3d At this location the connectivity of pixels around the cell is checked again the on pixel index numbers are placed in the search stack the cell is given the regionn designation and the process is repeated for the next index number on the stack 3c The process continues until the stack is empty Notice that this is nothing more than a bookkeeping technique to make sure the computer program can find all connected pixels in the region without missing any Example 119 Using 4connectivity the first region that results from a search in Figure 1151 is shown in Figure 1152 There are many other segmentation schemes that apply to different situations For example in one tech nique the following is done 1 Assign the image to k clusters 2 Calculate the mean of each cluster 3 If the mean of a token area or pixel is closer to its clusters mean keep it 4 If the mean of a token area or pixel is closer to another clusters mean reassign it to the other cluster 5 Continue until no changes are made Once again as you notice a bookkeeping and comparison routine is applied to the image in order to segment it based on a desired characteristic in this case the mean of each area Other schemes can be found in other references 2 12 13 14 Figure 1152 The result of a search for 4connectivity for Example 119 Image Processing and Analysis with Vision Systems 443 1118 Binary Morphology Operations Morphology operations refer to a family of operations performed on the shape therefore morphology of subjects in an image They include many different operations both for binary and gray images such as thick ening dilation erosion skeletonization opening closing and filling These operations are performed on an image in order to aid in image analysis as well as for reducing the extra information that may be present in the image For example consider the binary image in Figure 1153a and the stick figure representing one of the bolts in Figure 1153b As we will see later a moment equation may be used to calculate the orientation of the bolts However the same moment calculation can also be performed on the stick figure of the bolt but with much less effort As a result it would be desirable to convert the bolt to its stick figure or skeleton In the following sections we discuss a few of these operations Morphology operations are based on set theory For example in Figure 1154 the union between the two lines creates the parallelogram apply the first line to the second line while the union between the two smal ler circles is the larger circle In this case the radius of the first circle is added to the second one enlarging it This is called dilation shown with the symbol and as we will soon discuss it can be as little as one pixel added to the perimeter of a part in an image Similarly in Figure 1155 subtracting the second set from the first results in an eroded shape therefore erosion shown with the symbol which as will be discussed later may be as small as one pixel around the object Similar combinations of dilation and erosion create other effects as follows a b Figure 1153 The binary image of a bolt and its stick skeleton representation Figure 1154 The union between two geometries creates dilation Introduction to Robotics 444 Example 1110 Figure 1156 shows the effect of a union operation between two shapes As shown this union reduces the appearance of the peaks and valleys in the original shape This is used for smoothing the jagged edges of shapes such as a bolt or gear Example 1111 Figure 1157 shows the image of a plate with a small protrusion in it In order to locate the protrusion we may subtract erode a circle from the plate with a diameter slightly larger than the protrusion add the circle to the result and subtract the result from the original image The remaining object is only the protrusion Figure 1155 The subtraction of two geometries creates erosion Figure 1156 The result of the union of the two shapes reduces the appearance of the peaks and valley Protrusion Figure 1157 The application of union and subtraction operations for locating the protrusion Image Processing and Analysis with Vision Systems 445 The following are all based on the previously mentioned operations 11181 Thickening Operation A thickening operation fills the small holes and cracks on the boundary of an object and can be used to smooth the boundary In the example shown in Figure 1158 the thickening operation reduced the appear ance of the threads of the bolts This is a very useful operation when we try to apply other operations such as skeletonization to the object The initial thickening prevents the creation of whiskers caused by the threads as we will see later Figure 1158 shows the effect of three rounds of thickening operations on the threads of the bolts 11182 Dilation In dilation the background pixels that are 8connected to the foreground object are changed to foreground As a result effectively a layer is added to the object every time the process is implemented Due to the fact that dilation is performed on pixels that are 8connected to the object repeated dilations can change the shape of the object Figure 1159b is the result of five dilation operations on the objects in Figure 1159a As you see due to this dilation the four objects have bled into one piece With additional applications of dilation the four objects as well as the disappearing hole can become one solid piece which can no longer be recognized Figure 1158 The threads of the bolts are removed by a triple application of a thickening operation resulting in smooth edges a b Figure 1159 Effect of dilation operations Here the objects in a were subjected to five rounds of dilation b Introduction to Robotics 446 11183 Erosion In this operation foreground pixels that are 8connected to a background pixel are eliminated This effec tively eats away a layer of the foreground the object each time it is performed Figure 1160b shows the effect of three repetitions of the erosion operation on the binary image in Figure 1160a Since erosion removes one pixel from around the object the object becomes increasingly thinner with each pass However erosion dis regards all other requirements of shape representation It removes one pixel from the perimeter and holes of the object even if the shape of the object is eventually lost as in Figure 1160c with seven repetitions where one bolt is completely lost and the nut will soon disappear Erosion can eventually remove all objects This means that if the reverse operation of dilation is used adding one pixel to the perimeter of the object with each pass the dilated object may not resemble the original object at all In fact if the object is totally eroded to one pixel dilation will result in a square or circle As a result erosion can irreparably damage the image However it can also be successfully used to eliminate unwanted objects in an image For example if we want to identify the largest object in an image successive erosions eliminate all other smaller objects before the largest object is eliminated Therefore the object of interest can be identified 11184 Skeletonization A skeleton is a stick representative of an object where all thicknesses have been reduced to one pixel at any location Skeletonization is a variation of erosion Whereas in erosion the thickness may go to zero and the object may be totally lost in skeletonization as soon as the thickness of the object becomes one pixel the operation at that location stops Although in erosion the number of repetitions are chosen by the user in skeletonization the process automatically continues until all thicknesses are 1 pixel the program stops when no new changes are made as a result of the operation The final result of skeletonization is a stick figure skeleton of the object which is a good representation of the object sometimes much better than the edges Figure 1161b shows the skeleton of the original objects in Figure 1161a The whiskers are created because the objects were not smoothed by thickening As a result all threads are reduced to one pixel creating the whiskers Figure 1162 shows the same objects that are thickened to eliminate the threads resulting in a clean skeleton Figure 1162c is the result of dilating the skeleton seven times As can be seen the dilated objects are not the same as the original objects Notice how the smaller screw appears as big as the bigger bolts Although dilation of a skeleton will also result in a shape different from the original object skeletons are very useful in object recognition since they are generally a better representation of an object than others The stick representation of an object can be compared to the available a priori knowledge of the object for matching a b c Figure 1160 Effect of erosion operation on objects in a with b 3 and c 7 repetitions Image Processing and Analysis with Vision Systems 447 11185 Open Operation Opening is an erosion operation followed by dilation This causes a limited smoothing of convex parts of the object and can be used as an intermediate operation before skeletonization 11186 Close Operation Closing is a dilation operation followed by erosion This causes a limited smoothing of concave parts of the object and like opening can be used as an intermediate operation before skeletonization 11187 Fill Operation Filling fills the holes in the foreground object In Figure 1163 the hole in the nut is filled with foreground pixels until it is eliminated For information on other operations refer to vision systems manufacturers references Different compa nies include other operations to make their software unique These operations can be used as available a b Figure 1161 The effect of skeletonization on an image without thickening The threads of the bolts have resulted in whiskers a b c Figure 1162 The skeleton of the objects in a after b the application of thickening operation results in a clean skeleton c The dilated image of the skeletons Introduction to Robotics 448 1119 Gray Morphology Operations Gray morphology operations are similar to binary morphology operations except that they operate on a gray image Usually a 3 3 mask is used to apply the operations where each cell in the mask may be either 0 or 1 Imagine a gray image is a multilayer 3D image where the light areas are peaks and the dark areas are valleys The mask will be applied to the image by moving it from pixel to pixel Where the mask matches the gray values in the image there are no changes made If the gray values of the pixels do not match the mask they will be changed according to the selected operation as described in the following sections 11191 Erosion In this case each pixel will be replaced by the value of the darkest pixel in its 3 3 neighborhood known as a min operator effectively eroding the object Of course the result is dependent on which cells in the mask are 0 or 1 It removes light bridges between dark objects 11192 Dilation In this case each pixel will be replaced by the value of the lightest pixel in its 3 3 neighborhood known as a max operator effectively dilating the object Of course the result is dependent on which cells in the mask are 0 or 1 It removes dark bridges between light objects 1120 Image Analysis Image analysis is a collection of operations and techniques used to extract information from images This includes object recognition feature extraction analysis of position size orientation and other properties of objects and extraction of depth information Some techniques may be used for multiple purposes as we will see later For example moment equations may be used for object recognition as well as calculation of position and orientation of objects Generally it is assumed that imageprocessing routines have already been applied to the image or that they are available for further use when needed to improve and prepare the image for analysis Imageanalysis rou tines and techniques may be used on both binary and gray images In the following sections some of these techniques are discussed Figure 1163 As a result of a fill operation the hole in the nut is filled with foreground pixels thus eliminating the hole Image Processing and Analysis with Vision Systems 449 1121 Object Recognition by Features Objects in an image may be recognized by their features These features may include but are not limited to gray level histograms morphological features such as area perimeter number of holes and others eccentricity chord length and moments In many cases the information extracted is compared to a priori information about the object which may be in a lookup table For example suppose two objects are present in the image one with two holes and one with one hole Using previously discussed routines it is possible to determine how many holes each part has and by comparing the two parts lets say they are assigned regions 1 and 2 to a lookup table it is possible to determine what each of the two parts are In another example assume a moment analysis is performed for a known object and the moment relative to an axis is calculated at many angles and the data is stored in a lookup table Later when the moment of the part in the image is calculated relative to the same axis and is compared to the lookup table the angle of the part in the image can be estimated The following is a discussion of a few techniques and different features that may be used for object recognition 11211 Basic Features Used for Object Identification The following morphological features may be used for object recognition and identification Gray levels Average maximum or minimum gray levels may be used to identify different parts or objects in an image As an example assume there are three parts in an image each one with a different color or texture The colors and textures will create different gray levels in the image If the average maximum or minimum gray levels of the objects are found eg through histograms mapping the objects can be recognized by comparison of this information In other cases even the presence of one particular gray level may be enough to recognize a part See Example 113 on how the histogram is used to identify a bolt and a nut at different grey levels Perimeter area diameter number of holes and other similar morphological characteristics These characteristics may be used for object identification The perimeter of an object may be found by first applying an edgedetection routine and subsequently by counting the number of pixels on the perimeter The LR search technique from Section 1113 can also be used to calculate the perim eter by counting the pixels that are on the path in an accumulator Area can be calculated by region growing techniques Moment equations can also be used as will be discussed later Diameter for noncircular objects is the maximum distance between any two points on any line that crosses the identified area of the object Aspect ratio Aspect ratio is the widthtolength ratio of an enclosing rectangle about the object as shown in Figure 1164 All aspect ratios are sensitive to orientation except the minimum aspect ratio Therefore the minimum aspect ratio is usually used to identify objects a b w L w L Figure 1164 a Aspect ratio of an object b minimum aspect ratio Introduction to Robotics 450 Thinness Thinness is defined as one of the two following ratios 1 Thinness perimeter 2 area 1121 2 Thinness diameter area 1122 Moments Due to their importance moments are discussed in the next section 11212 Moments The moment of an object within an image is defined as Mab xy xaybIxy 1123 where Mab is the moment of the object with a and b indices x and y are the coordinates of each pixel raised to the power of a and b and Ixy is the intensity of the pixel as in Figure 1165 If the image is binary the inten sities are either 1 or on for the object and 0 off for the background therefore only the pixels that are turned on are considered In gray images the intensities may vary greatly and consequently the value of the moment may be exceedingly influenced by gray values As a result although it is mathematically possible to apply moment equations to a gray image it is not practical or useful unless other additional rules are applied For binary images Ixy is either 0 or 1 therefore considering only the onpixels in the image Eq 1123 simplifies to Mab xy xayb 1124 a b c d e f g h 1 2 3 4 5 6 7 8 9 x y y1 x1 Figure 1165 Calculation of the moment of an image For each pixel that belongs to the object the coordinates of the pixel are raised to the powers indicated by the moments indices The summation of the values is the particular moment of the image Image Processing and Analysis with Vision Systems 451 To calculate the moments first determine whether or not each pixel belongs to the object is turned on if so raise the coordinates of the location of the pixel to the given values of a and b The summation of this operation over the entire image is the particular moment of the object with a and b indices M00 is the moment of the object with a 0 and b 0 This means the x and y coordinate values of all on pixels are raised to a power of 0 M02 means all x values are raised to the power of 0 and all y values are raised to the power of 2 and so on All combinations of values between 0 and 2 are common A value of 3 may be used in special cases Distances x and y are measured either from fictitious reference axes located at the edge of the image xy or are measured from reference axes formed by the first row and column of the image Since the distances are measured by counting the number of pixels the use of the first row and column as the reference axes is more logical However note that in this case all distances should be measured to the centerline of the pixel row or column As an example the first onpixel on the second row is pixel 2d The x distance of the pixel from the x1y1 coordinate frame is 3 whereas the same coordinate from the xy coordinate is 4 or more accurately 35 pixels As long as the same distances are used consistently the choice is not important Based on this since all numbers raised to the power of 0 are equal to 1 all x0 s and y0 s are equal to 1 Therefore the M00 moment is the summation of all onpixels which is the area of the object This moment can be used to determine the nature of an object and to distinguish it from others that have a different area Obviously the M00 moment can also be used to calculate the area of an object within an image Similarly M01 is x0y1 for all onpixels or the summation of 1 y values which is the summation of the ycoordinates of all onpixels from the xaxis This is similar to the first moment of the area relative to the x axis Therefore the location of the center of the area relative to the xaxis can be calculated by y y area M01 M00 1125 So by simply dividing the two moments you may calculate the y coordinate of the center of the area of the object Similarly the location of the center of the area relative to the yaxis is x x area M10 M00 1126 This way the geometric center of an object may be located within an image regardless of its orientation the orientation will not change the location of the center of an area Of course this information can be used to locate an object say for grabbing by a robot M02 is x0y2 and represents the second moment of the area relative to the xaxis Similarly M20 is the second moment of the area relative to the yaxis As you can imagine the moment of inertia of an object such as the one in Figure 1165 varies significantly as the object rotates about its center Suppose we calculate the moments of the area about an axis say the xaxis at different orientations Since each orientation creates a unique value a lookup table that contains these values can later be used to identify the orientation of the object Of course if the object translates within an image its moments of inertia also change rendering it impossible to determine the orientation except in known locations However with a simple application of the parallel axes theorem the second moments about axes at the center of the area can be calculated Since this measure is independent of the location it can be used to determine the orientation of the object regardless of its location To calculate the second moments of the area of the object relative to axes through the centroid of the object Ixx and Iyy knowing the second moments relative to the reference axes Ixx and Iyy we can write Ixx IxxA y 2 and Iyy IyyA x 2 1127 Introduction to Robotics 452 Substituting Eqs 1125 and 1126 into Eq 1127 we get M02 M02M00 M01 M00 2 1128 and M20 M20M00 M10 M00 2 1129 Using the moment equations as described allows us to identify an object its location and its orientation In addition to identification of the part the information can also be used in conjunction with a robot controller to direct the robot to pick up the part andor operate on it Other moments can also be used similarly For example M11 represents the product of inertia of the area and can also be used for object identification Higherorder moments such as M03 M30 M12 and so on can also be used to identify objects and their orientation Imagine two objects relatively similar in shape as in Figure 1166a It is possible that the second moments areas perimeters or other morphological character istics of the two objects may be similar or close to each other such that they may not be useful in object iden tification In this case a small difference between the two objects may be exaggerated through higherorder moments making object identification possible The same is true for an object with a small asymmetry Figure 1166b The orientation of the object may be found by higherorder moments A moment invariant is a measure of an object based on its different moments and is independent of its location orientation and scale factor Therefore the moment invariants may be used for object recognition and parts identification without regard to camera setup location or orientation There are seven different moment invariants such as MI1 M00M20 M2 10 M00M02 M2 01 M3 00 1130 See 2 for the other six moment invariants Example 1112 For the simple object in a lowresolution image in Figure 1167 calculate the area center of the area and second moments of area of the object relative to the x1 y1axes a b Figure 1166 Small differences between objects or small asymmetry in an object may be detected using higherorder moments Image Processing and Analysis with Vision Systems 453 Solution Measuring the distances of each onpixel from the x1 y1axes and substituting the measurements into the moment equations will yield the following results M00 x0y0 12 1 12 M10 x1y0 x 2 1 1 2 3 3 3 4 1 5 2 6 42 M01 x0y1 y 1 1 5 2 5 3 1 4 30 x M10 M00 42 12 3 5 and y M01 M00 30 12 2 5 M20 x2y0 x 2 2 1 2 1 2 2 3 3 2 3 4 2 1 5 2 2 6 2 178 M02 x0y2 y2 1 1 2 5 2 2 5 3 2 1 4 2 82 The same procedure may be used for an image with much higher resolution There will just be many more pixels to deal with A computer program can handle as many pixels as necessary without difficulty Example 1113 In a certain application a vision system looks at an 8 8 binary image of rectangles and squares The squares are either 3 3pixel solids or 4 4 hollow while the rectangles are 3 4 solids Through guides jigs and brackets we can be certain the objects are always parallel to the ref erence axes as shown in Figure 1168 and that the lowerleft corners of the objects are always at pixel 1a We want to only use the moment equations to distinguish the parts from each other Find one set of lowest values a and b in the moment equation that would be able to do so with corresponding values for each part For this example use the absolute coordinates of each pixel for distances from the cor responding axes 1 a b c d e f g h 2 3 4 5 6 7 8 9 x y y1 x1 Figure 1167 Image used for Example 1112 Introduction to Robotics 454 Solution Using the moment equations we calculate the different moments for all four until we find one set that are all unique for each object Square with hole Solid square Wide rectangle Tall rectangle M00 12 M00 9 M00 12 M00 12 M01 30 M01 18 M01 24 M01 30 M10 30 M10 18 M10 30 M10 24 M11 75 M11 36 M11 60 M11 60 M02 94 M02 42 M02 56 M02 90 As shown the lowest set of moment indices that yields a unique solution for each object is M02 Of course M20 would result in similar numbers x y x y x y x y a b c d e f g h a b c d e f g h a b c d e f g h a b c d e f g h Square with hole 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Solid square Wide rectangle Tall rectangle Figure 1168 Image used for Example 1113 Figure 1169 Image used for Example 1114 Image Processing and Analysis with Vision Systems 455 Example 1114 For the image of the screw in Figure 1169 calculate the area xy M02M20M11M20 M02 and the moment invariant Solution A computer program was used to calculate the moments In this program distances used for moments are all in terms of the number of pixels and not in units of length The values were calculated for five separate caseshorizontal30 45 60 and vertical Small variations in the results are due to rotation operations Every time a part of an image is rotated since every point in the image must be converted with a sine or cosine function it changes slightly Otherwise as you can see the results are consistent For example as the part is rotated in place the location of its center of area does not change You also can see that the moment invariant is constant and from the moment of inertia information about the centroid the orientation can be estimated This information can now be used to identify the object or to direct a robot controller to send the robot arm at the proper orientation to the location to pick up the part Horizontal 30 45 60 Vertical Area 3713 3747 3772 3724 3713 xbar 127 123 121 118 113 ybar 102 105 106 106 104 M02 388 E6 436 E6 464 E6 476 E6 478 E6 M20 676 E6 626 E6 59 E6 539 E6 478 E6 M11 481 E6 518 E6 52 E6 4975 E6 4375 E6 Moment invariant 748 75 74 73 748 M20 75 E6 57 E6 394 E6 207 E6 0264 E6 M02 0264 E6 209 E6 377 E6 57 E6 75 E6 11213 Template Matching Another technique for object recognition is model or template matching If a suitable line drawing of the scene is found the topological or structural elements such as total number of lines sides vertices and inter connections can be matched to a model Coordinate transformations such as rotation translation and scal ing can be performed to eliminate the differences between the model and the object resulted from position orientation or depth differences between them This technique is limited by the fact that a priori knowledge of the object models is needed for matching Therefore if the object is different from the models they will not match and the object will not be recognized Another major limitation is that if one object is occluded by other objects it will not match a model 11214 Discrete Fourier Descriptors Similar to a Fourier transform calculated for an analog signal a discrete Fourier transform DFT of a set of discrete points such as pixels can also be calculated This means that if the contour of an object within an image is found such as in edge detection the discrete pixels of the contour can also be used for DFT cal culations The result of DFT calculation is a set of frequencies and amplitudes in frequency domain that describe the spatial relationship of the points in question 14 To calculate the DFT of a set of points in a plane assume the plane is a realimaginary plane such that each point is described by an x iy relationship If the contour is completely traced around starting from any pixel Introduction to Robotics 456 and the locations of the points are measured the information can be used to calculate the corresponding frequency spectrum of the set Matching these frequencies with the frequencies found for possible objects in a lookup table may be used to determine the nature of the object In one unpublished experiment match ing eight frequencies yielded enough information about the nature of the object an airplane Matching 16 frequencies could determine the type of an airplane from a large class of planes An advantage of this technique is that the Fourier transform can very simply be normalized for size position and orientation A disadvantage of the technique is that it requires a complete contour of the object Of course other tech niques such as the Hough transform can be used to complete broken contours of the object 11215 Computed Tomography CT Tomography is a technique of determining the distribution of material density in the examined part In com puted tomography CT a 3D image of the objects density distribution is reconstructed from a large number of 2D images of the density taken by different scanning techniques such as Xrays or ultrasonics In CT it is assumed that the part consists of a sequence of overlaying slices Images of density distribution of each slice are taken repeatedly around the object Although partial coverage of the part has been used as well a com plete coverage of 360 is preferred The data is stored in a computer and subsequently is reduced to a 3D image of the parts density distribution that is shown on a monitor Although this technique is completely different from the other techniques discussed earlier it is a viable technique for object recognition In many situations either alone or in conjunction with other techniques CT may be the only way to recognize an object or to differentiate it from other similar objects Specifically in medical situations CT scans can be used in conjunction with medical robots where the 3D mapping of the internal organs of the human body may be used to direct the robot for surgical operations In general the images formed by this technique can still be processed like any other image Therefore the same routines and procedures are viable Similarly as shown earlier in Figure 1150 LiDAR can also be used to form images which can also be pro cessed and analyzed like other images 1122 Depth Measurement with Vision Systems Extracting depth information from a scene is performed using two basic techniques One is the use of range finders in conjunction with a vision system and imageprocessing techniques In this combination the scene is analyzed in relation to the information gathered by range finders about the distances of different portions of an environment or the location of particular objects or sections of the object Second is the use of binocular or stereo vision similar to humans and animals In this technique either simultaneous images from multiple cameras or multiple images from one camera that moves on a track are used to extract depth information As long as the scene does not change during this operation the results will be the same as the use of multiple cameras Since the location of the multiple usually two cameras in relation to any particular point in the scene is slightly different each camera develops a slightly different image By analyzing and measuring the differences between the two scenes depth information can be extracted 11221 Scene Analysis vs Mapping Scene analysis refers to the analysis of images developed by a camera or other similar devices in which a complete scene is analyzed In other words the image is a complete replica of the scene within the reso lution limit of the device where all the details of the scene are included in the image In this case more processing is generally required to extract information from the image but more information can be extracted For instance in order to identify an object within a scene the image may have to be filtered and enhanced segmented by edge detection or thresholding the part isolated by region growing and then Image Processing and Analysis with Vision Systems 457 identified by extracting its features and comparing them to a template or lookup table On the other hand mapping refers to drawing the surface topology of a scene or object where the image consists of a set of discrete distance measurements usually at low resolutions The final image is a collection of lines that relate to the relative position of points on the object at discrete locations see Figure 1150 Since the image is already sliced less processing is required in analysis of mapped images but less information can be extracted from the scene Each technique has its own merits benefits and limitations and is used for dif ferent purposes including navigation 11222 Range Detection and Depth Analysis Range measurement and depth analysis are performed using many different techniques such as active ran ging 20 stereo imaging scene analysis and specialized lighting Humans use a combination of techniques to extract information about the depth and positional relationship between different elements of an image Even in a 2D image humans can extract useful information using details such as the changing size of similar ele ments and vanishing lines perspective shadows and changing intensity of textures and shades Since many artificial intelligence techniques are based on and are studied for understanding of the way humans do things a number of depthmeasurement techniques are designed after similar human operations 15 11223 Stereo Imaging An image is the projection of a scene into the image plane through an ideal lens Therefore every point in the image corresponds to a certain point in the scene However the depth information of the point is lost in this projection and cannot simply be retrieved from a single image When two images of the same scene are taken the relative depth of different points from the image plane can be extracted by comparing the two images the differences represent the spatial relationship between different points 16 17 Humans do the same auto matically by combining the two images and forming a 3D image 18 19 21 41 The stereo image used for depth measurement is considered a 25dimensional image Many more images are required to form a true 3D image Depth measurement using stereo images requires two operations 1 Determine the pointpairs in the two images that correspond to the same point in the scene This is called correspondence or disparity of the pointpair This is a difficult operation since some points in one image may not be visible in another or due to perspective distortion sizes and spatial relationships may be different in the two images 2 Determine the depth or location of the point on the object or in the scene by triangulation or other techniques Generally if the two cameras or the relative locations of a single camera used twice to get two images of a nonmoving static scene are accurately calibrated triangulation is relatively simple as long as enough cor responding points can be found Correspondence points can be determined by matching specific features such as corners or small segments from the two images However correspondence points can create matching problems depending on their locations Consider the two marks A and B in Figure 1170 In each case the two cameras see the marks as shown in Figure 1170ab Although the locations of the two marks are different the cameras see them similarly As a result the marks may be located wrongly unless additional information such as vanishing lengths are also considered The accuracy of depth measurement in stereo imaging is dependent on the angle between the two images and therefore the disparity However larger disparities require more searching over larger areas To improve the accuracy and reduce computation time multiple images of the same scene can be used 18 23 Introduction to Robotics 458 11224 Scene Analysis with Shading and Sizes Humans use the details contained in a scene to extract information about the locations of objects their sizes and their orientations One detail is the shading on different surfaces Although the smoothly changing inten sity of shades on surfaces is a source of difficulty in some other operations such as segmentation it can be indirectly used in extracting information about the depth and shape of objects Shading is the relationship between the orientation of the object and the reflected light If this relationship is known it can be used to derive information about the objects location and orientation Depth measurement using shades requires a priori knowledge of the reflectance properties of the object and exact knowledge of the light source As a result its utility is limited Another source of information for depth analysis is the use of texture gradients or the changes caused in textures as a result of depth changes These variations are due to changes in the texture itself which is assumed to be constant or due to changes in the depth or distance scaling gradient or due to changes in the orientation of the plane foreshortening gradient An example of this is the perceived change in the size of bricks on a wall By calculating the gradient of the brick sizes on the wall depth may be estimated 1123 Specialized Lighting Another possibility for depth measurement is utilizing special lighting techniques that yield specific results The specialized result can be used for extracting depth information Most of these techniques are designed for industrial applications where specialized lighting is possible and the environment is controlled The fol lowing is the theory behind one technique If a strip narrow plane of light is projected over a flat surface it generates a straight line However if the plane is not flat and an observer looks at the light strip in a plane other than the plane of light a curved or broken line will be observed Figure 1171 By analyzing the reflected light we can extract information about the shape of the object its location and orientation The same can be done with two planes of light such that in the absence of any object on the table the two strips intersect exactly on the surface but when an object is present the two strips of light develop two reflections The reflections are picked up by a camera and depth information is calculated and reported A commercial system based on this technique is called CONSIGHT a b A B Camera 2 Camera 1 A B B A Camera 1 Camera 2 A B A B A B Camera 1 Camera 2 Camera 1 Camera 2 Figure 1170 Correspondence problem in stereo imaging Image Processing and Analysis with Vision Systems 459 A disadvantage of this technique is that only information about the points that are lit can be extracted Therefore in order to have information about the complete image it is necessary to scan the entire object or scene 1124 Image Data Compression Electronic images contain large amounts of information and therefore require datatransmission lines with large bandwidth capacity The requirements for spatial resolution number of images per second and number of gray levels or colors for color images are determined by the required quality of the images Recent data transmission and datastorage techniques have significantly improved imagetransmission capability includ ing transmission over the Internet The following are some techniques that accomplish this task Although there are many different techniques of data compression only some of them directly relate to vision systems The subject of data transmission in general is beyond the scope of this book and will not be discussed here Image datacompression techniques are divided into intraframe within frame and interframe between frames methods 11241 Intraframe Spatial Domain Techniques In a technique called pseudorandom quantization dithering 22 random noise is added to the pixels gray values in order to maintain the same quality while reducing the number of bits This is done to prevent contouring which happens when the number of bits of a quantizer is reduced see Section 115 and Figure 118 These contours can be broken up by adding a small amount of broadband pseudorandom uniformly distributed noise called dither to the signal prior to sampling The dither causes the pixel to oscillate about the original quantization level removing the contours In other words the contours are forced to randomly make small oscillations about their average value A proper amount of noise will enable the system to have the same apparent resolution while the number of bits is reduced significantly Predictive coding refers to a class of techniques based on the theory that in highly repetitive images only the new information innovations need be sampled quantized and transmitted In these types of images many pixels remain without change in multiple images eg TV news sets Therefore the data transmission can be significantly reduced if only the changes between successive images are transmitted To do this a predictor is used to predict an optimum value for each pixel based on the information obtained from the previous images The update is the difference between the actual value of the pixel and the predicted value This value is Plane of light The image as seen by the camera Camera Light source Figure 1171 Application of specialized lighting in depth measurement A plane of light strikes the object The camera located at an angle other than the plane of light will see the reflection of the light plane on the object as a curved line The curvature of the line is used to calculate depth Introduction to Robotics 460 transmitted by the system to renew the previous image If in an image many pixels remain the same the innovations are few and transmission is reduced Example 1115 In a similar attempt to reduce the amount of data transmission in space by the Voy ager 2 spacecraft its computers were reprogrammed while in space to use a differential coding tech nique At the beginning of its space travel Voyagers system was designed to transmit information about every pixel at a 256 gray level scale This took 5120000 bits to transmit a single image not including error detection and correction codes which were about the same length Beginning with the Uranus flyby the system was reprogrammed to only send the difference between successive pixels rather than the absolute brightness of the pixels Consequently if there were no differences between successive pixels no information would be transmitted In scenes such as in space were the back ground is essentially black there are many pixels that are similar to their neighbors This reduced data transmission by about 60 23 Other examples of fixedbackground information include theatrical sets and industrial images In constant area quantization CAQ 24 25 data transmission is reduced by transmitting fewer pulses at lower resolution in lowcontrast areas compared to highcontrast areas This in effect is taking advantage of the fact that highercontrast areas have higherfrequency content and require more infor mation transmission than the lowercontrast areas 11242 Interframe Coding These methods take advantage of the redundant information that exists between successive images The dif ference between these and the intraframe methods is that rather than using the information within one image a number of different images are used to reduce the amount of information to be transmitted A simple technique to achieve this is to use a frame memory at the receiver The frame memory will hold an image and continually show it at the display When information about any pixel is changed the correspond ing location in the frame memory is updated As a result the rate of transmission is significantly reduced The disadvantage of this technique is that in the presence of rapidly moving elements flickering may happen 11243 Compression Techniques Two general methods are used for data compression In one method such as in zip archives called lossless compression codes are assigned to repetitive words phrases or values to reduce the size of the data file As the name implies in these methods no data is lost and consequently the original file may be reconstructed without any change or loss However the level of savings or compression in chromatic or achromatic gray images is not large because in these images pixels rarely have repeating patterns These methods however are more useful in particular situations For example in a binary file large areas blobs have similar values If the data is presented line by line such as in a facsimile scanned line by line the data may be compressed by coding the length of onoff sets of pixels rather than the value of each individual pixel Therefore many pixels with similar values can be represented by only specifying the starting point of each section and its length The second category covers methods that compress image data by reducing the information and therefore are called lossy compression including the popular JPEG Joint Photographers Expert Group compression 13 Although we will not discuss the elaborate sequence of steps taken in order to compress the data it should be mentioned that a lot of information is lost during this process although a much smaller file is generated when an image is saved or converted to JPEG format However unless the original detailed data is needed for other purposes or a picture must be zoomed in to extract information the human eye may not recognize the difference as much Image Processing and Analysis with Vision Systems 461 1125 Color Images White light can be decomposed into a rainbow of colors that span the range of 400700 nm wavelengths Although it is rather difficult to subscribe an exact value to any particular hue the primary colors of light are thought to be red green and blue RGB Theoretically all other hues and color intensities can be re created by mixing varying levels of the primary color lights although in reality the recreations are not truly accurate However in images most colors can be recreated using RGB colors To recreate color images the screen is composed of three sets of pixels interlaced sequentially RGBRGB Each set of pixels is recreated individually but simultaneously Due to the limited spatial res olution of our eyes we tend to mix the three images together and perceive color images However as far as image processing is concerned a color image is in fact a set of three images each representing the intensities of the three primary colors of the original image To convert a color chromatic image into a black and white achromatic image the intensities of the indi vidual colored files must be converted into gray values One method to do this is to take the average values of the three files for the same pixel location and to use that as a substitute for the gray value Therefore the histogram of a gray image shows the same exact values for all three channels of RGB For more information about the image processing of colored images refer to other resources such as 2 13 1126 Heuristics Heuristics is a collection of rules of thumb developed for semiintelligent systems in order to enable them to select a predetermined decision from a list based on the current situation Heuristics is used in conjunction with mobile robots but has applications in many fields Consider a mobile robot that is supposed to navigate through a maze Imagine the robot starts at a point and is equipped with a sensor that alerts its controller that the robot has reached an obstacle such as a wall At this point the controller has to decide what to do next Lets say the first rule is that when encountering an obsta cle the robot should turn left As the robot continues it may reach another wall turn left again and continue Suppose that after three left turns the robot reaches the starting point In this case should it continue to turn left Obviously this will result in a neverending loop The second rule may be to turn right if the first point is encountered Now imagine that after a left turn the robot gets to a dead end Then what A third rule may be to trace back the path until an alternate route can be found As you can see there are many different situations the robot may encounter Each one of these situations must be considered by the designer and a decision must be provided The collection of these rules is the heuristics rule base for the controller to intelligently decide how to control the motions of the robot However it is important to realize that this is not true intel ligence since the controller is not really making decisions but merely selecting from a set of decisions that have already been made If a new situation is encountered that is not in the rules base the controller will not know how to respond 26 1127 Applications of Vision Systems Vision systems may be used for many different applications including in conjunction with robots and robotic operations collaborative robots autonomous vehicles warehouses and many more Vision systems are com monly used for operations that require information from the work environment and include inspection nav igation part identification assembly operations surveillance control and communication Suppose that in an automatic manufacturing setting a circuit board is to be manufactured One important part in this operation is the inspection of the board at different states before and after certain operations A common method is to set up a cell where an image of the part is taken and subsequently modified improved and altered The processed image is compared to a lookup image If there is a match the part Introduction to Robotics 462 is accepted Otherwise the part is either rejected or repaired These imageprocessing and analysis operations are generally made up of the processes discussed earlier Most commercial vision systems have embedded routines that can be called from a macro program making it very easy to set up a system Vision systems are also used with collaborative robots to detect the presence of humans near the robot and to either change the mode to collaborative mode slowing down or to stop the robot when the arm is near a human In most cases the camera is mounted on the lower part of the arm to see the individuals body parts closer to the end of the robot The vision system may be part of the larger slew of sensors that together create a safe collaborative environment Vision systems have been used for many applications for example for locating radioactive pucks 27 ran dom bin picking 28 creating an automated brake inspection system 29 measuring robotic motions and external objects 30 food inspection such as texture of cookies and consistency of packaging 31 creating adaptive behavior for mobile robots 32 analyzing the health of agricultural crops 33 and many others In navigation the scene is usually analyzed for finding acceptable pathways obstacles and other elements that confront the robot 34 In some operations the vision system sends its information to an operator who controls the motions from a distance This is very common in telerobotics as well as in space applications 35 In some medical applications the surgeon guides the device through its operations whether a surgical robot or a small investigative exploratory device such as an angiogram 36 Autonomous navigation requires the integration of depth measurement with the vision system either by stereo vision analysis or by range finders It also requires heuristic rules of behavior for the robotic device to navigate around an environment 37 38 In another application 39 40 an inexpensive laser diode was mounted next to a camera The projected laser light was captured by the camera and was used to both measure the depth of a scene as well as to cal ibrate the camera In both cases due to the brightness of the laser light and bleeding effects the image con tained a large bright circular spot To identify the dot and separate it from the rest of the scene a histogram and thresholding operation were used Subsequently the circle was identified and skeletonized until only the center of the circle remained The location of the pixel representing the center of the circle was then used in a triangulation method to calculate the depth of the image or to calibrate the camera These simple examples are all related to what we have discussed Although many other routines are avail able the fundamental knowledge about vision systems enables you to proceed with an application and adapt to your application what vision systems have to offer 1128 Design Project There are many inexpensive digital cameras on the market that can be used to create a simple vision system They are simple small and lightweight and provide a simple image that can be captured by computers and be used to develop a vision system In fact many cameras come with the software to capture and digitize an image Standard still and video cameras can also be used for capturing images In this case although you can capture an image for later analysis due to the additional steps of downloading the image from the camera to the computer the image is not available for immediate use Additionally many programs such as Adobes Photoshop have many routines similar to what we have dis cussed in this chapter Additional routines may be developed using common computer languages such as C Many other routines may be downloaded from the public domain The final product will be a simple vision system that can be used to perform vision tasks This may be done independently or in conjunction with your 3axis robot and can include routines for parts identification and pick up the development of mobile robots and many other similar devices Most images shown in this chapter were captured and processed by standard digital cameras and the vision systems in the Mechanical Engineering Robotics laboratory at Cal Poly including MVS909 and Optimas vision systems and Photoshop Image Processing and Analysis with Vision Systems 463 1129 Summary In this chapter we studied the fundamentals of image processing to modify alter improve or enhance an image as well as image analysis through which data can be extracted from an image for subsequent applica tions This information may be used for a variety of applications including manufacturing surveillance nav igation and robotics Vision systems are very powerful tools that can be used with ease They are flexible and inexpensive There are countless routines that can be used for a variety of different purposes Most of these types of routines are created for specific operations and applications However certain fundamental techniques such as convolution masks can be applied to many classes of routines We have mostly concentrated on these types of techniques which enable you to adopt develop and use other routines and techniques for other applica tions The advances in technology have also created tremendous opportunities in this area There is no doubt that this trend will continue in the future as well References 1 Doudoumopoulos Roger OnChip Correction for Defective Pixels in an Image Sensor NASA Tech Briefs May 2000 p 34 2 Gonzalez RC Richard Woods Digital Image Processing PrenticeHall New Jersey 2002 3 Low Adrian Introductory Computer Vision and Image Processing McGraw Hill 1991 4 Horn BKP Robot Vision McGraw Hill 1986 5 Hildreth Ellen Edge Detection for Computer Vision System Mechanical Engineering August 1982 pp 4853 6 Olson Clark Image Smoothing and Edge Detection Guided by Stereoscopy NASA Tech Briefs September 1999 pp 6869 7 Groover M P et al Industrial Robotics Technology Programming and Applications McGraw Hill 1986 p 177 8 Hough PVC A Method and Means for Recognizing Complex Patterns US Patent 30696541962 9 Illingworth J J Kittler A Survey of the Hough Transform Computer Vision Graphics and Image Processing vol 44 1988 pp 87116 10 Kanade T Survey Region Segmentation Signal vs Semantics Computer Graphics and Image Processing vol 13 1980 pp 279297 11 Snyder Wesley Industrial Robots Computer Interfacing and Control Prentice Hall 1985 12 Haralick Robert M LG Shapiro Computer and Robot Vision Volume I Addison Wesley MA 1992 13 Russ John C J C Russ Introduction to Image Processing and Analysis CRC Press 2008 14 Gonzalez Rafael P Wintz Digital Image Processing Second Edition AddisonWesley Reading Mass 1987 15 Liou SP RC Jain Road Following Using Vanishing Points Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition 1986 pp 4146 16 Nevatia R Machine Perception PrenticeHall New Jersey 1982 17 Fu KS Gonzalez RC Lee CSG Robotics Control Sensing Vision and Intelligence McGraw Hill 1987 18 Marr D T Poggio A Computational Theory of Human Stereo Vision Proceedings of the Royal Society London B204 1979 pp 301328 19 Marr D Vision Freeman and Co 1982 20 Pipitone Frank TG Marshall A Widefield Scanning Triangulation Rangefinder for Machine Vision The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3949 Introduction to Robotics 464 21 Moravec HP Obstacle Avoidance and Navigation in the Real World by Seeing Robot Rover Stanford Artificial Intelligence Laboratory Memo AIM340 Sep 1980 22 Thompson JE A 36Mbits Television Coder Employing Pseudorandom Quantization IEEE Transactions on Communication Technology COM19 no 6 December 1971 pp 872879 23 Goldstein Gina Engineering the Ultimate Image The Voyager 2 Mission Mechanical Engineering December 1989 pp 3036 24 Pearson JJ RM Simonds Adaptive Hybrid and MultiThreshold CAQ Algorithms Proceedings of SPIE Conference on Advanced Image Transmission Technology vol 87 August 1976 pp 1923 25 Arnold JF MC Cavenor Improvements to the CAQ Bandwidth Compression Scheme IEEE Transactions on Communications COM29 no 12 December 1981 pp 18181822 26 Chattergy R Some Heuristics for the Navigation of a Robot The International Journal of Robotics Research vol 4 no1 Spring 1985 pp 5966 27 Wilson Andrew Editor Robot Vision System Locates Radioactive Pucks Vision Systems Design May 2002 pp 78 28 Using Vision to Enable Robotic Random Bin Picking Imaging Technology June 2008 pp 8486 29 Creating an Automated Brake Inspection System with Machine Vision Imaging Technology June 2008 pp 8890 30 Vision System Measures Motions of Robots and External Objects NASA Tech Briefs November 2008 pp 2426 31 Thilmany Jean Accessible Vision Mechanical Engineering July 2009 pp 4245 32 Adaptive Behavior for Mobile Robots NASA Tech Briefs August 2009 pp 5253 33 Imaging System Analyzes Crop Health Defense Tech Briefs August 2009 pp 3233 34 VisionBased Maneuvering and Manipulation by a Mobile Robot NASA Tech Briefs March 2002 pp 5960 35 Ashley Steven associate editor Roving Other Worlds by Remote Mechanical Engineering July 1997 pp 7476 36 Hallett Joe contributing editor 3D Imaging Guides Surgical Operations Vision Systems Design May 2001 pp 2529 37 SuperResolution Image Reconstruction SRIR NASA Tech Briefs November 2018 p 46 38 LiDAR New Eyes for Vehicle Autonomy Automotive Engineering JulyAugust 2018 pp 2428 39 Niku SB Active Distance Measurement and Mapping Using Non Stereo Vision Systems Proceedings of Automation 94 Conference July 1994 Taipei Taiwan ROC vol 5 pp 147150 40 Niku SB Camera Calibration and Resetting with Laser Light Proceedings of the 3rd International Conference on Mechatronics and Machine Vision in Practice September 1996 Guimaraez Portugal vol 2 pp 223226 41 Kulkarni Arun Computer Vision and Fuzzy Neural Systems Prentice Hall NJ 2001 Problems Please note If you do not have access to an image simulate the image by creating a file called Imn where m and n are the row and column indices of the image Then using the following image matrix create an image by substituting numbers 0 and 1 or graylevel numbers in the file In a binary image 0 represents off dark or background pixel while 1 represents on light or object pixels In gray images each pixel is represented by a corresponding grayness level value A computer routine can then be written to access this file for image data The result of each operation can be written to a new file such as Rmn where R represents result of the oper ation and m and n are the row and column indices of the resulted file Alternately you may use your own graphics system or any commercially available graphics language to create access and represent an image Image Processing and Analysis with Vision Systems 465 111 Calculate the necessary memory requirement for a still color image from a camera with 10 mega pixels at 8 bits per pixel 256 levels 16 bits per pixel 65536 levels 112 Consider the pixels of an image with values as shown in Figure P112 as well as a convolution mask with the given values Calculate the new values for the given pixels 113 Consider the pixels of an image with values as shown in Figure P113 as well as a convolution mask with the given values Calculate the new values for the given pixels Substitute 0 for negative grey levels What conclusion can you make from the result 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a c d e f g h i j k l m n o p b Figure 1172 A blank image grid 4 7 1 8 3 4 8 6 1 0 1 6 3 2 3 1 1 1 8 7 5 9 1 0 1 Figure P112 5 5 5 7 7 8 5 5 5 8 8 9 10 10 10 10 10 10 0 4 0 5 5 5 9 9 8 1 0 1 8 8 8 9 9 10 1 0 1 Figure P113 Introduction to Robotics 466 114 Repeat Problem 113 but substitute the absolute value of negative grey levels What conclusion can you make from the result 115 Repeat Problem 113 but apply the mask shown in Figure P115 and compare your results with Problem 113 Which one is better 116 Repeat Problem 113 but apply the mask shown in Figure P116 and compare your results with Prob lem 113 Which one is better 117 Repeat Problem 113 but apply the mask shown in Figure P117 and compare your results with Prob lem 113 Which one is better 118 An image is represented by the values shown a Find the value of pixel 2d when mask 1 is applied b Find the value of pixel 3c when mask 2 is applied c Find the values of pixels 2b and 3c when a 3 3 median filter is applied d Find the area of the major object that results when a threshold of 45 is applied based on 4 connectivity start at the first onpixel 1 0 1 0 4 0 1 0 1 Figure P115 0 1 0 1 4 1 0 1 0 Figure P116 1 1 1 1 8 1 1 1 1 Figure P117 a b c d e 1 4 9 6 2 6 1 1 1 0 1 0 2 4 4 7 8 6 1 1 1 1 4 1 3 5 2 6 5 3 1 1 1 0 1 0 4 1 6 5 9 2 Mask 1 Mask 2 5 3 8 4 4 7 Figure P118 Image Processing and Analysis with Vision Systems 467 119 An image is represented by the values shown a Find the value of pixel 3b when mask 1 is applied b Find the values of pixels 2b 2c 2d when mask 2 is applied c Find the value of pixel 3c when a 5 5 median filter is applied d Find the area of the major object that results when a threshold of 45 is applied based on 4 connectivity start at the first onpixel 1110 Write a computer program for the application of a 3 3 averaging convolution mask unto a 15 15 image 1111 Write a computer program for the application of a 5 5 averaging convolution mask unto a 15 15 image 1112 Write a computer program for the application of a 3 3 highpass convolution mask unto a 15 15 image for edge detection 1113 Write a computer program for the application of an n n convolution mask unto a k k image You should write the routine such that the user can choose the size of the mask and the values of each mask cell individually 1114 Write a computer program that will perform the LR search routine for a 15 15 image 1115 Using the LR search technique find the outer edge of the object in Figure P1115 a b c d e 1 8 9 6 2 5 0 1 0 1 1 1 2 4 6 2 4 6 1 4 1 2 2 2 3 6 7 5 6 5 0 1 0 1 1 1 4 1 10 5 9 4 Mask 2 5 2 8 4 3 2 Mask 1 Figure P119 2 3 4 5 6 7 8 9 10 11 12 13 1 h i j k l m a b c d e f g Figure P1115 Introduction to Robotics 468 1116 Using the LR search technique find the outer edge of the object in Figure P1116 1117 The x and y coordinates of five points are given as 25 0 42 54 76 and 858 Using the Hough transform determine which of these points form a line and find its slope and intercept 1118 The x and y coordinates of five points are given as 012 510 75 108 and 156 Using the Hough transform determine which of these points form a line and find its slope and intercept 1119 Write a computer program that will perform a regiongrowing operation based on 4connectivity The routine should start at the 11 corner pixel search for a nucleus grow a region with a chosen index number and after finishing that region continue searching for other nuclei until all object pixels have been checked 1120 Write a computer program that will perform a regiongrowing operation based on 4connectivity The routine should start at the 11 corner pixel search for a nucleus grow a region with a chosen index number and after finishing that region continue searching for other nuclei until all object pixels have been checked 1121 Using 4connectivity logic and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1121 2 3 4 5 6 7 8 9 10 11 12 13 1 h i j k l m a b c d e f g Figure P1116 1 3 4 4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1121 Image Processing and Analysis with Vision Systems 469 1122 Using 4connectivity logic and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1122 1123 Using 4connectivity and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1123 1124 Find the union between the two objects in Figure P1124 The union should start when the center of the mask matches the first 1 starting from top left 1 3 4 x4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1122 1 3 4 x4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Figure P1124 Introduction to Robotics 470 1125 Apply a singlepixel erosion based on 8connectivity on the image in Figure P1125 1126 Apply a onepixel dilation to the result of Problem 1125 and compare your result to Figure P1125 1127 Apply an open operation to Figure P1127 1128 Apply a close operation to Figure P1127 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1125 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1127 Image Processing and Analysis with Vision Systems 471 1129 Apply a skeletonization operation to Figure P1129 1130 Write a computer program in which different moments of an object in an image can be calculated The program should ask you for moment indices The results may be reported to you in a new file or may be stored in memory 1131 Calculate the M02 moment for the result of Problem 118d based on 4connectivity 1132 For the binary image of a key in Figure P1132 calculate the following Perimeter based on the LR search technique Thinness based on P2 Area Center of gravity Moment M01 about the origin pixel 11 and about the lowest pixel of a rectangular box around the key 22 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1129 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1132 Introduction to Robotics 472 1133 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1133 1134 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1134 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1133 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1134 Image Processing and Analysis with Vision Systems 473 1135 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1135 a b c d e f g h i j 1 2 3 4 5 6 7 8 9 10 x y Figure P1135 Introduction to Robotics 474 12 Fuzzy Logic Control 121 Introduction The robot picks up a small component and moves it slowly until it is pretty close to another part where they are to be assembled It then moves slightly until they are almost aligned inserts the part into the base and presses with some force until they are fully assembled It then moves relatively fast toward a third component to finish assembly This description of a task is an example of what fuzzy logic is about Lets look at the statement again noti cing the underlined words The robot picks up a small component and moves it slowly until it is pretty close to another part where they are to be assembled It then moves slightly until they are almost aligned inserts the part into the base and presses with some force until they are fully assembled It then moves relatively fast toward a third com ponent to finish assembly As you see a number of descriptors are used in this statement to describe certain conditions that are not very clear For example when we state that the robot picks up a small component what does small mean What do you consider to be small How slow is moving slowly These descriptions are in fact fuzzy And the statement continues to be fuzzy We also dont know exactly what is meant by pretty close or slightly or almost Obviously fuzzy statements are very common in everyday speech and they are constantly used in all matters of conversation We may have an understanding of the relative values but it is not clear what the actual values are What makes this even more even more interesting is that these fuzzy descriptions of events and other phenomena are context dependent Moving slowly means a different thing if it refers to a car compared to a robot A warm day in Alaska is very different from a warm day in Dallas or Rio de Janeiro and a warm day in Dallas means something entirely different if it happens in the summer or in winter As another example consider the description of pain by a patient to a doctor If a young child has just fallen and it really hurts the understanding of the doctor will be different than for someone who has had a serious accident and it really hurts The meaning of fuzzy values and how others interpret it is different and contextual We have learned to associate a certain range of meanings to particular descriptions and are capable of mak ing inferences related to the fuzzy descriptions In everyday conversations this seems to work However lets consider some simple examples where we need to have a better way of describing the situation Lets assume there is an expert system used to prescribe medicine to patients in remote areas where there is no access to doctors for routine problems The system asks the patient about his or her condition the symptoms pain fever coughing and so on and compares these conditions to a lookup table or bank of possible reasons and from that diagnoses the cause and prescribes a medicine Now suppose a patient is describing a sore throat If the sore throat is really bad or if the fever is about 100 how should the expert system associate meaning to these Now consider an autonomous vehicle that senses its distance to a vehicle ahead and is programmed to apply the brakes when the distance is smaller than a certain value We may use a control statement such as 475 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed IF DISTANCE 5 m APPLY BRAKES 121 This means that as soon as the distance is 5 m or less the system will fully apply the brakes However as you notice the system will not apply the brakes even if the distance is 51 m but will apply it fully as soon as the distance is 5 m Would this be appropriate Next consider a washing machine In most machines except for a simple timeofwash there are no other choices the user can make based on how much fabric is washed and how dirty the clothes are Would it not be better if there were a system where the water is tested for its cleanliness and the wash time is adjusted accord ingly In this case we need to know how to define clean water versus dirty water What is considered to be clean and how clean is clean and what is dirty and how dirty 122 Fuzzy Control What Is Needed Lets reconsider Eq 121 IF DISTANCE 5 m APPLY BRAKES One way to improve the flexibility of this control statement is to add another statement to it that would apply the brakes at a lower rate when the distance is a little larger and harder if it is smaller such as IF DISTANCE 6m APPLY BRAKES at 90 122 IF DISTANCE 5m APPLY BRAKES at 100 123 Now we have added a bit of flexibility to the system as it is not just dependent on a single value to operate but will also react differently depending on the distance Notice that for each statement the controller still reacts to a single threshold value it takes no action if the distance is a little larger than 6 m There are still two major problems with this type of control statement i If we intend to have control over a larger range of values numerous statements will be necessary to accommodate variations on desired values Imagine how many statements we need to have control over every foot of variation in distance ii Even if we do this and write control statements for all possible variations on a variable we still cannot accommodate fuzzy values of everyday spoken words As a result the medical expert system of the previous example would not be able to communicate with the patients and the washing machine would not be able to relate to dirty and clean water This is why we need to find a way of systematically defining fuzzy descriptions into useful engineering descriptions that a system can use This is done using a technique called fuzzy inference control In the next sections we will see how fuzzy inferences can be defined called fuzzy sets and fuzzification how a collection of control laws called fuzzy inference rules can be written and how to convert the results into a useful engi neering output called defuzzification The fuzzy control idea started with the publication of a paper by Lotfi Zadeh 1 Although by now there is much more to fuzzy logic we only discuss some fundamentals in this book related to developing a fuzzy logic controller for simple systems including robots For more informa tion refer to other references 2 3 4 123 Crisp Values vs Fuzzy Values In the previous examples all values mentioned in the statements are called crisp values A crisp value is a clearly defined value with one interpretation A crisp value of 15 ft means the same in any system and it is a clearly defined and measurable value It is also called a singleton value as opposed to a set of values that may be defined by a fuzzy value In contrast a fuzzy value is unclear and may be interpreted differently depending on the circumstances Introduction to Robotics 476 124 Fuzzy Sets Degrees of Truth and Membership To be able to use a fuzzy description in a control setting we define a fuzzy set whose members describe the fuzzy variable at different degrees of membership or truth Each value in the fuzzy set has a degree of mem bership within the set varying from 100 1 to 0 0 This means that in contrast to a crisp value that is the only true value and all other values relative to it are false a fuzzy set has fuzzy values with different degrees of truth varying from 100 to 0 true To understand this lets once again consider a washing machine and the following statement IF WATERSAMPLE CLEANWATER THEN WASHTIME 0 If we assume that CLEANWATER represents a purely clean water sample then as a crisp value when the water sample is purely clean no other material in the water the cleanwater statement is true and otherwise for all other samples even with a slight amount of impurity the statement is false and the water is not clean No deviation is allowed in that definition However in a fuzzy set defining CLEANWATER a purely clean water sample has a degree of membership of 100 or 1 in the set it is purely clean water But water with a slight amount of other material is still somewhat clean perhaps 95 Water with a little more foreign material is not as clean but perhaps 90 clean So every value in the set relates to some definition of clean water with only one single crisp value a singleton but also containing countless other cleanwater possibilities with different degrees of membership and different levels of truth In this case a dirty water sample can still be a part of a CLEANWATER set but may have a very low degree of membership On the other hand if we also define a fuzzy set called DIRTYWATER the purely clean water sample mentioned earlier has a degree of membership or truth of 0 in the DIRTYWATER set while the dirty water sample has a 100 degree of membership in that set The water with a 90 degree of membership in the CLEANWATER set may have a 15 degree of membership in the DIRTYWATER set as well So if we define two sets a water sample will have two defined values one in each set each with a different degree of membership Considering a general crisp rule as IFRULE THEN CONSEQUENCE 124 if RULE is 100 true CONSEQUENCE will be executed However in a fuzzy rule values are not necessarily 100 true although this occasionally happens they have degrees of membership in the set The corresponding defined membership value is used to calculate an output Assuming that two input variables called INPUT1 and INPUT2 are used in a system to control an output variable called OUTPUT we may write a general set of rules as IF INPUT1 degreeof membership in INPUT1SET AND INPUT2 degreeof membership in INPUT2SET THEN OUTPUT degreeof membership in OUTPUTSET In the next sections we discuss the process of fuzzification development of rules and defuzzification 125 Fuzzification Fuzzification is the process of converting input and output values into their membership functions The result of fuzzification is a set of graphs or equations that describe the degree of membership of different values in different fuzzy sets To fuzzify a variable its range of possible values is divided into a number of sets each describing a particular portion of the range Subsequently each range is represented by an equation or a graph that describes the degree of truth or membership of each value within the range The number of sets the range that each set Fuzzy Logic Control 477 represents and the type of representation is arbitrary and a choice of the designer As we see later these can be modified and improved when the system is simulated and analyzed A number of possible representations are available for each set If you create your own fuzzy system you may use any representation you find appropriate However when you use a commercial system you may be limited to what is available The following membership functions are common 5 Gaussian membership function As shown in Figure 121 this is a natural way to represent a distri bution Generally more mathematical operations are needed to use the Gaussian distribution as we will see next the Gaussian representation may be modified into simpler forms for easier application Trapezoidal membership function Figure 122 shows the common trapezoidal membership function used to represent a Gaussian function in a simpler way Here the membership function is repre sented by three simple lines requiring only four points Each section is a straight line and therefore the degree of membership for each value of the variable can easily be calculated from the line equations Triangular membership function This is also a very common membership function that simplifies a Gaussian function requiring only three points As shown in Figure 123 each section is a straight line Degrees of membership for each value of the variable are simply calculated from the line equations 0 1 Variable Figure 121 A Gaussian membership function 0 1 Variable Figure 122 A trapezoidal membership function 0 1 Variable Figure 123 A triangular membership function Introduction to Robotics 478 Zshaped and Sshaped membership functions These secondorder functions depicted in Figure 124 may be used to represent the upper and lower limits of a variable where the degrees of membership may remain the same 0 or 1 for a range of values A trapezoidal membership function with a vertical left or right side may be used as a simple model for S and Zshaped functions Other membership functions such as a πshaped function the product of two sigmoidal functions and the difference between two sigmoidal functions may also be available 5 However in most cases regardless of what representation may be eventually selected the fuzzy sets are initially specified with straight lines To see how these membership functions may be used lets consider an autonomous vehicle in which one variable is speed that may vary between 0 and 120 kmh To define the speed variable in fuzzy form we divide the desired range into a number of sets For the purpose of illustration lets use triangular and trapezoidal functions and assign corresponding speed ranges to sets of VERYFAST FAST MEDIUM and SLOW as shown in Figure 125 Each set contains a range of speeds where each value has a degree of membership As we discussed earlier any speed eg 26 kmh has corresponding membership values in different sets In this case the values are 023 in MEDIUM and 07 in SLOW Obviously the choice of functions ranges and number of sets is ours and may be modified as needed For example as you notice with the choices we made in Figure 125 there are gaps between sets where certain speeds belong only to one set We may later change these ranges and close the gaps to improve the response The membership functions modeled in this manner are easy to formulate by expressing two points on each segment All points on the line can then be easily identified As an example we may use the following arbi trary syntax to express the membership function for VERYFAST and FAST VERYFAST 700 1001 1201 125 FAST 500 701 1000 126 Based on these definitions all membership values on all sets can be calculated from the limits shown 0 1 Variable 0 1 Variable Figure 124 Z and Sshaped membership functions 0 Speed kmh Degree of Membership 0 05 1 023 07 SLOW MEDIUM FAST VERYFAST 20 40 60 80 26 120 100 Figure 125 Fuzzy sets for autonomous vehicle speed variable Fuzzy Logic Control 479 126 Fuzzy Inference Rules Fuzzy inference rules are the controller part of the system consisting of a collection of rules related to the fuzzy sets the input variables and the output variables and are meant to allow the system to decide what to do in each case The rules usually take one of the following forms depending on the number of input and output variables if condition then consequence if condition1 and or condition2 then consequence if condition1 and or condition2 then consequence1 and or consequence2 As an example for a system where the speed is one input variable load is the second input variable and the motor power is the output variable a fuzzy rule may be IF speed is FAST and load is MEDIUM then power is HIGH 127 or IF speed is FAST or load is MEDIUM then power is HIGH 128 Obviously these two rules will behave differently Based on commonly used truth tables in the first case both conditions must be true for the consequence while in the second case either condition results in a consequence However remembering that these are all rather fuzzy not crisp values they do not result in true or false consequences Therefore to evaluate the and and the or rules we use the following The result of an and operation is the minimum of the two values The result of an or operation is the maximum of the two values With this definition the system can check all the rules for the given inputs and calculate a corresponding output The logic system that checks the rules and finds the corresponding output is called a fuzzy inference engine You may write your own fuzzy inference engine or use commercial systems 5 The total number of rules is equal to the product of the numbers of sets of each input variable For example if there are three input variables with m n and p fuzzy sets the total number of rules is R m n p Equation 127 or 128 can also be demonstrated graphically in order to assist the designer in visualizing the relationships Figure 126 is the graphical representation of the equation When all the rules are deter mined they all may be represented together in a similar manner VERYFAST FAST SLOW LARGE RULES and HIGH and MEDIUM MEDIUM Figure 126 Graphical representation of rules Introduction to Robotics 480 127 Defuzzification Defuzzification is the conversion of a fuzzy output value to an equivalent crisp value for actual use As the fuzzy rules are evaluated and corresponding values are calculated the result will be a number related to the corresponding membership values for different output fuzzy sets As an example suppose that the output power setting for a motor is fuzzified into OFF LOW MEDIUM and HIGH The result of evaluating the rules may be say a 25 membership in LOW and a 75 membership in MEDIUM Defuzzification is the process of converting these values into a single number that can be sent to the motor controller A number of different possibilities exist for defuzzification We will consider two common and useful tech niques center of gravity and Mamdani inference method 9 1271 Center of Gravity Method In this method the membership value for each output variable is multiplied by the maximum singleton value of the output membership set to get an equivalent value for the output from the membership set in question These equivalent values for each set are added together and normalized by summation of the output mem bership values The following is a summary of this method 1 Multiply the membership degrees for each output variable by the singleton value of the output set 2 Add all of these together and divide by the summation of output membership degrees As an example suppose the values obtained for the output of a motor controller membership sets are 04 LOW and 06 MEDIUM and further suppose that the singleton value for LOW is 30 and for MEDIUM is 50 of full power The output value for the motor controller would then be Output 0 4 30 0 6 50 0 4 0 6 42 1272 Mamdani Inference Method In this method the membership function of each set is truncated at the corresponding membership value as in Figure 127 The resulting membership functions are then added together as an or function This means that all repeated areas are superimposed over each other as one layer only The result will be a new area that is representative of all areas once each The center of gravity of the resulting area is the equivalent output Mamdanis method can be summarized as follows 1 Truncate each output membership function at its corresponding membership value from the eval uation of rules SET 1 SET 2 SET 3 Variable m1 m2 Membership Functions Resulting Area Figure 127 Defuzzification based on Mamdanis method Fuzzy Logic Control 481 2 Add the remaining truncated membership functions with an or function in order to consolidate them into one area describing the output 3 Calculate the center of gravity of the consolidated area as the crisp output value Through the process of fuzzification evaluation of the rules and defuzzification an output value is calcu lated that can be applied to the output The following example demonstrates this procedure for the calcu lation of an output value Example 121 A semiautonomous wheelchair 7 for use by a blind user is to be designed where a forcefeedback joystick helps the user in navigating the wheelchair Sensors measure the distance between the wheelchair and obstacles or dropoffs as well as its velocity and the controller provides resistive force feedback to the users joystick Design the control system for the wheelchair based on fuzzy logic Solution Notice how this is in fact very similar to an autonomous robot except that the user provides the final actuating decision based on the resistance he or she feels at the joystick Based on the preceding dis cussion we follow the next three steps to design the system The MATLAB Fuzzy Logic Designer Tool box was used for the following simulation 1 Fuzzification In this part we develop the fuzzy sets relating to the two inputs and the output We assume that the range of distances in which we are interested is 010 ft the desired range of speed is 05 fps and the resistance varies between 0100 Figure 128 demonstrates the three fuzzy sets for the two inputs and one output We select four fuzzy sets FAR CLOSE NEAR and ADJACENT to express distances and three fuzzy sets SLOW FAST and VERYFAST to express speeds The out put resistance provided to the joystick is divided into five fuzzy sets of LOW MEDIUM HIGH 1 1 05 0 0 10 20 30 40 50 60 70 80 90 100 065 05 02 0 1 075 05 0 0 05 1 15 2 25 3 35 input variable Speed output variable Resistance 4 45 5 0 1 2 3 4 5 6 input variable Distance ADJACENT NEAR CLOSE FAR SLOW LOW MEDIUM HIGH VERYHIGH FULL FAST VERYFAST 7 8 9 10 Figure 128 Input and output fuzzy sets for Example 121 Introduction to Robotics 482 VERYHIGH and FULL Notice that there are gaps between some fuzzy sets limits Obviously we could have chosen other ranges for each membership function divided the ranges differently decided on different ranges of overlap for the functions or assigned asymmetrical membership functions This as in all design activities is based on the requirements of the system and the expe rience of the designer However we will study the response of the system later and if necessary will make adjustments 2 Development of the rules Since there are four membership functions for distance and three mem bership functions for speed there will be a total of 4 3 12 rules Table 121 and Figure 129 show the symbolic and graphical representations of the rules Notice that in each rule or control law one membership function for every input is considered The consequence for each rule is chosen based Table 121 Symbolic representation of the rules from Example 121 1 If Distance is FAR and Speed is SLOW then Resistance is LOW 2 If Distance is FAR and Speed is FAST then Resistance is LOW 3 If Distance is FAR and Speed is VERYFAST then Resistance is MEDIUM 4 If Distance is CLOSE and Speed is SLOW then Resistance is LOW 5 If Distance is CLOSE and Speed is FAST then Resistance is MEDIUM 6 If Distance is CLOSE and Speed is VERYFAST then Resistance is HIGH 7 If Distance is NEAR and Speed is SLOW then Resistance is MEDIUM 8 If Distance is NEAR and Speed is FAST then Resistance is HIGH 9 If Distance is NEAR and Speed is VERYFAST then Resistance is VERYHIGH 10 If Distance is ADJACENT and Speed is SLOW then Resistance is VERYHIGH 11 If Distance is ADJACENT and Speed is FAST then Resistance is FULL 12 If Distance is ADJACENT and Speed is VERYFAST then Resistance is FULL FAR CLOSE NEAR ADJACENT SLOW FAST VERYFAST R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 LOW MEDIUM HIGH FULL 075 0 0 0 VERYHIGH 02 0 0 0 0 065 065 075 0 0 0 0 02 02 075 075 0 0 02 065 0 0 065 02 065 Figure 129 Graphical representation of some of the rules in Example 121 Remaining rules can be similarly demonstrated but are not shown for clarity Fuzzy Logic Control 483 on the experience of the designer and the necessities of the design For example in Rule 1 if distance is FAR and speed is SLOW the consequence resistance at the joystick based on experience and the desired result of the rule is chosen as LOW However in Rule 11 the consequence for ADJA CENT and FAST is FULL in order to help the user immediately stop the wheelchair We cannot truly guess the consequence yet until the system is simulated and the response is checked If the output is not as desired the rules or membership functions may be adjusted until a satisfactory result is obtained Also notice that some of the rules could have been based on or instead of and To understand how the results are found lets look at some numbers Suppose the present dis tance is 43 ft and speed is 275 fps As shown in Figure 128 the resulting membership values will be 065 NEAR 02 CLOSE and 075 FAST All other membership values are zero Substituting these values into the corresponding rules also shown graphically in Figure 129 yields output membership values of 02 MEDIUM and 065 HIGH Remember that since we are using and logic the minimum value between the two numbers is selected So for example in Rule 5 the smaller of 075 and 02 is chosen 3 Defuzzification Now that we have found the output membership values we have to defuzzify these values to get a crisp power setting for the system We calculate the output value based on both the center of gravity method and the Mamdani inference method For the center of gravity method we multiply the output membership values by their correspond ing singleton values and then divide by the sum of the membership values to get Power 0 2 30 0 65 50 0 2 0 65 45 For the Mamdani inference method we first truncate the MEDIUM and HIGH functions at 02 and 065 values combine the two into a single area and calculate the center of gravity of the result ing area as shown in Figure 1210 The center of gravity of the resulting area can be calculated by taking the first moment of the area and dividing it by the total area and is calculated to be approximately at 55 which is somewhat different from the center of gravity method We will continue with this example later as we simulate and improve the system 1 05 02 065 0 0 10 20 30 40 50 60 70 80 90 100 output variable Resistance LOW MEDIUM HIGH VERYHIGH FULL Figure 1210 Application of the Mamdani inference method Introduction to Robotics 484 128 Simulation of a Fuzzy Logic Controller So far we have made a few somewhat arbitrary choices in the number of sets ranges of variables and rules which can have potentially detrimental effects on the outcome Consequently it is necessary that we simulate the system and analyze the results This is usually done through fuzzy logic programs such as MATLABs Fuzzy Logic Toolbox These systems simulate the fuzzy control system by running a fuzzy inference engine calculating the output for all possible input values and plotting the results The plot is used to check the rules and the membership functions and to see if they are appropriate and whether modifications are necessary to improve the output If necessary the rules or the fuzzy sets are modified until the output curves are as desired Figure 1211 is the 3D depiction of the output of the wheelchair from Example 121 from MATLABs Tool box When a satisfactory system is achieved the fuzzy program is converted to machine language or other realtime code and downloaded into a microprocessor controller The microprocessor runs the machine or the system based on the fuzzy control rules Although the process seems long it is actually relatively easy to do And it does add interesting intelligence to a machine As Figure 1211 shows there are certain areas within the output surface where although the input variables change the output of the system remains flat In certain systems this may be desirable For example for an automobiles transmission unless it is continuously variable CVT the output can only be a few discrete values first second third and so on In that case it is desirable to have a constant output for a range of inputs For systems where the output is continuous a smoothly varying output is more desirable Therefore the designer may choose to modify the input and output membership functions andor the rules to achieve a more continuously varying output surface Example 121 continued To improve the output of Example 121 lets modify the inputs by closing the gaps as shown in Figure 1212 The result of the simulation is shown too The output is much smoother Next we also try to improve the system by changing the membership functions from triangular and trapezoidal to Gaussian and Sshaped or Zshaped as shown in Figure 1213 In this example the out put is slightly smoother and more continuous 80 60 40 20 0 2 4 6 8 10 0 2 4 Speed Distance Resistance 2 4 6 2 4 Spee Figure 1211 The 3D output result of the wheelchair in Example 121 generated by MATLABs Fuzzy Logic Toolbox The graph can be used for modifying and adjusting the fuzzy sets or the rules for best output result Fuzzy Logic Control 485 1 ADJACENT NEAR SLOW FAST VERYFAST CLOSE FAR 05 0 1 05 0 0 05 80 60 40 20 Resistance 0 2 4 6 8 10 0 2 4 Speed Distance 1 15 2 25 3 35 input variable speed 4 45 5 0 1 2 3 4 5 input variable Distance 6 7 8 9 10 Figure 1212 The gaps between different sets of input membership functions are closed therefore improving the output of the system ADJACENT NEAR CLOSE SLOW FAST VERYFAST FAR 1 05 0 0 05 15 25 35 4 5 45 3 2 1 1 05 0 0 1 2 3 4 5 input variable Distance input variable Speed 6 7 8 9 10 LOW MEDIUM HIGH VERYHIGH FULL 1 05 0 0 10 20 30 40 50 output variable Resistance 60 70 80 90 100 80 60 40 20 0 2 4 6 8 0 2 4 10 Distance Resistance Speed Figure 1213 The input and output fuzzy set membership functions were modified to Gaussian and S or Z shaped functions to further improve the output Introduction to Robotics 486 129 Applications of Fuzzy Logic in Robotics Fuzzy logic control systems can be used for both controlling robots as well as adding intelligence to appli cations where other systems may be inadequate or difficult to use For example fuzzy logic was used to directly control the torque output of a switched reluctance motor by a current modulation scheme 8 Although fuzzy logic can be used for controlling robots in lieu of or in conjunction with classical control systems there are many other applications where fuzzy logic may be more appropriate if not the only way to control a function It is for this reason that the discussion of fuzzy logic has been presented here Through these applications a robot can become unique more intelligent and responsive or more useful As an example consider a mobile robot that is designed for rough terrain A fuzzy logic control system can be used to enhance the robot controller in deciding what action to take depending on the speed of the robot the terrain the robots power and so on Or imagine a robot whose end effector exerts a force pro portional to the size and weight of a part or a humanoid robot that shakes a humans hand based on the size and strength of the person Similarly the facial features of a humanoid robot may be modified based on fuzzy inputs received from the human counterpart whether the person is smiling sad frowning or angry or depending on work conditions see Figure 1214 In yet another example suppose that a robot is used to sort a bag of objects based on their colors according to the colors of the rainbow In these and countless other similar examples fuzzy logic may be the best choice to incorporate the intelligence needed to accom plish the task Additionally many peripheral devices are integrated with robots or work with a robot through their own controller In these cases too fuzzy logic may be incorporated into the processor for better performance Finally as has been mentioned previously collaborative robots are meant to work with humans Consequently fuzzy logic may be used to interpret the human interactions with the robot and enhance the relationship Example 122 In a particular application a robot with a vision system is used to sort diamonds by weight and by color and determine a price for the diamonds Design a fuzzy logic system to control the process Solution Diamonds are classified by carat weight color indicated by letters where A is extremely clear and other letters indicate tints of yellow in the diamond and clarity the size of inclusions The clearer the Figure 1214 Rethink Robotics Sawyer robot Source Reproduced with permission from Rethink Robotics GmbH Fuzzy Logic Control 487 diamond the smaller the inclusions and the larger the size the more expensive the diamond is per carat In this example we assume we are sorting the diamond by color and size carat weight only We assume that the vision system can take an image of the diamond and compare its color with a data bank of colors to estimate the color range We also assume that the weight of the diamond is measured by a scale for example the robot places the diamond on the scale and later removes it to an appropriate container depending on its value We further assume that the size of the diamonds falls in Small Medium Large and VeryLarge categories as shown in Figure 1215 The colors of the diamonds are divided into three color ranges D H and L The price per carat of the diamonds will be in the ranges of Ten Fifteen Twenty Thirty Forty and Fifty all times a normalized base price The rules as well as the result of the simulation of this system are shown in Figure 1216 As shown for every color and weight combination there is a corresponding price With this fuzzy logic system and only 12 rules a vision system could estimate the corresponding price range of dia monds automatically 1210 Design Project If you have access to a fuzzy logic control simulator you may want to develop a fuzzy logic control program for a mobile robot a specific task for a vision system or other similar applications The fuzzy logic control program may be written for either controlling the robot motions or other purposes For example you may write a fuzzy control heuristics program such that the robot will follow a certain path based on fuzzy inputs Additionally if you have access to a microprocessor the developed programs can be downloaded to the microprocessor as part of the control program it runs Small Medium Large VeryLarge 0 0 1 05 0 05 1 10 20 30 40 50 input variable Size input variable Color 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 D H L 0 0 05 1 5 10 15 20 25 30 Ten Fifteen Twenty Thirty 35 40 output variable Price 45 50 Forty Fifty Figure 1215 Fuzzy sets showing the input and the output from Example 122 Introduction to Robotics 488 1211 Summary In this chapter we discussed how a fuzzy logic control system may be developed simulated tested and used Fuzzy logic is a very powerful way of including nonexact concepts in everyday systems including definitions eg distance speed feelings eg pain hot cold and adjectives eg much less Although fuzzy logic sys tems may be applied to countless different situations we primarily discussed how they may be used in robot ics Applications in robotics can range from navigation control for mobile robots and telerobotic to expert systems and vision systems Fuzzy logic controllers are generally simulated with a simulator program and when it is verified that a system behaves as intended it is used in conjunction with the remaining control programs References 1 Zadeh Lotfi Fuzzy Sets Information and Control vol 8 1965 pp 338353 2 Cox Earl Fuzzy Logic for Business and Industry Charles River Media 1995 3 McNeill F Martin Ellen Thro Fuzzy Logic a Practical Approach Academic Press 1994 4 Kosko Bart Neural Networks and Fuzzy Systems a Dynamical Systems Approach to Machine Intelligence Prentice Hall 1992 5 MATLAB Fuzzy Logic Toolbox 1 lf Size is Small and Color is L then Price is Ten 2 lf Size is Medium and Color is L then Price is Fifteen 3 lf Size is Large and Color is L then Price is Twenty 4 lf Size is VeryLarge and Color is L then Price is Thirty 5 lf Size is Small and Color is H then Price is Fifteen 6 lf Size is Medium and Color is H then Price is Twenty 7 lf Size is Large and Color is H then Price is Thirty 8 lf Size is VeryLarge and Color is H then Price is Forty 9 lf Size is Small and Color is D then Price is Twenty 10 lf Size is Medium and Color is D then Price is Thirty 11 lf Size is Large and Color is D then Price is Forty 12 lf Size is VeryLarge and Color is D then Price is Fifty 50 40 30 20 10 100 100 50 50 Size Color Price 0 0 Figure 1216 The result of the simulation from Example 122 Fuzzy Logic Control 489 6 Mamdani EH Application of Fuzzy Logic to Approximate Reasoning Using Linguistic Synthesis IEEE Transactions on Computers vol c26 no 12 1977 pp 11821191 7 Sindorf Brent SB Niku Force Feedback Wheelchair Control masters thesis Mechanical Engineering Department Cal Poly San Luis Obispo 2005 8 Sahoo NC SK Panda PK Dash A Current Modulation Scheme for Direct Torque Control of Switched Reluctance Motor Using Fuzzy Logic Mechatronics The Science of Intelligent Machines vol 10 no 3 April 2000 pp 353370 Problems 121 Develop a fuzzy inference system for a robot where the force exerted at the hand and the velocity of the hand are the inputs and the power to the actuators is the output 122 Develop a fuzzy inference system for a humanoid robot in which the inputs may be the facial expres sions of a human counterpart such as angle of eyebrows and the size of the mouth and the output is the facial expression of the robot such as smiling frowning or sad 123 Develop a fuzzy inference system for a washing machine The inputs are how dirty the fabrics are and how many clothes are being washed and the output is the wash time 124 Develop a fuzzy inference system for a barbecue The inputs may be the thickness of the steak and how cooked or rare it is desired to be The output may be the temperature of the flame andor the time of cooking 125 Develop a fuzzy inference system for an automatic gearbox The inputs are the speed of the car and the load on the engine and the output is the gear ratio of the transmission 126 Develop a fuzzy logic system for a vision system in which the inputs are the intensities of the three colors of red green and blue RGB in a color image and the output is the relationship of the com bination to the colors of the rainbow 127 Develop a fuzzy inference system for grading a robotics course The inputs are your effort level in the course and your exam grade and the output is your letter grade Introduction to Robotics 490 Appendix A A1 Matrix Algebra and Notation A Review Throughout this book we use matrices to represent coordinates frames objects and motions In this appen dix certain characteristics of matrices that we need in our calculations are reviewed You must already have an understanding of matrix algebra to understand the use of matrices Therefore only a simple review is presented here A matrix is a collection of m rows and n columns of values represented in a bracket The dimensions of the matrix are m n and each element of the matrix is referred to as Aij A matrix whose number of rows and columns are the same is called a square matrix Matrix Transpose The transpose of a matrix Aji is another matrix AT ij where elements of each row and column are replaced as shown Aij a11 a12 a13 a21 a22 a23 and AT ij Aji a11 a21 a12 a22 a13 a23 A1 Matrix Multiplication Matrices can be multiplied by multiplying all the elements of each row by each column and replacing the summation in the corresponding rowcolumn location as follows Cij Aik Bkj d e f g h l p s q t r w dp eq fr ds et fw gp hq lr gs ht lw A2 As you see the result of an m n matrix multiplied by an n p matrix is an m p matrix Therefore the number of columns of the first matrix must be equal to the number of rows of the second matrix Also remember that unlike regular algebra the order of multiplication of matrices may not be changed In other words A B B A This can easily be demonstrated by the fact that if A is a 2 3 matrix and B is a 3 2 matrix then A B will yield a 2 2 matrix whereas B A will result in a 3 3 matrix which obviously is different However if more than two matrices are to be multiplied although their order cannot be changed the result is independent of which pairs of matrices are multiplied first As a result the following is true A B B A A3 491 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed but A B C A B C A B C A4 A B C AC BC and C A B CA CB A5 Diagonal Matrix A diagonal matrix is a matrix where all except the diagonal elements of the matrix are zero If all diagonal elements are 1 the matrix is a unit matrix which effectively acts as a 1 Premultiplying or postmultiplying any matrix by a unit matrix results in the same matrix Matrix Addition Matrix addition can be accomplished by adding each element of one matrix by the corresponding element of the other matrices Unlike matrix multiplication addition of matrices is commutative the order of addi tion is not important Obviously the dimensions of all matrices must be exactly the same for addition Therefore Aij Bij A B ij A6 A B C B A C C A B A7 Vectors A vector is a onedimensional matrix either a 1 m or an n 1 matrix Determinant of a Matrix The determinant of a matrix can be calculated as follows 1 Pick one row or column 2 Multiply each element in the chosen row or column by the determinant of the matrix that remains after the corresponding row and column of the element are dropped from the matrix each one with an alternating plus or minus sign Example A1 Calculate the determinant of the following matrix A a b c d e f g h i Solution First choose a row or column In this example we will pick the first row The determinant of the matrix is det A a eifh b difg c dheg Introduction to Robotics 492 Matrix Inversion This is an important operation in matrix representation of robots We will use matrix inversions for both inverse kinematics and for differential motions In this section two generalpurpose inversion techniques for square matrices are mentioned The inverse of a matrix is another matrix such that if the matrix is multiplied by the inverse the result is a unit matrix In general a matrix either has a left inverse or a right inverse If A A1 I where I is a unit matrix A1 is called a right inverse If A1 A I then A1 is called a left inverse Generally the left and right inverse matrices are not the same However a square matrix will have the same left and right inverse such that A A1 A1 A I In this case A1 is simply called an inverse and it may be premultiplied or postmultiplied by the square matrix yielding a unit matrix Method 1 For square matrices with nonzero determinants only the inverse of the matrix can be calculated by the following method 1 Calculate the determinant of the matrix 2 Transpose the matrix 3 Replace each element of the transposed matrix with its own minor this is called an adjoint matrix 4 Divide the adjoint matrix by the determinant to get the inverse Therefore A1 adj A det A A8 The minor for each element Aij of the matrix is the determinant of the matrix that remains after the row and column of the matrix containing the element are dropped multiplied by 1 i j This creates a sign matrix as shown in Eq A9 As an example we can write the following minors for the given matrix in Eq A9 A a b c d e f g h i with Sign A9 aminor eifh and bminor difg and hminor af cd Of course the minors for a matrix with larger dimensions will be similar but much more involved Example A2 Calculate the inverse of the following matrix A 1 0 1 0 1 4 5 2 1 Solution First we calculate the determinant of the matrix det A 1 1 8 0 0 20 1 0 5 7 5 2 Appendix A 493 The transpose of the matrix is AT 1 0 5 0 1 2 1 4 1 The adjoint of the matrix is Aadj AT minor 1 8 0 2 01 020 15 40 05 2 0 10 7 2 1 20 6 4 5 2 1 The inverse can be found by dividing the matrix by the determinant A1 3 5 1 0 5 10 3 2 2 5 1 0 5 To ensure that the result is correct you may multiply A by A1 1 0 1 0 1 4 5 2 1 3 5 1 0 5 10 3 2 2 5 1 0 5 1 0 0 0 1 0 0 0 1 Verify that A1 A results in a unit matrix as well Method 2 In this method we assume an inverse matrix of the following form exists such that when multiplied by the given matrix a unit matrix results a11 a12 a1i a21 ai1 aii x11 x12 x1i x21 xi1 xii 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 A10 where the xii matrix is the inverse of the A matrix that we are looking for Note that this represents a set of i2 equations and i2 unknowns If you multiply the first matrix A by the first column of the x matrix the result is the first column of the unit matrix Then there is a set of i equations that you have to solve for each column Example A3 Find the inverse of the following matrix using method 2 A 1 0 1 0 1 4 5 2 1 Solution Based on the previous we write Introduction to Robotics 494 1 0 1 0 1 4 5 2 1 x11 x12 x13 x21 x22 x23 x31 x32 x33 1 0 0 0 1 0 0 0 1 Multiplying the given matrix by the first column of the inverse matrix and equating it with the cor responding first column of the unit matrix yields the following three equations x11 x31 1 x21 4x31 0 5x112x21x31 0 and x11 3 5 x12 10 x13 2 5 Similarly if you multiply the given matrix by the second and then the third columns of the inverse matrix and equate each one with the second or third column of the unit matrix respectively you will get the remainder of the unknowns As you can see the result is exactly the same Please do this to verify that you get the same results Trace The sum of the diagonal elements of a matrix A is called traceA Therefore traceA n j 1 ajj Specifically the trace for the product of a vector of n elements and its transpose is trace V V T trace v1 v2 vn v1 v2 vn trace v2 1 v1v2 v1vn v2v1 v2 2 vnv1 v2 n n j 1 v2 j This is used in the calculation of kinetic energy in Chapter 6 Transpose of Products of Matrices The following is true If B C A then C T B T A T A11 Appendix A 495 For example we can see that the following is true a b c d e f ac be ad bf c e d f a b ac be ad bf ac be ad bf T A2 Calculation of an Angle from its Sine Cosine or Tangent There are many instances in robotic analysis when we need to determine the magnitude of an angle from sin θ cos θ or tan θ Although this seems to be a trivial matter in reality it is very important because there can be grave ambiguities in the answer resulting in erroneous values and preventing a robot controller from functioning properly This is true even with a calculator or a computer To understand this lets do a sim ple test Suppose you use your calculator to calculate sin 75 as 0966 If you enter the same number into your cal culator and calculate the angle from it you will find the same 75 However if you do the same with sin 105 you will find the same 0966 as before As a result if you calculate the angle again of course you will get 75 and not 105 Here lies the basic error The sine of two angles with equal distance from 90 is always the same and therefore the calculator always returns the smaller angle The same is true for the cos and tan of an angle the cos of the plus or minus of the same angle is the same while the tan of an angle is the same if 180 is added to it This is simply demonstrated by the trigonometric relationships as in Figure A1 In order to know the exact magnitude of an angle it is necessary to determine in what quadrant the angle lies This enables us to correctly know what the angle really is However to determine the quadrant of an angle it is necessary to know the signs of both the sine and the cosine of the angle If we know the signs of the sine and the cosine of the angle we can determine what quadrant it is in and based on that we can correctly calculate the angle In the previous example if you calculate the values of cos 75 and cos 105 you will notice that they are respectively 0259 and 0259 Considering both the sin and the cos of 75 and 105 we can easily determine the correct angles The same principle is true for tan of an angle In robotic calculations we will encounter the same situation where tan of angles are generally found If the simple atan arctan function of a calculator or computer is used it may yield an erroneous result But if both the sin and the cos of the angle are found and used in a function we can calculate the correct angle Some computer languages such as C MATLAB and FORTRAN have a function called ATAN2sin cos in which the values of the sine and cosine of the angle entered as arguments are automatically used to return the value of the angle In all other situations either with your calculator or other computer languages you will cos sin tan Figure A1 Trigonometric functions Introduction to Robotics 496 have to write such a function As a result it is generally necessary to find two equations for each angle one that yields the sine of the angle and one that yields the cosine of the angle Based on the signs of the two we determine the quadrant and therefore the correct value of the angle This will be emphasized throughout this book whenever possible The following is a summary of rules for calculating the angles in each quadrant You may program this into your robotic routines or your calculator for future use If sin is positive and cos is positive the angle is in quadrant 1 then angle atanα If sin is positive and cos is negative the angle is in quadrant 2 then angle 180 atanα If sin is negative and cos is negative the angle is in quadrant 3 then angle 180 atanα If sin is negative and cos is positive the angle is in quadrant 4 then angle atanα The program should also check to see if either the sin or the cos is zero In that case instead of calculating the tangent it should directly use the cosine or the sine to calculate the angle to prevent an error A3 Solving Equations with Sine and Cosine There are many situations where we find an equation of the form A sinθ B cosθ C There are at least three possible ways to solve an equation of this form Method 1 Lets define D A2 B2 We divide both sides of the equation by D A Dsinθ B Dcosθ C D Lets assume there is an angle α such that cosα A D sinα B D α ATAN2 B DA D Then sinθ cosα cosθ sinα CD sin θ α CD θ α sin1 CD Knowing α we can calculate θ without having to square the equation creating multiple solutions Method 2 We substitute sinθ tanθ 1 tan2θ and cosθ 1 1 tan2θ square and rearrange to get A tanθ 1 tan2θ B 1 1 tan2θ C A2tan2θ 1 tan2θ B2 1 tan2θ 2AB tanθ 1 tan2θ C2 A2tan2θ B2 2AB tanθ C2 C2tan2θ A2C2 tan2θ 2AB tanθ B2C2 0 This secondorder equation can be solved for tan θ from which θ can be calculated Appendix A 497 Method 3 We substitute cosθ 1sin2θ to get A sinθ B cosθ C A sinθC B 1sin2θ A2sin2θ C22AC sinθ B2B2sin2θ A2 B2 sin2θ2AC sinθ C2B2 0 From which sin θ and then θ can be found In all three methods at least two solutions for each angle may be found Problems A1 Show that the determinant of a matrix can be calculated by picking any row or column A2 Calculate the determinant of the following 4 4 matrix A 1 1 0 0 0 1 2 0 3 0 1 1 1 0 0 1 A3 Calculate the inverse of the following matrix using method 1 B 1 1 2 0 1 0 2 0 3 A4 Calculate the inverse of the following matrix using method 2 C 1 0 1 0 2 1 3 1 0 Introduction to Robotics 498 Appendix B ImageAcquisition Systems The following discussion is a very short presentation about digital imageacquisition systems Analog cam eras are no longer common There has been a tremendous explosion of dataprocessing capability in digital cameras from kilopixel range to megapixels and from bulky cameras to mini and micro sizes all in less than a decade This appendix only discusses the fundamental ways images are captured A digital camera is based on solid state technology Similar to other cameras a set of lenses is used to project the area of interest onto the image area of the camera The main part of the camera is a solid state silicon wafer image area which has hundreds of thousands to millions of extremely small photosensitive areas called photosites printed on it Each small area of the wafer is a picturecell or pixel As the image is projected onto the image area a charge is developed at each pixel location of the wafer proportional to the intensity of light at that location and therefore such a camera is called a charge coupled device CCD camera or a charge inte grated device CID camera The collection of charges if read sequentially represent the image pixels Figure B1 The wafer may have millions of pixels on an area with dimensions of a fraction of an inch Obviously it is impossible to have direct wire connections to all of these pixels to measure the charge in each one To read this tremendously large number of pixels once for each still image and up to 30 times a second for video images the charges on each line of pixels are moved to optically isolated shiftregisters next to each photo site moved down to an output line and read The result is that at each 30th of a second the charge in all pixel Light Electrode A B C A B C Figure B1 Image acquisition with a digital camera involves the development of a charge at each pixel location proportional to the light at the pixel The image is then read by moving the charges to optically isolated shiftregisters and reading them at a known rate 499 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed locations are read sequentially and stored or recorded The output is a discrete representation of the image a voltage sampled in time as shown in Figure B2 In addition to CCD cameras for visible light the same can be done for longwavelength infrared cameras which yield an image of the infrared emissions of the scene Sampled voltage Pixels Photosite Shift register Output Figure B2 Image data collection model Introduction to Robotics 500 Index a Absolute encoder 376 379 381 AC current 338 induction motor 338 motor 338 344 345 sunchronous motor 338 358 Acceleration 219 220 angular 219 225 235 centripetal 223 225 235 236 Coriolis 223 225 235 236 sensor 386 Accumulator 337 Accuracy 377 ACDC universal motor 338 Actuator electroactive polymer 331 364 hydraulic 331 335 linear 337 magnetostrictive 364 musclewire 331 364 piezoelectric 331 pneumatic 331 337 rotary 337 shapememory 364 Adjoint 493 Aliasing 413 Analog to digital converter ADC 321 360 375 410 Angle criterion 301 Angular acceleration 219 225 235 275 Angular momentum 229 Animatronics 28 Antistatic foam 388 Articulated 10 60 65 120 ASIMO 4 Aspect ratio 450 Asymmetry 150 Asymptote 301 314 ATAN2 496 Austenitic 364 Averaging filter 428 b Back emf 323 338 342 345 357 362 Bifilar stepper motor 351 355 Binary code 381 Binary morphology 444 Bipolar stepper motor 355 Bit 412 Bitmap 405 Block diagram 274 288 Bode diagram 313 320 Breakaway point 301 Breakdown voltage 357 Breakin point 301 Brushes 342 349 Brushless DC motor 338 345 349 Byte 360 412 c Caliper 354 Canstack stepper motor 349351 Capacitance 276 385 Capacitive 393 Capek Karel 3 Cartesian coordinates 9 35 60 Cartesian space 248 263 CAT scan 404 Center of area 452 Center of gravity 481 Centertapping 345 351 353356 Centripetal acceleration 223 225 229 235 236 Centroid 452 Cermet 379 Characteristic equation 294 298303 Chargecoupled device CCD 499 Chargeintegrated device CID 499 Chasless theorem 111 115 501 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed Chord length 450 Closed loop 274 286 291 300 314 Close operation 448 CMYK 404 Cobots 28 Coefficient of friction 333 Collaborative robot 28 240 347 463 487 Common normal 71 Commutator 342 344 349 Compensator 313 397 Complex conjugate 283 295 Compliance 332 336 398 Compression 461 Computed tomography 404 457 Conductive polymer 379 Connectivity 424 443 446 Constant area quantization CAQ 461 Continuous trajectory 267 Contrast 416 Convolution mask 419 427 Cooperating robots 91 241 347 Coordinates Cartesian 35 60 cylindrical 35 60 61 rectangular 60 spherical 35 60 63 Coriolis acceleration 223236 Correspondence 458 Coupled angles 66 198 Coupling inertia 229 Crisp value 476 Critical damping 292 295 298 301 Current frame 52 Cylindrical coordinates 10 35 60 d Damping 275 292 303 324 coefficient 326 ratio 292 Data compression 460 DC brushed motor 338 current 342 motor 338345 Decoupling 66 85 89 122 Deflection 35 Deformation 332 Defuzzification 476 481 Degeneracy 91 208 Degrees of freedom DOF 7 35 43 93 133 143 147 154 160 208 220 338 DenavitHartenberg 35 70 93 119 139 173 197 199 230 Depth analysis 458 Depth measurement 403 457 459 Detent torque 348 Determinant 56 208 483 Dexterity 93 Differential dithering 338 motion 173 177 264 240 operator 181 183 188 Digital control 320 Digital to analog converter DAC 320 360 Dilation 444449 Direct drive DC motor 338 electric motor 331 346 system 333 Directional cosine 41 43 114 Direction vector 39 Discrete Fourier descriptors 456 Discriminant 146 283 Disk motor 343 Disparity 458 Displacement sensor 383 Dithering 460 Dominant frequency 406 Dual arm robot 29 91 e Eccentricity 450 Eddy current 339 393 Edge detection 419 430437 440 Edge detectors leftright 435 Prewitt 434 Roberts 434 Sobel 434 Effective moment of inertia 229 Electric motor 331338 Electroactive polymer actuator EAP 331 364 Electromotive force 338 Encoders 345347 379385 absolute 379 381 incremental 379 optical 380 velocity sensor 385 Erosion 444449 Error signal 274 Estimator 319 Euler 65 68 Expert system 475 f Fast Fourier transform FFT 409 Feature extraction 450 Feedforward transfer function FFTF 286 288 303 Index 502 Fifthorder polynomial 255 260 Fill operation 448 Filters Gaussian 428 highpass 410 436 low pass 428 median 429 Final value theorem 292 280 Finite difference 432 First moment of area 452 Flexspline 366 Flux vector control 345 Force analysis static 239 Force decomposition 206 Force sensor 387 Forcing function 275 Foreshortening 459 Forward kinematics 35 59 120 133 140 151 Fourier series 406 Fourier transform 406 409 413 427 429 Fourthorder polynomial 260 Frameless motor 344 Frames current 52 Free body diagram 333 Frequency content 406 domain 313 406 409 427 429 response 376 spectrum 406409 413 429 Fully parallel robot 137 Fuzzification 476 Fuzzy control 476 description 475 inference 476 inference engine 480 inference rules 476 480 logic 487 sets 476 477 g Gain proportional 292 Gaussian elimination 191 filter 428 membership function 478 Global Positioning System GPS 384 Gradient 431 Gravity matrix 234 Gray code 381 Grey morphology 449 Greyness level 416 GruberKutzbach 135 Gyroscopic steering 369 h Halbach array 350 Half step operation 349 356 Halleffect sensor 345 380 384 Harmonic drive 365 Harmonics 409 Hbridge 363 Heat dissipation 248 339340 345 Heat generation 339 Heuristics 462 Hexapod 133 Higher order derivative 231 differentials 179 polynomial 267 Highpass filter 410 433 436 Histogram 406 415 428 434 450 equalization 416 Holding torque 356 Hollowrotor motor 343 Homogeneous matrix 42 45 56 114 233 Hough transform 437 457 Humanoid 487 Hydraulic actuator 331 pump 335 337 system 332 335 Hysteresis 322 339 i Image acquisition 499 analysis 403 449 averaging 428 binary 406 412 processing 403 415 424 450 sharpening 436 Incremental encoder 379 Independent joint control 323 Indexer 348 Indirect amplitude modulation 395 Inductance 276 324 Inductive 393 Inertia 143 154 219 233 275 333 339 343 357 Inertia tensor 233 Infrared sensor 389 Instantaneous center 398 Integral gain 307 Integrated hybrid servo 347 Integrator 311 Intercept 437 Interfacing 376 Interframe 461 Intraframe 460 Index 503 Inverse Jacobian 191 206 kinematics 35 59 64 69 84 89 120 133 137 140 191 248 259 264 Laplace transform 281 matrices 54 transformation matrix 54 j Jacobian 173 185 188 206 241 inverse 191 197 199 206 208 Jerk 255 Joint offset 73 83 Joint reference frame 12 Joint space 248 252 JPEG JPG 461 k Kinematics chain 134 147 forward 35 59 120 133 140 151 inverse 35 59 64 69 84 89 120 133 137 140 191 248 259 264 loop 134 Kinetic energy 222 229 232 Kirchhoffs law 276 Knot point 257 l Lag compensator 313 Lagrangian 220 229 234 Laplace transform 278 281 313 316 325 Laplacian 432434 Lapsed time 393 Lead compensator 313 Leadlag compensation 313 Leadthrough 12 LeftRight edge detector 435 Liftoff 260 Light detection and ranging LiDAR 395 441 457 Linear actuator 337 Linearity 376 Linear magnetostrictive displacement transducer LMDT 383 Linear variable differential transformer LVDT 382 390 Logarithmic scale 313 Lookup table 450 Lossless compression 461 Lossy compression 461 Low pass filter 362 409 427 428 m Magnetic field 276 338 Magnetic flux 339 340 Magnetostrictive actuator 364 Magnetostrictive sensor 383 Magnitude criterion 300 Mamdani inference method 481 Manipulator 2 5 36 133 Mapping 457 Martensitic 364 Mask 430 Matrix adjoint 56 493 algebra 491 determinant 56 492 diagonal 492 homogeneous 42 56 inversion 493 multiplication 491 trace 495 transpose 56 491 unitary 56 Mechanism 35 174 177 208 219 249 398 Median filter 429 Membership function 477 Microelectromechanicalsystems MEMS 28 Microprocessor 7 320 358 360 Microstepping 357 Modulus of elasticity 332 Moment invariant 453 Moment of inertia 225 229 227 276 Moments 450451 Morphology 419 444 449 MOSFET 362 Motion control 273 Motion simulator 133 Motor AC 338 344 345 ACDC universal 338 AC induction 338 AC synchronous 338 358 bifilar stepper 351 355 bipolar stepper 355 brushless DC 345349 canstack stepper 349351 DC 338 341 345 DC brushed 338 DC brushless 338 direct drive DC 338 directdrive electric 331 346 disk 343 electric 331 338 frameless 344 hollowrotor 343 pancake 343 reactance 343 reversible AC 345 Index 504 servo 331 346 squirrelcage 344 stepper 331 338 3475 347 switched reluctance 338 unipolar stepper 355 Multiple inputoutput MIMO 314 Musclewire actuator 331 364 n Natural frequency 292 326 362 376 Neighborhood averaging 427 429 Neodymium 343 Newtonian mechanics 220 Nibble 360 Noise 415 409 437 Noise reduction 406 426 Nonlinear control 322 Nonlinearity 376 Nutating gear train 367 o Object recognition 430 450456 Offset 149 Open loop 36 274 313314 transfer function 285 Open operation 448 Operating pressure 332 Optical encoder 345 380 Outer arm 154 160 167 Overdamped 295 298 Overshoot 301 305 306 p Pancake motor 333 343 Parabolic blend 252 257 259 Parallel axes theorem 452 Parallel robot 11 36 133 206 Partial fraction expansion 281 292 296 Passive DOF 135 138 154 Payload 13 Peak time 293 Percentile 429 Percent overshoot 293 Permeability 382 Phoneme 397 Photodetector 380 Photosite 499 Phototransistor 379 389 Piezoelectric actuator 331 Pitch 65 111 120 125 Planetary gear train 365 Pneumatic actuator 331 337 Pointtopoint 90 Pole complex conjugate 283 distinct 281 mapping 294 placement 303 repeated 282 Polezero cancellation 311 mapping 294 Polynomial fifthorder 255 260 fourth order 260 higher order 267 thirdorder 252 260 Portable Gray Map PGM 405 Position sensor 378 Potential energy 222 229 234 Potentiometer 347 378 wire wound 379 Power to weight ratio 331 336 343 Precision 13 Predictive coding 460 Prewitt edge detector 434 Prismatic 9 71 120 134 141 147 167 230 240 323 Product of inertia 453 Programmable logic controller PLC 5 12 Proportional control 303 Proportional gain 292 303 307 Proportionalintegralderivative PID control 311 Proportionalplusderivative PD controllers 308 Proportionalplusintegral PI controllers 306 Prosthesis 26 Proximity sensor 391 Pseudo inertia matrix 233 Pseudorandom quantization 460 Pullout torque 356 Pulse width modulation PWM 361 q Quadrant 62 156 158 162 496 Quadratic equation 145 168 Quantization 410 r Rabota 3 Radius of curvature 398 Ramp function 278 Random noise 429 Range array acquisition 394 395 Range detection 376 458 Range finder 393 394 Rare earth metals 343 Reach 13 Reactance of motors 343 Reduction gears 333 336 Index 505 Reference frame joint 11 12 Reflectance 459 Region growing 430 440 nucleus 442 splitting 441 Reliability 377 Reluctance 349 352357 Remotecenter compliance RCC 397400 Repeatability 13 377 Reset position 77 83 98 120 124 148 156168 Residual torque 348 Residue 281 282 283 Resistance 276 387 Resolution 376 381 410 Resolver 345 347 383 Response time 376 Reversible AC motor 345 Revolute 9 71 120 134 147 230 240 323 Red green and blue RGB 405 412 462 RFID 387 Rise time 291 293 301 376 Roberts edge detector 434 Robot collaborative 28 463 487 dual arm 29 fixed sequence 2 four limbed 137 parallel 11 133 payload 13 playback 3 precision 13 repeatability 13 three limbed 137 validity 13 variability 13 workspace 13 Rodrigues rotation formula 113 Roll 65 Root locus 298 314 320 Rossums Universal Robots 3 Rotary actuator 337 Rotation matrix 56 s Sampling rate 410 412 Sampling theorem 320 412 413 Scalar 43 113 234 240 Scale factor 39 Scaling gradient 459 Scene analysis 457 Screw based mechanics 111 197 206 Screw based transformations 119 Second moment of area 452 Segmentation 430 440 Selective compliance 398 Selective Compliance Assembly Robot Arm SCARA 10 71 169 Sensitivity 376 Sensors 6 241 337 347 375 acceleration 386 antistatic foam 388 displacement 383 force 387 global reference frame GPS 384 Hall effect 380 384 infrared 389 light detection and ranging LIDAR 395 linear variable differential transformer LVDT 382 magnetostrictive 383 position 378 pressure 387 proximity 391 range finder 393 394 resolver 383 sniff 396 tachometer 385 tactile 389390 torque 388 touch 389390 velocity 385 voice recognition 396 Servo controller 273 Servomechanism 323 Servomotor 331 335 339 346 361 Set down 260 Set theory 444 Settling time 291 293 376 Shading 459 Shapememory metal 364 Singleinput singleoutput SISO 314 Singleton 476 Singularity 142 208 Skeletonization 444 446 447 Slope 437 Sniff sensor 396 Sobel operator 434 Spatial domain 406 419 427 Speed reduction 365 Spherical 10 134 147 160 167 center 137 coordinates 35 60 63 Spot checking 394 395 Squirrelcage motor 344 Stability 314 Statespace control 316 Static force analysis 239 Static position error 297 Index 506 coefficient 306 Steady state error 296 304 306 311 314 gain 290 292 value 280 Step function 278 292 306 Stepper driver 358 motor 331 338 345 347 translator 358 Stereo imaging 395 458 Stereo vision 457 StewartGough platform 133 147 152 208 Stiffness 275 287 332 336 Strain gauge 387 Successive transformations 119 Switched reluctance motor 338 Symmetrical parallel robot 136 System dynamics 275 323 System type 311 t Tachometer 325 347 385 Tactile sensor 389390 Taylor series 322 Template matching 456 Tensor 233 Thickening 446 Thinness 451 Thirdorder polynomial 252 260 Threephase AC motor 338 Threshold 434 Thresholding 406 415 418 430 442 TIFF 405 Time constant 290 295 376 delay 395 of flight 393 response 292 Timetoamplitude converter TAC 395 Tool reference frame 12 Torque constant 340 342 detent 348 residual 348 sensors 388 Touch sensor 389390 Trace 232 234 238 495 Trajectory 90 247 262 Transfer function 285 296 298 324 closedloop 286 feedforward 286 288 first order 290 291 higher order 295 open loop 285 297299 second order 292 295 Transformation 46 91 combined 50 relative 52 Transpose 491495 Trapezoidal membership function 478 Triangular membership function 478 Triangulation 393395 Twist angle 73 83 u Ultrasonic 392 Underdamped 283 295 298 Union 444 Unipolar stepper motor 355 Unit vector 179 v Validity 13 Variability 13 Vector 38 492 Vectorloop method 206 Velocity error 298 Velocity sensor 385 Via point 251 259 260 Virtual reality 384 Virtual work 240 242 Viscosity 336 Viscous coefficient of friction 276 Voice coil 346 Voice recognition 396 Voice synthesis 397 Voltage divider 378 Voxel 404 424 Voyager 461 w Walking machine 370 Wheatstone bridge 387 Workspace 13 37 133 World reference frame 11 y Yaw 65 z Zener diode 357 Zero 294 Zeropole cancellation 311 zplane 320 ztransform 321 Index 507 WILEY END USER LICENSE AGREEMENT Go to wwwwileycomgoeula to access Wileys ebook EULA
10
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
9
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
1
Dinâmica
CEFET/RJ
Texto de pré-visualização
SAEED B NIKU INTRODUCTION TO ROBOTICS ANALYSIS CONTROL APPLICATIONS THIRD EDITION with website WILEY Introduction to Robotics Introduction to Robotics MixQuestions are a little harder than the ones you saw in the previous section Use your knowledge of variables and expressions to work through these problems Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku PhD PE California Polytechnic State University California USA This edition first published 2020 2020 John Wiley Sons Ltd Edition History Prentice Hall 1e 2001 and John Wiley sons 2e 2011 All rights reserved No part of this publication may be reproduced stored in a retrieval system or transmitted in any form or by any means electronic mechanical photocopying recording or otherwise except as permitted by law Advice on how to obtain permission to reuse material from this title is available at httpwwwwileycomgopermissions The right of Saeed B Niku to be identified as the author of this work has been asserted in accordance with law Registered Offices John Wiley Sons Inc 111 River Street Hoboken NJ 07030 USA John Wiley Sons Ltd The Atrium Southern Gate Chichester West Sussex PO19 8SQ UK Editorial Office The Atrium Southern Gate Chichester West Sussex PO19 8SQ UK For details of our global editorial offices customer services and more information about Wiley products visit us at wwwwileycom Wiley also publishes its books in a variety of electronic formats and by printondemand Some content that appears in standard print versions of this book may not be available in other formats Limit of LiabilityDisclaimer of Warranty MATLAB is a trademark of The MathWorks Inc and is used with permission The MathWorks does not warrant the accuracy of the text or exercises in this book This books use or discussion of MATLAB software or related products does not constitute endorsement or sponsorship by The MathWorks of a particular pedagogical approach or particular use of the MATLAB software While the publisher and authors have used their best efforts in preparing this work they make no representations or warranties with respect to the accuracy or completeness of the contents of this work and specifically disclaim all warranties including without limitation any implied warranties of merchantability or fitness for a particular purpose No warranty may be created or extended by sales representatives written sales materials or promotional statements for this work The fact that an organization website or product is referred to in this work as a citation andor potential source of further information does not mean that the publisher and authors endorse the information or services the organization website or product may provide or recommendations it may make This work is sold with the understanding that the publisher is not engaged in rendering professional services The advice and strategies contained herein may not be suitable for your situation You should consult with a specialist where appropriate Further readers should be aware that websites listed in this work may have changed or disappeared between when this work was written and when it is read Neither the publisher nor authors shall be liable for any loss of profit or any other commercial damages including but not limited to special incidental consequential or other damages Library of Congress CataloginginPublication Data Names Niku Saeed B Saeed Benjamin author Title Introduction to robotics analysis control applications Saeed B Niku Description Third edition Hoboken Wiley 2020 Includes bibliographical references and index Identifiers LCCN 2019024969 print LCCN 2019024970 ebook ISBN 9781119527626 cloth ISBN 9781119527596 adobe pdf ISBN 9781119527602 epub Subjects LCSH Robotics Classification LCC TJ211 N547 2019 print LCC TJ211 ebook DDC 629852dc23 LC record available at httpslccnlocgov2019024969 LC ebook record available at httpslccnlocgov2019024970 Cover Design Wiley Cover Images 3D outline Robotic arm cherezoffGetty Images Blue abstract modern background PobytovGetty Images Set in 1113pt Warnock by SPi Global Pondicherry India 10 9 8 7 6 5 4 3 2 1 Dedicated to Shohreh Adam and Alan Niku and to Sara Niku and the memory of Saleh Niku 4 Tickets to the school play cost 4 for adults and 2 for children There were 42 people at the play and 124 was collected How many adults were there at the play Explain how you know Contents Preface xv About the Companion Website xix 1 Fundamentals 1 11 Introduction 1 12 What Is a Robot 2 13 Classification of Robots 3 14 What Is Robotics 3 15 History of Robotics 3 16 Advantages and Disadvantages of Robots 4 17 Robot Components 5 18 Robot Degrees of Freedom 7 19 Robot Joints 9 110 Robot Coordinates 9 111 Robot Reference Frames 11 112 Programming Modes 12 113 Robot Characteristics 13 114 Robot Workspace 13 115 Robot Languages 14 116 Robot Applications 17 117 Other Robots and Applications 23 118 Collaborative Robots 28 119 Social Issues 29 120 Summary 30 References 30 Problems 32 2 Kinematics of Serial Robots Position Analysis 35 21 Introduction 35 22 Robots as Mechanisms 35 23 Conventions 37 24 Matrix Representation 37 241 Representation of a Point in Space 37 242 Representation of a Vector in Space 38 243 Representation of a Frame at the Origin of a FixedReference Frame 40 244 Representation of a Frame Relative to a Fixed Reference Frame 41 245 Representation of a Rigid Body 42 25 Homogeneous Transformation Matrices 45 26 Representation of Transformations 46 vii 261 Representation of a Pure Translation 46 262 Representation of a Pure Rotation about an Axis 47 263 Representation of Combined Transformations 50 264 Transformations Relative to the Current Moving Frame 52 265 Mixed Transformations Relative to Rotating and Reference Frames 53 27 Inverse of Transformation Matrices 54 28 Forward and Inverse Kinematics of Robots 59 29 Forward and Inverse Kinematic Equations Position 60 291 Cartesian Gantry Rectangular Coordinates 60 292 Cylindrical Coordinates 61 293 Spherical Coordinates 63 294 Articulated Coordinates 65 210 Forward and Inverse Kinematic Equations Orientation 65 2101 Roll Pitch Yaw RPY Angles 65 2102 Euler Angles 68 2103 Articulated Joints 70 211 Forward and Inverse Kinematic Equations Position and Orientation 70 212 DenavitHartenberg Representation of Forward Kinematic Equations of Robots 70 213 The Inverse Kinematic Solution of Robots 84 2131 General Solution for Articulated Robot Arms 86 214 Inverse Kinematic Programming of Robots 89 215 DualArm Cooperating Robots 91 216 Degeneracy and Dexterity 92 2161 Degeneracy 92 2162 Dexterity 93 217 The Fundamental Problem with the DenavitHartenberg Representation 93 218 Design Projects 95 2181 StairClimbing Robot 96 2182 A 3DOF Robot 96 2183 A 3DOF Mobile Robot 98 219 Summary 99 References 99 Problems 99 3 Robot Kinematics with ScrewBased Mechanics 111 31 Introduction 111 32 What Is a Screw 111 33 Rotation about a Screw Axis 112 34 Homogenous Transformations about a General Screw Axis 115 35 Successive ScrewBased Transformations 119 36 Forward and Inverse Position Analysis of an Articulated Robot 120 37 Design Projects 127 38 Summary 127 Additional Reading 128 Problems 128 4 Kinematics Analysis of Parallel Robots 133 41 Introduction 133 42 Physical Characteristics of Parallel Robots 134 43 The DenavitHartenberg Approach vs the Direct Kinematic Approach 139 Contents viii 44 Forward and Inverse Kinematics of Planar Parallel Robots 140 441 Kinematic Analysis of a 3RPR Planar Parallel Robot 141 442 Kinematic Analysis of a 3RRR Planar Parallel Robot 143 45 Forward and Inverse Kinematics of Spatial Parallel Robots 147 451 Kinematic Analysis of a Generic 66 StewartGough Platform 147 452 Kinematic Analysis of a Generic 63 StewartGough Platform 152 453 Kinematic Analysis of a 3Axis RSSType Parallel Robot 154 454 Kinematic Analysis of a 4Axis RSSType Parallel Robot 160 455 Kinematic Analysis of a 3Axis PSSType Parallel Robot 167 46 Other Parallel Robot Configurations 169 47 Design Projects 169 48 Summary 170 References 170 Problems 170 5 Differential Motions and Velocities 173 51 Introduction 173 52 Differential Relationships 173 53 The Jacobian 174 54 Differential versus LargeScale Motions 176 55 Differential Motions of a Frame versus a Robot 177 56 Differential Motions of a Frame 178 561 Differential Translations 178 562 Differential Rotations about Reference Axes 178 563 Differential Rotation about a General Axis q 179 564 Differential Transformations of a Frame 181 57 Interpretation of the Differential Change 182 58 Differential Changes between Frames 183 59 Differential Motions of a Robot and Its Hand Frame 185 510 Calculation of the Jacobian 185 511 How to Relate the Jacobian and the Differential Operator 188 512 The Inverse Jacobian 191 513 Calculation of the Jacobian with ScrewBased Mechanics 197 514 The Inverse Jacobian for the ScrewBased Method 206 515 Calculation of the Jacobians of Parallel Robots 206 5151 The Jacobian of a Planar 3RRR Parallel Robot 207 5152 The Jacobian of a Generic 66 StewartGough Parallel Robot 208 516 Design Projects 210 5161 The 3DOF Robot 210 5162 The 3DOF Mobile Robot 210 517 Summary 210 References 211 Problems 211 6 Dynamic and Force Analysis 219 61 Introduction 219 62 Lagrangian Mechanics A Short Overview 220 63 Effective Moments of Inertia 229 64 Dynamic Equations for MultipleDOF Robots 229 641 Kinetic Energy 229 Contents ix 642 Potential Energy 234 643 The Lagrangian 234 644 Robots Equations of Motion 234 65 Static Force Analysis of Robots 239 66 Transformation of Forces and Moments between Coordinate Frames 242 67 Design Project 244 68 Summary 244 References 244 Problems 245 7 Trajectory Planning 247 71 Introduction 247 72 Path vs Trajectory 247 73 JointSpace vs CartesianSpace Descriptions 248 74 Basics of Trajectory Planning 249 75 JointSpace Trajectory Planning 252 751 ThirdOrder Polynomial Trajectory Planning 252 752 FifthOrder Polynomial Trajectory Planning 255 753 Linear Segments with Parabolic Blends 257 754 Linear Segments with Parabolic Blends and Via Points 259 755 HigherOrder Trajectories 260 756 Other Trajectories 263 76 CartesianSpace Trajectories 263 77 Continuous Trajectory Recording 267 78 Design Project 268 79 Summary 269 References 269 Problems 269 8 Motion Control Systems 273 81 Introduction 273 82 Basic Components and Terminology 273 83 Block Diagrams 274 84 System Dynamics 274 85 Laplace Transform 278 86 Inverse Laplace Transform 281 861 Partial Fraction Expansion When Fs Involves Only Distinct Poles 281 862 Partial Fraction Expansion When Fs Involves Repeated Poles 282 863 Partial Fraction Expansion When Fs Involves Complex Conjugate Poles 283 87 Transfer Functions 285 88 Block Diagram Algebra 288 89 Characteristics of FirstOrder Transfer Functions 290 810 Characteristics of SecondOrder Transfer Functions 292 811 Characteristic Equation PoleZero Mapping 294 812 SteadyState Error 296 813 Root Locus Method 298 814 Proportional Controllers 303 815 ProportionalPlusIntegral Controllers 306 816 ProportionalPlusDerivative Controllers 308 Contents x 817 ProportionalIntegralDerivative Controller PID 311 818 Lead and Lag Compensators 313 819 Bode Diagram and FrequencyDomain Analysis 313 820 OpenLoop vs ClosedLoop Applications 314 821 MultipleInput and MultipleOutput Systems 314 822 StateSpace Control Methodology 316 823 Digital Control 320 824 Nonlinear Control Systems 322 825 Electromechanical Systems Dynamics Robot Actuation and Control 323 826 Design Projects 326 827 Summary 327 References 327 Problems 327 9 Actuators and Drive Systems 331 91 Introduction 331 92 Characteristics of Actuating Systems 331 921 Nominal Characteristics Weight PowertoWeight Ratio Operating Pressure Voltage and Others 331 922 Stiffness vs Compliance 332 923 Use of Reduction Gears 332 93 Comparison of Actuating Systems 335 94 Hydraulic Actuators 335 95 Pneumatic Devices 337 96 Electric Motors 338 961 Fundamental Differences Between AC and DCType Motors 339 962 DC Motors 341 963 AC Motors 344 964 Brushless DC Motors 345 965 DirectDrive Electric Motors 346 966 Servomotors 346 967 Stepper Motors 347 97 Microprocessor Control of Electric Motors 360 971 Pulse Width Modulation 361 972 Direction Control of DC Motors with an HBridge 363 98 Magnetostrictive Actuators 364 99 ShapeMemory Type Metals 364 910 Electroactive Polymer Actuators EAPs 364 911 Speed Reduction 365 912 Other Systems 367 913 Design Projects 367 914 Summary 370 References 371 Problems 372 10 Sensors 375 101 Introduction 375 102 Sensor Characteristics 375 103 Sensor Utilization 377 Contents xi 104 Position Sensors 378 1041 Potentiometers 378 1042 Encoders 379 1043 Linear Variable Differential Transformer LVDT 382 1044 Resolvers 383 1045 Linear Magnetostrictive Displacement Transducer LMDT or MDT 383 1046 Halleffect Sensors 384 1047 Global Positioning System GPS 384 1048 Other Devices 385 105 Velocity Sensors 385 1051 Encoders 385 1052 Tachometers 385 1053 Differentiation of Position Signal 386 106 Acceleration Sensors 386 107 Force and Pressure Sensors 386 1071 Piezoelectric 386 1072 ForceSensing Resistor 386 1073 Strain Gauge 387 1074 Antistatic Foam 388 108 Torque Sensors 388 109 Microswitches 389 1010 Visible Light and Infrared Sensors 389 1011 Touch and Tactile Sensors 390 1012 Proximity Sensors 391 10121 Magnetic Proximity Sensors 391 10122 Optical Proximity Sensors 391 10123 Ultrasonic Proximity Sensors 392 10124 Inductive Proximity Sensors 392 10125 Capacitive Proximity Sensors 393 10126 Eddy Current Proximity Sensors 393 1013 Range Finders 393 10131 Ultrasonic Range Finders 394 10132 LightBased Range Finders 395 1014 Sniff Sensors 396 1015 Vision Systems 396 1016 VoiceRecognition Devices 396 1017 Voice Synthesizers 397 1018 Remote Center Compliance RCC Device 397 1019 Design Project 400 1020 Summary 400 References 401 11 Image Processing and Analysis with Vision Systems 403 111 Introduction 403 112 Basic Concepts 403 1121 Image Processing vs Image Analysis 403 1122 Two and ThreeDimensional Image Types 403 1123 The Nature of an Image 404 1124 Acquisition of Images 405 Contents xii 1125 Digital Images 405 1126 Frequency Domain vs Spatial Domain 406 113 Fourier Transform and Frequency Content of a Signal 406 114 Frequency Content of an Image Noise and Edges 409 115 Resolution and Quantization 410 116 Sampling Theorem 412 117 ImageProcessing Techniques 415 118 Histograms of Images 415 119 Thresholding 418 1110 Spatial Domain Operations Convolution Mask 419 1111 Connectivity 424 1112 Noise Reduction 426 11121 Neighborhood Averaging with Convolution Masks 427 11122 Image Averaging 428 11123 Frequency Domain 429 11124 Median Filters 429 1113 Edge Detection 430 1114 Sharpening an Image 436 1115 Hough Transform 437 1116 Segmentation 440 1117 Segmentation by Region Growing and Region Splitting 441 1118 Binary Morphology Operations 444 11181 Thickening Operation 446 11182 Dilation 446 11183 Erosion 447 11184 Skeletonization 447 11185 Open Operation 448 11186 Close Operation 448 11187 Fill Operation 448 1119 Gray Morphology Operations 449 11191 Erosion 449 11192 Dilation 449 1120 Image Analysis 449 1121 Object Recognition by Features 450 11211 Basic Features Used for Object Identification 450 11212 Moments 451 11213 Template Matching 456 11214 Discrete Fourier Descriptors 456 11215 Computed Tomography CT 457 1122 Depth Measurement with Vision Systems 457 11221 Scene Analysis vs Mapping 457 11222 Range Detection and Depth Analysis 458 11223 Stereo Imaging 458 11224 Scene Analysis with Shading and Sizes 459 1123 Specialized Lighting 459 1124 Image Data Compression 460 11241 Intraframe Spatial Domain Techniques 460 11242 Interframe Coding 461 11243 Compression Techniques 461 Contents xiii 1125 Color Images 462 1126 Heuristics 462 1127 Applications of Vision Systems 462 1128 Design Project 463 1129 Summary 464 References 464 Problems 465 12 Fuzzy Logic Control 475 121 Introduction 475 122 Fuzzy Control What Is Needed 476 123 Crisp Values vs Fuzzy Values 476 124 Fuzzy Sets Degrees of Truth and Membership 477 125 Fuzzification 477 126 Fuzzy Inference Rules 480 127 Defuzzification 481 1271 Center of Gravity Method 481 1272 Mamdani Inference Method 481 128 Simulation of a Fuzzy Logic Controller 485 129 Applications of Fuzzy Logic in Robotics 487 1210 Design Project 488 1211 Summary 489 References 489 Problems 490 Appendix A 491 Appendix B 499 Index 501 Contents xiv Preface This new third edition of the Introduction to Robotics textbook is the culmination of over a year of intense work If judging the previous edition by the number of instructors who adopted it the number of countries in which it was popularly sold and the number of languages into which it was translated indicates that it was a good book I hope that this new edition is even better It has two completely new chapters on screwbased mechanics and parallel robots it has many new examples and homework problems it has many new subjects in most chapters and the writing has been edited and streamlined throughout And still the old adage from one of my former students whose name I have long forgotten applies in the life of any product there comes a time when you have to shoot the designer and go into production For a book there comes a time that you have to shoot the author and go into publication The intention behind writing this book was and still is to cover most subjects that an engineering student or a practicing engineer who intends to learn about robotics may need to know whether to design a robot to integrate a robot in appropriate applications or to analyze a robot As such it covers all necessary funda mentals of robotics robot components and subsystems and applications The book is intended for senior or introductory graduate courses in robotics as well as for practicing engi neers who would like to learn about robotics Although the book covers a fair amount of mechanics and kinematics of both serial and parallel robots both with the DenavitHartenberg approach as well as screwbased mechanics it also covers microprocessor applications control systems vision systems sensors and actuators Therefore it can easily be used by mechanical engineers electronic and electrical engineers computer engineers and engineering technologists With the chapter about control theory even if the stu dent has not had a controls course he or she can learn enough material to be able to understand robotic control and design The book consists of 12 chapters Chapter 1 covers introductory subjects that familiarize the reader with the necessary background information This includes some historical information robot components robot char acteristics robot languages and robotic applications Chapter 2 explores the forward and inverse kinematics of serial robots including frame representations transformations position and orientation analysis as well as the DenavitHartenberg representation of robot kinematics Chapter 3 covers the kinematics of serial robots with screwbased mechanics Chapter 4 discusses parallel robots of many different types Chapter 5 continues with differential motions and velocity analysis of robots and frames Chapter 6 presents an analysis of robot dynamics and forces Lagrangian mechanics is used as the primary method of analysis and development for this chapter Chapter 7 discusses methods of path and trajectory planning both in joint space and in Cartesian space Chapter 8 covers fundamentals of control engineering including analysis and design tools Among other things it discusses the root locus proportional derivative and integral control as well as electrome chanical system modeling It also includes an introduction to multiple input multiple output MIMO sys tems digital systems and nonlinear systems However the assumption is that students will need additional instruction to be proficient in actually designing systems One chapter on this subject cannot be adequate but can nicely serve as an introduction for majors in which a separate course in control engineering is not offered Chapter 9 covers actuators including hydraulic devices electric motors such as DC servo motors and stepper motors pneumatic devices as well as many other novel actuators It also covers microprocessor control of xv these actuators Although this is not a complete mechatronics book it does cover a fair amount of mecha tronics Except for the design of a microprocessor many aspects of mechatronic applications are covered in this chapter Chapter 10 is a discussion of sensors used in robotics and robotic applications Chapter 11 covers vision systems including many different techniques for image processing and image analysis Chapter 12 discusses the basic principles of fuzzy logic and its applications in microprocessor control and robotics This coverage is not intended to be a complete and thorough analysis of fuzzy logic but an intro duction It is believed that students and engineers who find it interesting will continue on their own Appendix A is a quick review of matrix algebra and some other mathematical facts that are needed throughout this book Appendix B discusses digital image acquisition With the additional new chapters on screwbased mechanics and parallel robots it is almost impossible to cover everything in the book in a quarterbased class with 30 lectures in 10 weeks Therefore for quarter based classes the instructor must make some choices as to which subjects should be included Depending on other classes the student takes certain material may be skipped For example students at Cal Poly San Luis Obispo all take a required controls class and most have a mechatronics class Therefore we can skip chapters on these subjects However for a semesterbased 14week class with 3 lectures per week there is ample material and time to cover the entirety of the book The following breakdown can be used as a model for setting up a course in robotics in a quarter system In this case certain subjects must be eliminated or shortened as shown Introductory material and review 1 lecture Kinematics of position 6 lectures Screwbased mechanics 2 lectures Parallel robots 3 lectures Differential motions 4 lectures Robot dynamics and force control 2 lectures Path and trajectory planning 1 lecture Actuators 2 lectures Sensors 2 lectures Vision systems 5 lectures Fuzzy logic 1 lecture Exam 1 lecture Alternately for a 14week long semester course with 3 lectures per week the course may be set up as follows Introductory material and review 2 lectures Kinematics of position 7 lectures Screwbased mechanics 2 lectures Parallel robots 3 lectures Differential motions 5 lectures Robot dynamics and force control 4 lectures Path and trajectory planning 3 lectures Robot control and modeling 4 lectures Actuators 2 lectures Sensors 2 lectures Vision systems 5 lectures Fuzzy logic 1 lecture Exam 1 lecture The book also features design projects that start in Chapter 2 and continue throughout the book At the end of each chapter the student is directed to continue with the design projects in reference to the present sub ject Therefore by the end of the book they may complete their project Preface xvi I would like to thank all the people who in one way or another have helped me This includes my collea gues including Drs Bill Murray Charles Birdsong Lynne Slivovsky and John Ridgely all the countless indi viduals who did the research development and hard work that came before my time and that enabled me to learn the subject myself all the users and students and anonymous reviewers who made countless sugges tions to improve each edition Dr Thomas Cavicchi Dr Norali Pernalete Dr Fernando Gonzalez as well as my students Tomy Tran Jonathon Sather Jonathon Stearns and Trent Peterson and the students who helped with the design and development of projects at Cal Poly including the Robotics Club I also thank Sandra Grayson the acquisition editor at Wiley Louis Manoharan my project editor Sathishwaran Pathba nabhan my production editor Tiffany Taylor my copyeditor and the editors and the artists who made the book look as it does Finally I thank my family Shohreh Adam and Alan who always inspire me in every thing I do Their patience is much appreciated To all of you my sincere thanks I hope that you will enjoy reading the book and more importantly that you will learn the subject The joy of robotics comes from learning it Saeed Benjamin Niku PhD PE San Luis Obispo California 2019 Preface xvii 15 Juice Mix Selenas juice mix calls for 2 cups of lemonade for every 5 cups of cranberry juice If she wants to make 14 cups of juice mix how many cups of lemonade does she need 16 Car Trip Kym traveled 104 miles in 2 hours How many miles did she travel each hour 17 Snack Mix Evans party snack mix calls for 1 cup of pretzels for every 3 cups of cheese crackers If Evan wants to make 16 cups of snack mix how many cups of cheese crackers does he need About the Companion Website This book is accompanied by a companion website wwwwileycomgoniku3ed The website includes 1 Robotics related articles 2 Robotics related clips 3 Information about websites companies equipment manufacturers and service providers 4 New project ideas 5 Additional homework problems 6 Other robotics related material of interest 7 Additional comment and correctionserrata Scan this QR code to visit the companion website xix Memory Location Translator CONTINUED HEX DDDDDDDD DDDDDD7D7 ADDER TRANSLATOR 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 PA 00 01 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD DSP IFM MEM DEV FREE 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 AD 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 A A A A A A A A A A A A PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD PFD MOD VIA RES FREE FREE FREE FREE FREE 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 PA 00 01 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 PFD PFD PFD PFD PFD PFD PFD DSP IFM MEM DEV FREE FREE FREE FREE FREE 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 AD 10 11 12 13 15 16 17 18 19 20 21 22 23 24 25 27 28 29 30 31 32 A A A A A A A A A A A A FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21 22 23 24 25 26 27 28 29 30 31 PD 00 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 21 22 23 24 25 26 27 28 29 30 31 32 33 PD 00 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE FREE 55 Code snippet include stdioh int main int n i long long factorial 1 printfEnter an integer scanfd n if n 0 printfError Factorial of a negative number doesnt exist else for i 1 i n i factorial i printfFactorial of d llu n factorial return 0 153 FLIGHT CREW SINGLEPILOT OPERATIONS Singlepilot operations are those operations conducted with a single pilot in the flight deck crewmember compartment and where the single pilot is responsible for the safe conduct of the flight or segment of the flight SINGLEPILOT CREW OPERATING REQUIREMENTS Required Obstacles Clearance Altitude ROCA on all IFR flight segments Minimum Safe Altitude MSA or Minimum Reception Altitude MRA whichever is higher or Minimum IFR Altitude for all IFR flight segments Pilots must be fully qualified Flights must be conducted in accordance with the approved Charter operations specifications and company procedures The operator must have a flight watch capability for commercial operations Single pilot operations must be approved by the designerconstructor of the aircraft The pilot must possess an appropriate FAA commercial or ATP certificate If the pilot chooses or if the certificate holder requires a second crew member must be available to operate the aircraft Operators must notify the FAA prior to conducting singlepilot operations The pilot must be qualified to operate the specific aircraft make and model A flight following system must be in place and maintained Equipment malfunctions and system failures must be immediately reported Proper procedures must be followed for safe singlepilot operations Operators must provide adequate training for pilots conducting singlepilot operations 1 Fundamentals 11 Introduction Robotics the fascinating world of creating devices that mimic living creatures and are capable of perform ing tasks and behaving as if they are almost alive and able to understand the world around them has been on humans minds since the time we could build things You may have seen machines made by artisans which try to mimic humans motions and behavior Examples include the statues in Venices San Marcos clock tower that hit the clock on the hour figurines that tell a story in the fifteenth century astronomical clock on the side of the Old Town Hall tower in Prague and the systems that Leonardo da Vinci sketched in his notebooks Toys from very simple types to very sophisticated machines with repeating movements are other examples In Hollywood movies have even portrayed robots and humanoids as superior to humans Although humanoids autonomous cars and mobile robots are fundamentally robots and are designed and governed by the same basics in this book we primarily study industrial manipulatortype robots This book covers some basic introductory material that familiarizes you with the subject presents an analysis of the mechanics of robots including kinematics dynamics and trajectory planning and discusses the ele ments that are used in robots and in robotics such as actuators sensors vision systems and so on Robot rovers are no different although they usually have fewer degrees of freedom DOF and generally move in a plane Exoskeletal and humanoid robots walking machines and robots that mimic animals and insects have many DOF and may possess unique capabilities However the same principles we learn about manip ulators apply to robot rovers too whether kinematics differential motions dynamics or control Robots are very powerful elements of todays industry They are capable of performing many different tasks and operations are accurate and do not require common safety and comfort elements humans need including in hazardous environments such as underwater disaster areas and space However it takes much effort and many resources to make a robot function properly Most of the hundreds of com panies that made robots in the mid1980s are gone and with few exceptions only companies that make real industrial robots have remained in the market such as OMRON Adept Stäubli ABB FANUC KUKA Epson Motoman DENSO Fuji Yaskawa Kawasaki and Universal Robots as well as specialty robotic companies such as MAKO Surgical Corp and Intuitive Although there are several million robots working in factories and the numbers are growing early industrialists predictions about the pos sible number of robots in industry never materialized because high expectations could not be met with the present robots Innovations such as artificial intelligence embedded in robots and new types of robots such as parallel robots have improved the situation and will continue to do so However robots are used where they are useful Like humans robots can do certain things but not others As long as they are designed properly for the intended purposes they are very useful and continue to be used Current predictions indicate sustained growth in the number of robots used in industry in many different forms from manufacturing and assembly to selfdriving delivery robots and from autonomous vehicles to domestic workers 14 1 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed The subject of robotics covers many different areas Robots alone are hardly ever useful they are used together with peripheral devices and other manufacturing machines They are generally integrated into a system which as a whole is designed to perform a task or do an operation In this book we will refer to some of these other devices and systems that are used with robots 12 What Is a Robot If you compare a conventional robot manipulator with a crane attached to lets say a utility or towing vehicle you will notice that the robot manipulator is very similar to the crane Both possess a number of links attached serially to each other with joints where each joint can be moved by some type of actuator In both systems the hand of the manipulator can be moved in space and placed in any desired location within the workspace of the system Each one can carry a certain load and in each a central controller controls the actuators However one is called a robot and the other is called a manipulator or in this case a crane Similarly materialhandling manipulators that move heavy objects in manufacturing plants look just like robots but they are not robots The fundamental difference between the two is that the crane and the manipulator are controlled by a human who operates and controls the actuators whereas the robot manipulator is controlled by a computer or microprocessor that runs a program Figure 11 This difference determines whether a device is a simple manipulator or a robot In general robots are designed and meant to be controlled by a computer or similar device The motions of the robot are con trolled through a controller under the supervision of the computer which is running some type of pro gram Therefore if the program is changed the actions of the robot will change accordingly The intention is to have a device that can perform many different tasks consequently it is very flexible in what it can do without having to be redesigned Therefore the robot is designed to be able to perform many tasks based on the running programs simply by changing the program The simple manipulator or the crane cannot do this without an operator running it all the time Different countries have different standards for what they consider a robot In American standards a device must be easily reprogrammable to be considered a robot Therefore manual handling devices devices that have multiple degrees of freedom and are actuated by an operator and fixedsequence robots devices a b Figure 11 a A Dalmec manipulator b a KUKA robot Although they are both handling large loads one is controlled by a human operator and the other is controlled by a controller Source Reproduced with permission from Dalmec USA and Kuka Robotics Introduction to Robotics 2 controlled by hard stops to control actuator motions on a fixed sequence which is difficult to change are not considered robots 13 Classification of Robots The following is a general list of classifications of devices that are considered robots Different countries have different classifications and consequently the number of robots in use in a country may be influenced by the definition Fixedsequence robot A device that performs the successive stages of a task according to a predeter mined unchanging method that is hard to modify Playback robot A human operator performs a task manually by leading the robot which records the motions for later playback The robot repeats the same motions according to the recorded information Numericalcontrol robot The operator supplies the robot with a movement program rather than teaching it the task manually Intelligent robot A robot with the means to understand its environment and the ability to successfully complete a task despite changes in the surrounding conditions under which it is to be performed 14 What Is Robotics Robotics is the art knowledge base and knowhow of designing applying and using robots in human endea vors Robotic systems consist of not just robots but also other devices and systems that are used together with the robots Robots may be used in manufacturing environments in underwater and space exploration in researching human and animal behavior for aiding the disabled for transportation and delivery for military purposes or even for fun In any capacity robots can be useful but need to be programmed and controlled Robotics is an interdisciplinary subject that benefits from mechanical engineering electrical and electronic engineering computer science cognitive sciences biology and many other disciplines 15 History of Robotics Disregarding the early machines that were made to mimic humans and their actions and concentrating on recent history we can see a close relationship between the state of industry the revolution in numeric and computer control of machinery nuclear material handling space exploration and the vivid imagination of creative people Starting with Karel Capek and his play RUR Rossums Universal Robots 5 and later movies like Flash Gordon Metropolis Lost in Space The Day the Earth Stood Still and Forbidden Planet 6 the stage was set for a machine to be built to do a humans job and of course R2D2 C3PO Robocop Transformers the Bicentennial Man and others continued the trend Capek dreamed of a scenario where a bioprocess could create humanlike machines devoid of emotions and souls who were strong beyond their masters and could be produced quickly and cheaply Soon the mar ket grew tremendously when all major countries wanted to equip their armies with hundreds of thousands of slave robotic soldiers who would fight with dedication but whose death would not matter Eventually the robots decided that they were actually superior to the humans took over the whole world and killed eve ryone In this story the word rabota or worker was coined and it is used even today After World War II automatic machines were designed to increase productivity and machinetool man ufacturers made numerically controlled NC machines to enable manufacturers to produce better products At the same time multiDOF manipulators were developed for work on nuclear materials Integration Fundamentals 3 between the NC capability of machine tools and the manipulators created a simple robot The first robots movements were controlled using strips of paper with holes which electric eyes could detect As industry improved the strip of paper gave way to magnetic tapes memory devices and personal computers and microprocessors The following is a summary of events that have marked changes in the direction of this industry 1922 Czech author Karel Capek wrote a story called RUR Rossums Universal Robots and introduced the word rabota worker 1946 George Devol developed the magnetic controller a playback device J Presper Eckert and John Mauchly built the ENIAC computer at the University of Pennsylvania 1952 The first numerically controlled machine was built at MIT 1954 Devol developed the first programmable robot 1955 Jacques Denavit and Richard Hartenberg developed kinematic notation for lowerpair mechanisms based on matrices 1961 US patent 2988237 was issued to Devol for Programmed Article Transfer a basis for Unimate robots 1962 Unimation was formed the first industrial robots appeared and GM installed its first robot from Unimation 1967 Unimation introduced the Mark II robot The first robot was imported to Japan for paint spraying applications 1968 An intelligent robot called Shakey was built at the Stanford Research Institute SRI 1972 IBM worked on a rectangular coordinate robot for internal use It eventually developed the IBM 7565 for sale 1973 Cincinnati Milacron introduced the T3 model robot which became very popular in industry 1978 The first PUMA robot was shipped to GM by Unimation 1982 GM and FANUC of Japan signed an agreement to build GMFanuc robots 1983 Robotics became a very popular subject both in industry as well as academia Many programs in the nation started teaching robotic courses 2000 The first ASIMO humanoid robot was introduced by Honda 2001 The FDA approved the use of the da Vinci surgical robot in the United States 2008 Universal Robots made the first collaborative robot cobot available to the market followed by Rethink in 2011 2010present Many new robots autonomous vehicles drones sensors and associated devices have appeared and have become common 16 Advantages and Disadvantages of Robots Robotics and automation can in many situations increase productivity safety efficiency quality and consistency of products Robots can work in hazardous environments such as radiation darkness hot and cold ocean bot toms space and so on without the need for life support comfort or concern for safety Introduction to Robotics 4 Robots need no environmental comfort like lighting air conditioning ventilation and noise protection Robots work continuously without tiring or fatigue or boredom They do not get mad do not have hangovers and need no medical insurance or vacation Robots have repeatable precision at all times unless something happens to them or unless they wear out Robots can be much more accurate than humans Typical linear accuracies are a few tenthousandths of an inch New waferhandling robots have microinch accuracies Robots and their accessories and sensors can have capabilities beyond those of humans Robots can process multiple stimuli or tasks simultaneously Humans can only process one active stimulus Robots replace human workers causing economic hardship worker dissatisfaction and resentment and the need for retraining the replaced workforce Robots lack the capability to respond in emergencies unless the situation is predicted and the response is included in the system Safety measures are needed to ensure that they do not injure operators and other machines that are working with them 7 This includes Inappropriate or wrong responses Lack of decisionmaking power Loss of power Damage to the robot and other devices Injuries to humans Robots although superior in certain senses have limited capabilities in Cognition creativity decision making and understanding Degrees of freedom and dexterity Sensors and vision systems Realtime response Robots are costly due to Initial cost of equipment and installation Need for integration into the manufacturing processes Need for peripherals Need for training Need for programming 17 Robot Components A robot as a system consists of the following elements which are integrated together to form a whole Manipulator or rover This is the main body of the robot which consists of the links joints and other structural elements of the robot Without other elements the manipulator alone is not a robot Figure 12 shows the manipulator part of an industrial 6axis robot End effector This is the part that is connected to the last joint hand of a manipulator and that generally handles objects makes connection to other machines or performs required tasks Figure 13 Robot man ufacturers generally do not design or sell end effectors In most cases all they supply is a simple gripper Generally the hand of a robot has provisions for attaching specialty end effectors that are specifically designed for a purpose It is the job of a companys engineers or outside consultants to select or design and install the end effector on the robot and to make it work for the given situation Welding torches paint spray guns gluelaying devices and parts handlers are but a few examples In most cases either the action of the end effector is controlled by the robots controller through the signals it sends to the end effector or the controller communicates with the end effectors controlling device such as a programmable logic controller PLC Fundamentals 5 Actuators Actuators are the muscles of the manipulators The controller sends signals to the actuators which in turn move the robots joints and links Common types are servomotors stepper motors pneumatic actuators and hydraulic actuators Other novel actuators are used in specific situations this will be discussed later in Chapter 9 Actuators are under the control of the controller Sensors Sensors are used to collect information about the internal state of the robot or to communicate with the outside environment The robot controller needs to know where each link of the robot is in order to know what the robots configuration is It is similar for a human when you wake up even without opening your eyes or when it is completely dark you still know where your arms and legs are This is because feedback sensors in your central nervous system embedded in muscle tendons send information to your brain The brain uses this information to determine the length of your muscles and consequently the state of your arms legs and so on The same is true for robots where sensors integrated into the robot send information about each joint or link to the controller which determines the configuration of the robot Also similar to your major senses of sight touch hearing taste smell and speech robots are equipped with external sensory Figure 12 The 6axis Yaskawa GP7 robot body Source Reproduced with permission from Yaskawa Electric a b Figure 13 End effectors a A FANUC robot Source Courtesy of Fanuc America Corp b A Sawyer robot Source Courtesy of Rethink Robotics GmbH Introduction to Robotics 6 devices such as a vision system touch and tactile sensors a speech synthesizer and so on that enable the robot to communicate with the outside world Controller The controller is rather similar to your cerebellum although it does not have the power of the brain it still controls your motions The controller receives its data from the processor the brain of the sys tem controls the motions of the actuators and coordinates the motions with the sensory feedback infor mation Suppose that in order for the robot to pick up a part from a bin it is necessary that its first joint be at 35 If the joint is not already at this magnitude the controller sends a signal to the actuator a current to an electric motor air to a pneumatic cylinder or a signal to a hydraulic servo valve causing it to move It then measures the change in the joint angle through the feedback sensor attached to the joint a potentiometer an encoder and so on When the joint reaches the desired value the signal is stopped In more sophisticated robots the velocity of the end plate and the force exerted by the robot are also controlled by the controller Processor The processor is the brain of the robot It calculates the motions of the robots joints based on the programs it runs determines how much and how fast each joint must move to achieve the desired loca tion and speeds and oversees the coordinated actions of the controller and the sensors The processor is generally a computer which works like all other computers but is dedicated to this purpose It requires an operating system programs and peripheral equipment like a monitor and it has the same limitations and capabilities In some systems the controller and the processor are integrated together into one unit In others they are separate units And in some although the controller is provided by the manufacturer the processor is not the manufacturer expects the user to provide their own processor Software Three groups of software programs are used in a robot i The operating system operates the processor ii Robotic software calculates the necessary motions of each joint based on the kinematic equa tions of the robot This information is sent to the controller This software may be at many different levels from machine language to sophisticated languages used by modern robots iii A collection of application oriented routines and programs are developed in order to use the robot or its peripherals for specific tasks such as assembly machine loading material handling and so on This includes additional vision routines when the robot is equipped with a vision system 18 Robot Degrees of Freedom As you may already know in order to locate a point in space we need to specify three coordinates such as x y and zcoordinates along the three Cartesian axes Three coordinates are necessary and adequate to com pletely define the location of the point Although different coordinate systems may be used to express this information they are always necessary However neither two nor four will be possible two is inadequate to locate a point in space and four is illogical as there is simply too much information For example a device like a crane can move to any location within its workspace To locate a rigid body a threedimensional object rather than a point in space we first need to specify the location of a selected point on it and therefore we require three pieces of information Next we also need to specify the orientation of the object to fully specify it in space This means that six pieces of information are needed to fully specify the location and orientation of a rigid body By the same token there need to be 6 degrees of freedom DOF available to fully place the object in space and also orientate it as desired For this reason robots need to have 6 DOF to be able to freely place and orientate objects within their workspace A robot that has 6 DOF can be requested to place objects at any desired location and orientation If a robot has fewer DOF we cannot arbitrarily specify any location and orientation for the robot it can only go to places and to orientations that the fewer joints allow To demonstrate this consider a robot with 3 DOF where it can only move along the x y and zaxes In this case no orientation can be specified all the robot can do is pick up a part and move it in space parallel to the reference axes The orientation always remains the same Now consider another robot with 5 DOF capable of rotating about the three axes but only moving along the x and yaxes Although you may specify any orientation desired the positioning of the part is only possible along the x and y but not z axes The same is true for any other robot configurations Fundamentals 7 A system with 7 DOF would not have a unique solution This means that if a robot has 7 DOF there are infinite ways it can position a part and orient it at the desired location In order for the controller to know what to do there must be an additional decisionmaking routine that allows it to pick only one of the infinite solutions As an example we may use an optimization routine to pick the fastest or the shortest path to the desired destination Then the computer has to check all solutions to find the shortest or fastest response and perform it Due to this additional requirement which can take much computing power and time no 7DOF robot is used in industry A similar issue arises when a manipulator robot is mounted on a moving base such as a mobile platform or a conveyor belt In either case the robot has an additional degree of freedom which based on the previous discussion is impossible to control The robot can be at a desired location and ori entation from infinite distinct positions on the conveyor belt or mobile platform However in this case the additional DOF are known and there is no need to solve for them When a robot is mounted on a con veyor belt or a track as shown in Figure 14 or is otherwise mobile the location of the base of the robot relative to the belt or other reference frame is known Since this location does not need to be defined by the controller the remaining number of DOF is still 6 and consequently unique As long as the location of the base of the robot on the belt or the location of the mobile platform is known or selected by the user there is no need to find it by solving the set of equations of robot motions and as a result the system can be solved Can you determine how many DOF the human arm has This should exclude the hand palm and fingers but should include the wrist Think about this before going on The human arm has three joint clusters the shoulder the elbow and the wrist The shoulder has 3 DOF since the upper arm humerus can rotate in the sagittal plane parallel to the midplane of the body in the coronal plane a plane from shoulder to shoulder and about the humerus verify this by rotating your arm about the three different axes The elbow has only one degree of freedom it can only flex and extend about the elbow joint The wrist also has 3 DOF It can abduct and adduct and flex and extend and since the radius bone can roll over the ulna it can rotate longitudinally pronate and supinate Consequently the human arm Figure 14 The robot can move along a track adding a degree of freedom to the system Source Reproduced with permission from Kuka Robotics Introduction to Robotics 8 has a total of 7 DOF even if the ranges of some movements are small Since a 7DOF system does not have a unique solution how do you think we can use our arms Note that the end effector of the robot is never included in the DOF count All robots have this additional capability which may appear to be similar to a degree of freedom However none of the movements in the end effector are counted towards the robots DOF In some cases the movements of a joint may not be fully controllable For example when a pneumatic actuator is used to move a joint it can only be fully turned on or off fully extended or fully retracted but nothing in between In this case the convention is to assign only a half a degree of freedom to the joint This means that the joint can only be at specified locations within its limits of movement Another possibility for a half degree of freedom is to assign only particular values to the joint For example suppose that a joint is made to be only at 0 30 60 and 90 degrees Then as before the joint is limited to only a few possibilities and therefore it has a partial degree of freedom Many industrial robots possess fewer than 6 DOF Robots with 35 4 and 5 DOF are in fact very common As long as there is no need for the additional DOF these robots perform very well As an example suppose that you intend to insert electronic components into a circuit board The circuit board is always laid flat on a known work surface consequently its height z value relative to the base of the robot is known There fore there is only a need for 2 DOF along the x and yaxes to specify any location on the board for inser tion Additionally suppose that the components are to be inserted in any direction about the vertical axis In that case there is a need for one degree of freedom to rotate about the vertical axis z in order to orient the component above the surface Since there is also a need for half a degree of freedom to fully extend the end effector to insert the part or to fully retract it to lift the end effector before moving only 35 DOF are needed 2 to move over the board 1 to rotate the component and 05 to insert or retract Insertion robots are very common and are extensively used in electronic industry Their advantage is that they are simple to program less expensive smaller and faster Their disadvantage is that although they may be programmed to insert components on any size board in any direction they cannot perform other jobs They are limited to what 35 DOF can achieve but they can perform a variety of functions within this design limit 19 Robot Joints Robots may have different types of joints such as linear rotary sliding and spherical Spherical joints are common in many systems but they possess multiple DOF and therefore are difficult to control Conse quently they are not common in robotics except in research 8 Most robots have either a linear prismatic or a rotary revolute joint Prismatic joints are linear there is no rotation involved They are either hydraulic or pneumatic cylinders or linear electric actuators These joints are used in gantry cylindrical or spherical robots Revolute joints are rotary and although hydraulic and pneumatic rotary joints are common most rotary joints are electrical driven either by stepper motors or more commonly by servomotors 110 Robot Coordinates Robot configurations generally follow the common coordinate frames with which they are defined as shown in Figure 15 Prismatic joints are denoted by P revolute joints are denoted by R and spherical joints are denoted by S Robot configurations are specified by a succession of P R andor S designations For example a robot with three prismatic and three revolute joints is specified by 3P3R The following configurations are common for positioning the hand of the robot Cartesianrectangulargantry 3P These robots use three prismatic joints to position the end effec tor usually followed by additional revolute joints that orient the end effector Fundamentals 9 Cylindrical PRP Cylindrical coordinate robots have two prismatic joints and one revolute joint for positioning the part plus revolute joints for orientation Spherical P2R Spherical coordinate robots follow a spherical coordinate system which has one prismatic and two revolute joints for positioning the part plus additional revolute joints for orientation Articulatedanthropomorphic 3R An articulated robots joints are all revolute similar to a humans arm They are the most common configuration for industrial robots Selective Compliance Assembly Robot Arm SCARA SCARA robots have two or three revolute joints that are parallel and allow the robot to move in a horizontal plane plus an additional prismatic joint that moves vertically Figure 16a SCARA robots are very common in assembly operations Cartesian Cylindrical Spherical Articulated SCARA Figure 15 Common robot coordinate frames for serial robots a b Figure 16 a A DENSO SCARA robot Source Courtesy of Denso Robotics b The Adept Quattro s650H robot Source Omron Automation 2018 Omron All Rights Reserved Introduction to Robotics 10 Their specific characteristic is that they are more compliant in the xy plane but are very stiff along the zaxis therefore providing selective compliance This is an important issue in assembly and will be discussed in Chapter 10 Parallel robots Parallel robots differ in their configuration from serial robots and are discussed in Chapter 4 Figure 16b shows a typical parallel robot 111 Robot Reference Frames Robots may be moved relative to different coordinate frames as follows resulting in different motions Figure 17 World reference frame This is a universal coordinate frame as defined by x y and zaxes In this case the joints of the robot move simultaneously in a coordinated manner to create motions along the three major axes In this frame no matter where the arm is a positive movement along the xaxis x y z World Reference Frame Joint Reference Frame x y z n o a y z Tool Reference Frame x n o a Figure 17 A robots World Joint and Tool reference frames Most robots may be programmed to move relative to any of these reference frames Fundamentals 11 is always in the plus direction of the xaxis and so on The World reference frame is used to define the motions of the robot relative to other objects define other parts and machines with which the robot communicates and define motion trajectories Joint reference frame This is used to specify movements of individual joints of the robot In this case each joint is accessed and moved individually and therefore only one joint moves at a time Depending on the type of joint used prismatic revolute or spherical the motion of the robot hand is different For instance if a revolute joint is moved the hand moves on a circle defined by the joint axis Tool reference frame This specifies movements of the robots hand relative to a frame attached to the hand consequently all motions are relative to this local noaframe Unlike the universal World frame the local Tool frame moves with the robot Suppose that the hand is pointed as shown in Figure 17 Moving the hand relative to the positive naxis of the local Tool frame moves the hand along the naxis of the Tool frame If the arm were pointed elsewhere the same motion along the local naxis of the Tool frame would be completely different from the first motion The same n axis movement would be upward if the naxis were pointed upward and it would be downward if the naxis were pointed downward As a result the Tool reference frame is a moving frame that changes continuously as the robot moves and the ensuing motions relative to it are also different depending on where the arm is and what direction the Tool frame has All joints of the robot must move simultaneously to create coordinated motions about the Tool frame The Tool reference frame is an extremely useful frame in robotic programming where the robot is to approach and depart from other objects or to assemble parts 112 Programming Modes Robots may be programmed in a number of different modes depending on the robot and how sophisticated it is The following programming modes are common Physical setup In this mode an operator sets up switches and hard stops that control the motions of the robot This mode is usually used along with other devices such as programmable logic control lers PLCs Leadthrough or teach mode In this mode the robots joints are moved with a teach pendant When the desired location and orientation is achieved the location is entered taught into the controller During playback the controller moves the joints to the same locations and orientations This mode is usually pointtopoint and as such the motion between points is not specified or controlled Only the points that are taught are guaranteed to be reached Continuous walkthrough mode In this mode all robot joints are moved simultaneously while the motion is continuously sampled and recorded by the controller During playback the exact motion that was recorded is executed The motions are taught by an operator either through a model by physically moving the end effector or by wearing the robot arm and moving it through its work space Painting robots for example may be programmed by skilled painters through this mode Software mode In this mode a program is written offline or online and is executed by the controller to control the motions The programming mode is the most sophisticated and versatile mode and can include sensory information conditional statements such as ifthen statements and branching However it requires a working knowledge of the programming syntax of the robot before any pro gram is written Most industrial robots can be programmed in more than one mode Introduction to Robotics 12 113 Robot Characteristics The following definitions are used to characterize robot specifications Payload This is the weight a robot can carry and still remain within its other specifications As an example a robots maximum load capacity may be much larger than its specified payload but at these levels it may become less accurate may not follow its intended path trajectory accurately or may have excessive deflections The payload of robots compared to their own weight is very small usually only a few percent Reach This is the maximum distance a robot can reach within its work envelope As will be seen later much of the workspace of the robot may be reached with any desired orientation called dexterous points However for other points close to the limit of the robots reach capability orientation cannot be specified as desired called nondexterous points Reach is a function of the robots joints and lengths of its linkages and its configuration This is an important specification for industrial robots and must be considered before a robot is selected and installed Precision validity This is defined as how accurately a specified point can be reached Precision is a function of the resolution of the actuators as well as the robots feedback devices Most industrial robots can have precision in the range of 0001 inches or better The precision is a function of how many positions and orientations were used to test the robot with what load and at what speed When the precision is an important specification it is crucial to investigate these issues Repeatability variability This is how accurately the same position can be reached if the motion is repeated many times Suppose that a robot is driven to the same point 100 times Since many factors may affect the accuracy of the position the robot may not reach the exact same point every time but be within a certain radius from the desired point The radius of a circle that is formed by the repeated motions is called repeatability Repeatability is much more important than precision If a robot is not precise it generally shows a consistent error which can be predicted and therefore corrected through programming As an example suppose that a robot is consistently off by 005 inches to the right In that case all desired points can be specified at 005 inches to the left thereby eliminating the error However if the error is random it cannot be predicted and consequently cannot be elimi nated Repeatability defines the extent of this random error Repeatability is usually specified for a certain number of runs A larger number of tests yields larger bad for manufacturers results but more realistic good for the users results Manufacturers must specify repeatability in conjunction with the number of tests the applied payload during the tests and the orientation of the arm For example the repeatability of an arm in a vertical direction is different from when the arm is tested in a horizontal configuration Most industrial robots have repeatability in the 0001 inch range It is crucial to find out about the details of repeatability if it is an important specification for the application 114 Robot Workspace Depending on their configuration and the size of their links and wrist joints robots can reach a collection of points around them that constitute a workspace The shape of the workspace for each robot is uniquely related to its design The workspace may be found mathematically by writing equations that define the robots links and joints and which include their limitations such as ranges of motions for each joint 9 Alternately the workspace may be found empirically by virtually moving each joint through its range of motions combining all the space it can reach and subtracting what it cannot reach Figure 18 shows the Fundamentals 13 approximate workspace for some common configurations When a robot is considered for a particular application its workspace must be studied to ensure that the robot is able to reach the desired points Manufacturers data sheets must be consulted for specific workspace information 115 Robot Languages There are perhaps as many robot languages as there are robot manufacturers Each manufacturer designs its own robotic language and therefore in order to use any particular robot its brand of the programming lan guage must be learned Many robot languages are based on common languages such as C and others Other languages are standalone and do not relate to any other common language Robotic languages are at different levels of sophistication depending on their design and application This ranges from machine level to a proposed human intelligence level 1013 Highlevel languages are either interpreterbased or compilerbased Interpreterbased languages execute one line of the program at a time Each line of the program has a line number The interpreter interprets the line every time it is encountered it converts the robot program to a machine language program that the processor can understand and execute and executes each line sequen tially The execution continues until the last line is encountered or until an error is detected at which time execution stops The advantage of an interpreterbased language is in its ability to continue execution until an error is detected which allows the user to run and debug the program portion by portion As a result debugging a program is much faster and easier However because each line is interpreted every time exe cution is slower and not very efficient Many robot languages such as OMRON Adepts V are inter preterbased Compilerbased languages use a compiler to translate the whole program into machine language which creates an object code before it is executed Since the processor executes the object code these programs are much faster and more efficient However since the whole program must first be compiled it is impossible to Cartesian Cylindrical Spherical Articulated Parallel Figure 18 Typical approximate workspaces for common robot configurations Introduction to Robotics 14 run any part of the program if there are any syntax errors present even before the logic of the program is tested As a result debugging a program is more difficult The following is a general description of different levels of robotic languages 11 Microcomputer machine language level At this level programs are written in machine language This level of programming is the most basic and is very efficient but it is difficult to understand and difficult for others to follow All languages will eventually be interpreted or compiled to this level However in the case of higherlevel programs the user writes the programs in a higherlevel language that is easier to follow and understand Pointtopoint level At this level the coordinates of the points are entered sequentially and the robot follows the points as specified This is a very primitive and simple type of program and is easy to use but not very powerful It also lacks branching sensory information and conditional statements Primitive motion level In these languages it is possible to develop moresophisticated programs including sensory information branching and conditional statements Most languages at this level are interpreterbased Structured programming level Most languages at this level are compilerbased are powerful and allow more sophisticated programming However they are also more difficult to learn Taskoriented level There are no actual languages in existence at this level yet AUTOPASS proposed by IBM in the 1980s never materialized AUTOPASS was supposed to be task oriented meaning that instead of programming a robot to perform a task by programming each and every step the user would only mention the task expecting that the controller would create the nec essary sequence Imagine that a robot is to sort three boxes by size In all existing languages the programmer has to specify every move and every step including how to go to the largest box how to pick up the box where to place it where to go to find the next box and so on even if a vision system or other sensory devices are used In AUTOPASS the user would only indicate sort while the robot controller would create this sequence automatically This never happened With the advent of morehumanoidtype robots robots are expected to understand conversations with humans Although they are getting closer they still need much direction Example 11 The following is an example of a program written in OMRON Adepts V which is interpreterbased and allows for branching sensory input and output communication straightline movements and many other features As an example the user may define a distance height along the aaxis of the end effector Tool frame which can be used with commands called APPRO for approach and DEPART in order to approach an object or depart from an object without collision A command called MOVE allows the robot to move from its present location to the next specified location However MOVES does the same in a straight line The difference is discussed in detail in Chapter 7 In the following listing a number of different commands are described in order to show some of the capabilities of V 1 PROGRAM TEST Declares the program name 2 SPEED 30 ALWAYS Sets the speed of the robot 3 height 50 Specifies a distance for the liftoff and setdown points along the aaxis of the end effector Tool frame Continued Fundamentals 15 4 MOVES p1 Moves the robot in a straight line to point p1 5 MOVE p2 Moves the robot to a second point p2 in joint interpolated motion 6 REACTI 1001 Stops the robot immediately if an input signal to port1 goes high is closed 7 BREAK Stops execution until the previous motion is finished 8 DELAY 2 Delays execution for two seconds 9 IF SIG1001 GOTO 100 Checks input port1 If it is high closed execution continues at line 100 Otherwise execution continues with the next line 10 OPEN Opens the gripper 11 MOVE p5 Moves to point p5 12 SIGNAL 2 Turns on output port2 13 APPRO p6 height Moves the robot toward p6 but away from it a distance specified as height along the aaxis of the gripper Tool frame This is called a liftoff point 14 MOVE p6 Moves to the object at point p6 15 CLOSEI Closes the gripper and waits until it closes 16 DEPART height Moves up along the aaxis of the gripper Tool frame a distance specified by height 17 100 MOVE p1 Moves the robot to point p1 18 TYPE all done Writes the message to the monitor 19 END Example 12 The following is an example of a program written in IBMs AML A Manufacturing Language AML is no longer common However the example is provided to show how one language may differ from another one in its features and syntax The program is written for a gantry 3P3R robot with three prismatic positioning joints three revolute orientation joints and a gripper Joints may be referred to by numbers 1 2 3 4 5 6 7 where 1 2 and 3 indicate the prismatic joints 4 5 and 6 indicate the revolute joints and 7 indicates the gripper The joints may also be referred to by index letters JX JY and JZ for motions along the x yand z axes JR JP and JY for rotations about the Roll Pitch and Yaw axes used for orientation and JG for the gripper Note that since this robot is gantry the path the robot takes is different from a revolute robots path Therefore the way it is programmed is also different Instead of specifying a point joint movements are specified although all simultaneously There are two types of movements allowed in AML MOVE commands are absolute This means that the robot moves along the specified joint to the specified value DMOVE commands are differential This means that the joint moves the specified amount from wherever it is Therefore MOVE 110 means that the robot moves along the xaxis to 10 inches from the origin of the reference frame whereas DMOVE 110 means that the robot moves 10 inches along the xaxis from its current position The following simple program directs the robot to pick an object from one location and place it at another This is written to show you how a robotic program may be structured Notice the differences between this and the previous program Introduction to Robotics 16 10 SUBRPICKPLACE Subroutines name 20 PT1 NEW 4 24 2 0 0 13 Declares a location 30 PT2 NEW 2 13 2 135 90 33 40 PT3 NEW 2 13 2 150 90 33 1 50 SPEED 02 Specifies the velocity of the robot 20 of full speed 60 MOVE ARM00 Moves the robot ARM to its reset position at the origin of the reference frame 70 MOVE 123456PT1 Moves the arm to point1 above the object 80 MOVE 73 Opens the gripper to 3 inches 90 DMOVE 3 1 Moves the arm down 1 inch along the zaxis 100 DMOVE 715 Closes the gripper by 15 inches 110 DMOVE 3 1 Moves up 1 inch along the zaxis to lift the object 120 MOVE JX JY JZ JR JP JY PT2 Moves the arm to point2 130 DMOVE JZ 3 Moves the arm down 3 inches along the zaxis to place the object 140 MOVE JG3 Opens the gripper to 3 inches 150 DMOVE JZ 11 Moves the arm up 11 inches along the zaxis 160 MOVE ARM PT3 Moves the arm to point3 170 END 116 Robot Applications Robots are best suited for applications involving repetitive tasks jobs requiring capabilities and precision beyond those of humans and working in hazardous environments Robots have already been used in many industries and for many purposes They have excelled when they can perform better than humans or at lower costs For example a welding robot can probably weld better than a human welder in routine applications because it can move more uniformly and consistently along a prescribed path without needing protective goggles and clothing ventilation or other necessities As a result the robot can be more productive and bet ter suited for the job as long as the task is set up for the robot nothing happens to the setup and the job is not too complicated Similarly a robot exploring the ocean floor requires far less attention than a human diver can stay underwater for long periods of time can go to very great depths and still survive the pressure and yet does not require oxygen The following is a list of some common robotic applications The list is not complete by any stretch of the imagination There are many other uses as well and other applications find their way into the industry and the society all the time Fundamentals 17 Machine loading Robots supply other machines with parts or remove the processed parts from other machines Figure 19 In this type of work the robot may not even perform any operation on the part but rather facilitates material and parts handling and loading other machines within the context of a task Pick and place operations The robot picks up parts and places them elsewhere Figure 110 This may include palletizing placement of cartridges simple assembly where two parts are put together such as pla cing tablets into a bottle placing parts in an oven and removing the treated parts from the oven or other similar routines Welding The robot along with proper setups and a welding end effector is used to weld parts together This is one of the most common applications of robots in the auto industry Due to their consistent movements robotic welds are very uniform and accurate Welding robots are usually large and powerful Figure 111 Figure 19 Robots performing loading and unloading of parts Source Reproduced with permission from Staubli a b Figure 110 a A parallel robot stacking cookies b A serial robot handling chocolate bars on a conveyor belt Source Reproduced with permission from Fanuc Robotics and Yaskawa Electric Introduction to Robotics 18 Painting is another very common application of robots especially in the automobile industry Since main taining a ventilated but clean paint area suitable for humans is difficult to achieve and because compared to humans robotic operations are more consistent painting robots are very wellsuited for their job Inspection of parts circuit boards and other similar products is also a very common application for robots In general robots are one component of an inspection system that may include a vision system an Xray device an ultrasonic detector or other similar devices Figure 112 In one application a robot was equipped with an ultrasonic crack detector was given the CAD data about the shape of an airplane fuselage and wings and was used to follow the airplanes body contours and check each joint weld or rivet In a similar appli cation a robot would search for and find the location of each rivet detect and mark the rivets with fatigue Figure 111 A robot welding parts together Source Reproduced with permission from Kuka Robotics Figure 112 A robot engaged in sorting and inspection of manufactured parts Source Reproduced with permission from Fanuc America Corporation Fundamentals 19 cracks drill them out and move on The technicians would insert and install new rivets Robots have also been extensively used for circuit board and chip inspection In most applications like this including part iden tification the characteristics of the part such as the circuit diagram of a board the nameplate of a part and so on are stored in the system in a data library The system uses this information to match the part with the stored data Based on the result of the inspection the part is either accepted or rejected Sampling with robots is used in the agriculture industry as well as in many other industries Sampling can be similar to pickandplace and inspection except that it is performed only on a certain number of products Assembly tasks usually involve many operations For example the parts must be located and identified they must be carried in a particular order with many obstacles around the setup and they must be fit together and then assembled Many of the fitting and assembling tasks are complicated and may require pushing turn ing bending wiggling pressing snapping tabs to connect the parts and other operations Slight variations in parts and their dimensions due to larger tolerances also complicate the process since the robot has to know the difference between variations in parts and wrong parts Figure 113 shows a Sawyer robot assembling an electronic circuit and a group of KUKA robots engaged in assembling a product Manufacturing by robots may include many different operations such as material removal drilling debur ring laying glue cutting and so on It also includes insertion of parts such as electronic components into circuit boards installation of boards into electronic devices and other similar operations Insertion robots are very common and are extensively used in the electronic industry Figure 114 shows a robot engaged in manufacturing Medical applications are also becoming increasingly common Examples include Intuitives da Vinci sur gical robot Strykers Mako surgical robot and many others under development at research universities 1417 Based on our earlier definition surgical robots are not really robots because they are actually oper ated by a surgeon rather than operating on their own No robot knows how to perform surgery yet However these precision robots assist surgeons in performing surgery Because of their accuracy these robots can operate through much smaller incisions with more precise motions and can perform tasks such as cutting a bone drilling holes reaming for joint replacement and much more With the advanced haptic feedback provided by the robot the surgeon can feel exactly as if they are doing the surgery However since the doctor does not have to be present in the operating room conceivably they can operate remotely an extremely important advantage that these robots provide In addition these robots have other capabilities that are a b Figure 113 a A Sawyer robot inserting electronic parts into a circuit with its specialized end effector Source Courtesy of Rethink Robotics GmbH b A group of KUKA robots on an assembly line Source Reproduced with permission from Kuka Robotics Introduction to Robotics 20 beyond those of surgeons For example the CATscan image of a bone can be sent to the robot directly allowing it to follow the bones contour more precisely The da Vinci robot possesses four arms three that hold instruments one more than a surgeon could and one to hold a 3D imaging scope that displays the surgical area to a surgeon behind a monitor Figure 115 Assisting disabled individuals has also been tried with interesting results Robots are well suited to help the disabled and elderly in many different ways and many humanoid robots under development can be excel lent choices for this purpose In addition many exoskeleton devices have been developed to help paraplegic persons walk Examples include the ReWalk walker by ARGO Medical Technologies 18 which helps a par alyzed individual get up and walk and the EksoGT suit that helps a patient with rehabilitation and correction of posture during recovery Figure 116 Like surgical robots these devices are not really robots but they include much intelligence and autonomy Work has also been done on reading brain signals to help a disabled person move with a robotic skeleton 19 Another very different and yet exceptional application of robots is in providing a nurturing environment for kids with special needs RoboKinds Milo robot and Blue Frogs Buddy robot are examples of robots that have been designed to have a face with changing expressions that can better relate to autistic children and adults and make friends with them in order to help them with social interactions 20 21 Figure 114 A robot engaged in a manufacturing task Source Reproduced with permission from Staubli Robotics Figure 115 The da Vinci surgical system Source 2019 Intuitive Surgical Fundamentals 21 The fingerspelling hand Figure 117 designed for communication with deafblind individuals is capable of making hand gestures that spell all the letters of the alphabet With its 14 servomotors the hand is mounted on an arm and can be held with one hand while the other hand reads the letters Letters typed in a computer emails or text are coded and sent to the hand Figure 116 The EksoGT rehabilitation suit Source Reproduced with permission from EksoBionic Figure 117 Fingerspelling hand for communication with deafblind individuals Designed and built by Kendall Searing Cal Poly San Luis Obispo Supported by the Smith Kettlewell Eye Research Institute Introduction to Robotics 22 Hazardous environments are well suited for robotics Because of their inherent danger in these environ ments humans must be wellprotected However robots can access traverse maintain and explore these areas without the same level of concern Servicing a radioactive environment for example is easier with a robot than a human In 1993 an eightlegged robot called Dante was supposed to reach the lava lake of the constantly erupting volcano of Mount Erebus in Antarctica and study its gases 22 Robots were also used to clean up the Fukushima nuclear power plant in Japan after it was damaged by the tsunami of 2011 A variety of minedetecting and bombdetonating robots have also been put to use with the idea that a robot may be expendable whereas a human is not One such robot uses vibrating ultrasonic pods to identify underground mines therefore eliminating the need for human searches 23 Similarly a crustaceanlooking lobster robot was developed to search ocean bottoms for mines and other weapons 24 Inaccessible locations such as space underwater and mines can also be serviced or explored by robots So far it is still impractical to send a human to other planets even Mars but there have been a number of rovers Figure 118 that have already landed and explored it 25 In the last few years underwater robots have also looked for found and explored sunken ships in deep oceans Underwater robots have also been used to find crashed airplanes and to work on deepwater oil wells In a project sponsored by the Defense Advanced Research Projects Agency DARPA the Aircrew Labor InCockpit Automation System ALIAS was tested to land a simulated Boeing 737 aircraft The system using its vision system and the aircrafts autopilot fully actuated the landing procedure 26 Robots in agriculture can be very useful especially in places were labor shortage or environmental con ditions are important issues Robotic pickers have been developed and tested around the world and are becoming more common This includes orange pickers strawberry pickers and so on 27 Geneticists have developed dwarf trees and longstem strawberries that hang on the side to facilitate robotic picking 117 Other Robots and Applications Since the first edition of this book was published many new robots and issues have appeared Such is the nature of this active field Therefore you should expect that there will be applications and robots that are not included in this edition either However the following are just a sample of some systems that show a trend and future possibilities Figure 118 NASA Sojourner Source Courtesy NASAJPLCaltech Fundamentals 23 A large number of humanoid robots have been developed that are meant to mimic humans in different ways for many different purposes from domestic maids to factory workers to assisting military personnel Robots such as Hondas ASIMO BlueBotics Gilbert Nestles Nesbot Anybotss Monty Aldebaran NAO Boston Dynamicss Atlas Figure 119 and many others are intelligent humanoid robots with humanlike features and behavior Atlas includes an advanced controlandbalance system that enables it to coordinate the motions of its extremities and torso in wholebody mobile manipulation to keep its balance when jostled and to get up if tipped over It also includes a stereo vision system range finders and other sensors that enable it to see its environment and traverse rough terrain ASIMO walks runs walks up and down a staircase and interacts with people Nesbot brings coffee to workers who have ordered it online 28 Monty loads a dish washer and does other chores while Robomower mows your lawn while you read 29 A number of different robots have also been designed and used for emergency services during natural and humancaused disasters 30 These robots equipped with special sensors are capable of looking for live humans and animals buried under rubble and reporting their locations to rescuers Yaskawa Electric SDA10 dualarm robots Figure 120 have 15 axes of motion The two arms can move independently or in a coordinated manner They can transfer a part from one gripper to the other without the need to set it down The Kawasaki duAro robots dual arms are SCARA type and move in a coordinated manner they can transfer and handle parts together or move independently In addition they are designed to be the size of Figure 119 Atlas humanoid robot Source Image courtesy of Boston Dynamics Introduction to Robotics 24 a human Therefore they can be integrated into an assembly line or workspace without the need to change anything this robot is also a collaborative robot see Section 118 Exoskeletal assistive devices although not robots are enablers They enable a human to carry large loads for extended periods of time or to exert large forces in awkward positions In fact there is a certain synergy between these devices and assistive devices to help disabled individuals walk Figure 121 shows EksoVest a nonpowered upperbody exoskeleton device that is worn by an individual it elevates and supports the Figure 120 Dualarm robots Source Reproduced with permission from Yaskawa Electric and from Kawasaki Robotics USA Inc Figure 121 The EksoVest suit Source Reproduced with permission from Ekso Bionic Fundamentals 25 arm and assists in tasks above the chest and overhead teachers know about shoulder problems caused by writing on the board in this manner Other devices also help military personnel carry large loads for extended periods of time 31 Figure 122 shows a largescale quadruped allterrain exoskeletal antirobot suit called Prosthesis by Furrion designed to augment human skill and strength with applications ranging from competitive sports to search and rescue to materials handling and more As discussed earlier based on the strict definition of a robot Prosthesis is not really a robot because it is driven by an operator pilot But like other nonrobots such as surgical robots and exoskeletals it is based on the same analysis and design principles Prosthesis has 12 actuators with 8 DOF in the legs 4 legs with 2 joints each controlled by the pilot through the exoskeletal interface and 4 DOF for the big tusks fore and aft which are controlled independently from the cockpit using 2 joysticks The tusks can be deployed or retracted to guard against falling over or to right the machine after falling The pilot wears an exoskeletal suit with which Prosthesis is driven The pilots shoulders control the swing of the outer legs at the outer hips The elbows control the bend of the outer legs at the knees The pilots hips control the swing of the inner legs at the hips and the knees control bend of the inner legs at the knees The motions of Prosthesis make it feel like a gorilla moving on its four legs The pilots state that With enough practice it just starts to feel like you have an eight and a half thousand pound body and a 200 horsepower heart Prosthesis weighs nearly 3900 kg 8600 lbs It is 4 m high 55 m wide and 51 m long and it has about 200 kg 440 lbs of lithium ion batteries that can power it for up to an hour The actuators are hydraulic with electronically controlled valves Its proprietary control system includes a humanintheloop element with 11 positional parity between the pilot and Prosthesis and 50100 times amplification of pilot strength 32 Other monstersized devices include a humanoid bipedal robot called Method2 a 13 ft 15 ton robot that walks like a human driven by an operator inside of it 33 and NASAs robotic titan which is designed to help in the manufacture of massive composite parts for rockets where exaggerated sizes and weights play important role 34 There are also more humanoidtype robots on the factory floor interacting and working with others As time goes on better robots better communication skills and moresophisticated artificial intelligence will make coexistence between workers and robots more realistic 35 36 This includes a robot takeover of infra structure maintenance and inspection duties such as the use of drones for offshore oilplatform inspection and robotic interior pipeline inspection 37 In addition many companies are testing simple mobile robots to do mundane and routine tasks from mov ing items in warehouses and delivering to workstations to moresophisticated package delivery to customers Figure 122 The Prosthesis exoskeletal suit Source Jonathan Tippett Prosthesiss designer and inventor produced by Furrion ExoBionic of which Tippett is cofounder and CTO Photo credit Sam Carter Introduction to Robotics 26 38 These are primarily 2D mobile robots with the capability to pick up and place items from shelves and tables but with the intelligence to know their way around a warehouse or factory environment and to find items by codes such as a barcode Figure 123 At the other end of the spectrum there are also some very tiny robots for other applications For example RoboFly is a flying robot slightly larger than a real fly weighing about 190 mg which can fly on its own without a battery It develops its power from a solar panel powered by a laser beam that is projected on it 39 A cellsized robot that can sense its environment is meant to travel through the body or a pipeline and look for problems 40 Researchers at the University of Texas in San Antonio are developing a nan oscale spherical robot that is 120 nanometers in size and is controlled remotely through electromagnetic fields The intention is for the robot to deliver drugs or perform operations at the cellular scale in places where larger robots or drugs cannot reach 41 As mentioned earlier in addition to humanoid robots other lifeform robots such as insects creatures animals and fish have been used for a variety of purposes Some of these are designed and studied for their robotic aspects others for specific applications and yet others for the study of the animals behavior For example in one study small robotic roaches were doused with the roachs sex hormone Real roaches that cannot see very well follow the robotic roach Normally they tend to congregate in dark places however researchers could alter the behavior of roaches by sending the robotic roach to unexpectedly lighter places The real roaches would follow the robotic roaches against their instinct 42 Other insect robots have also been designed for applications from pure research to entertainment and from civilian to military uses They mimic sixlegged insects eightlegged insects flying insects swarms of insects and more 4345 Developed at BenGurion University and inspired by SpiderMan Spiderbot is an insect robot that launches four magnetic grapplers that stick to the ceiling by which it pulls itself Figure 123 A mobile transport robot Source Reproduced with permission from Locus Robotics Fundamentals 27 up It then releases the magnets one at a time retracts them and launches again to a new point 46 Other applicationoriented lifeforms include wormlike robots snakelike robots robots that swim like fish a lobsterlike robot a honeybee robot birdlike robots dinosaur robots a reconfigurable robot that flies crawls and navigates as well as unidentified life forms 4752 Figure 124 shows Spot a 30 kg robot in the form of a dog It has the ability to pick up and handle objects with its 5DOF arm and comes with perception censors including stereo vision depth cameras and position and force sensors that help it with its navigation and manipulation It can open doors and balance itself if pushed around Unlike its predecessor BigDog which had an onboard engine Spot is all electric and can go for about 15 hours on a charge Animatronics refers to the design and development of systems used in animated robotic figures and machines that look and behave like humans and animals Examples include animatronic lips eyes and hands 53 54 As moresophisticated animatronic components become available the action figures they replace become increasingly real Microelectromechanicalsystems MEMS have also been integrated into robotic design for different tasks As an example a microlevel robotic device may be sent through major veins to the heart for explor atory or surgical functions A MEMS sensor may be used to measure the levels of various elements in blood One device so far only tested on animals releases insulin from a post that pops out after it clings to the wall of an empty stomach it is eventually eliminated by the user If this device is approved for human use it has the potential to relieve diabetics from their daily injections 118 Collaborative Robots Collaborative robots also called cobots are designed to safely work and collaborate with humans Therefore it is necessary that these robots have sensors and the intelligence needed to work safely around humans or other robots and machines to prevent injuries damage or mishaps The first cobots were introduced to the market by Universal Robotics in 2008 followed by Rethink Roboticss dualarmed Baxter and later Sawyer Figure 124 Boston Dynamics Spot robot Source Image courtesy of Boston Dynamics Introduction to Robotics 28 robots Today many other companies also make collaborative robots including established companies such as FANUC America 55 Most initial cobots were designed to move at slower speeds to reduce impact forces afford the robot ample time to respond and stop when necessary and enable it to work with humans or other robots Consequently these robots were generally less productive but obviously safer and they did not have to be in a cage Some current cobots work either at higher speeds like a regular robot or at lower speeds as a cobot However due to industrial demand for speed and productivity newer cobots have speeds almost similar to those of regular robots even in collaborative mode The ISO 102182 and ISOTS 15066 standards define what is needed for safe robots as well as for collab orative robots This ranges from requiring robots to be in cages with sensors that shut down the robot in the presence of a human to collaborative robots that simply stop when they touch other objects including a human or that can be manipulated moved around by humans who are teaching them Cobots are designed to be able to determine the presence of a human around them This can be accom plished by a vision system and a camera that is mounted on the arm and can see the workspace of the robot while it moves by sensors that monitor the current to the actuating motors and measuring the increase when there is resistance against the motion by sensors in the joint axes that measure loads on the joint or other similar devices Figure 125 For dualarm robots the arms are designed to work together to prevent colli sion dropping a part when it is handled by both arms and damage to the part while transporting it see Section 215 They can also take advantage of the kinematic and kinetic equations we will develop and study later in this book to control realtime torques at the joints to prevent injuries and damage One other feature of these robots is that they are generally rounder to allow better detection and dissipation of impact forces with flat surfaces indicating other objects or humans Their actuating motors are generally completely cov ered and there are no pinch points Due to these characteristics it is easier to guide the cobots and teach them a path or trajectory that they repeat later We will discuss cobots later in other chapters 119 Social Issues We must always remember the social consequences of using robots Although there are many applications of robots where they are used because no workers can do the same job there are many other applications in which a robot replaces a human worker The worker who is replaced by a robot may lose their income If the trend continues without consideration it is conceivable that most products can be made by robots without the need for any human workers The result will be fewer workers with jobs who have the money to buy the Figure 125 Collaborative robots are designed to detect the presence of humans around them and to collaborate with them Source Reproduced with permission from Fanuc America Corporation Fundamentals 29 products the robots make Of importance is the issue of social problems that arise as increasingly more work ers are out of jobs as well as its economic consequences One of the important points of negotiations between automobile manufacturers and the United Auto Workers UAW is how many human jobs may be replaced by robots and at what rate Although no solution is presented in this book many references are available for further study of the prob lem 56 57 However as engineers who strive to make better products at lower costs and who may consider using robots to replace human workers we must always remember the consequences of this choice Our academic and professional interest in robotics must always be intertwined with its social and economic considerations On the other end of the spectrum some are raising the issue of legal rights for robots and whether or not they deserve it 58 especially when moresophisticated humanoid robots become a reality In Hollywoods The Bicentennial Man a household domestic robot is continually improved over a long period of time until it has feelings emotions and thoughts just like a human and eventually is granted the status of being a human just before dying We may still be some distance from this reality but there is no doubt it will be an issue in the future 120 Summary Many people who are interested in robotics have background information about robots and may even have interacted with robots too However it is necessary that certain ideas are understood by everyone In this chapter we discussed some fundamental ideas about robotics that enable us to better understand what they are for how they can be used and what they can do Robots can be used for many purposes including industrial applications entertainment and other specific and unique applications such as in space and underwater exploration and in hazardous environments Obviously as time goes on robots will be used for other unique applications The remainder of this book will discuss the kinematics and kinetics of robots their components such as actuators and sensors and vision systems and robot applications References 1 Automation Nation Mechanical Engineering Magazine May 2018 pp 2829 2 Productivity Predicament Mechanical Engineering Magazine September 2018 pp 2829 3 Robots on the Rise Mechanical Engineering Magazine March 2017 pp 2829 4 Taking the Tasks Mechanical Engineering Magazine April 2017 pp 2829 5 Capek Karel RUR Rossums Universal Robots translated by Paul Selver Doubleday NY 1923 6 Valenti Michael A Robot Is Born Mechanical Engineering Magazine June 1996 pp 5057 7 Robot Safety Bonney MC YF Yong editors IFS Publications Ltd UK 1985 8 Stein David Gregory S Chirikjian Experiments in the Commutation and Motion Planning of a Spherical Stepper Motor Proceedings of DETC00 ASME 2000 Design Engineering Technical Conferences and Computers and Information in Engineering Conference Baltimore Maryland September 2000 pp 17 9 Wiitala JaredM BJ Rister JP Schmiedler A MoreFlexible Robotic Wrist Mechanical Engineering July 1997 pp 7880 10 Gruver WA BI Soroka JJ Craig and TL Turner Industrial Robot Programming Languages A Comparative Evaluation IEEE Transactions on Systems Man Cybernetics 144 JulyAugust 1984 11 Bonner Susan KG Shin A Comprehensive Study of Robot Languages IEEE Computer December 1982 pp 8296 Introduction to Robotics 30 12 Gruver William BI Soroka Programming High Level Languages International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons NY 1988 pp 12031234 13 VALII Programming Manual Version 4 Unimation Inc Pittsburgh 1988 14 Brown Alan A Smooth Operator Mechanical Engineering Magazine March 2017 pp 4247 15 Intelligent Surgical Robots Mechanical Engineering Magazine September 2015 pp 36 16 McGuinn Jack senior editor These Bots Are CuttingEdge Power Transmission Engineering October 2008 pp 3236 17 Salisbury Kenneth Jr The Heart of Microsurgery Mechanical Engineering December 1998 pp 4651 18 httpwwwtimesofisraelcomusregulatorsokayisraelimaderoboticlegs 19 Sukel Kayt Mind Control Mechanical Engineering Magazine July 2017 pp 4449 20 Brown Alan FacttoFace with Autism Mechanical Engineering Magazine February 2018 pp 3439 21 Zeldovich Lina Working Hand in Claw Mechanical Engineering Magazine August 2018 pp 3641 22 Leary Warren Robot Named Dante to Explore Inferno of Antarctic Volcano The New York Times December 8 1992 p B7 23 Ultrasonic Detector and Identifier of Land Mines NASA Motion Control Tech Briefs 2001 p 8b 24 Chalmers Peggy Lobster Special Mechanical Engineering Magazine September 2000 pp 8284 25 Robot Explorers Mechanical Engineering Magazine July 2018 3035 26 A Robot in the CoPilots Seat Mechanical Engineering Magazine July 2017 p 17 27 Tibbetts John Not Too Far from the Tree Mechanical Engineering Magazine February 2018 pp 2833 28 From Simple Rules Complex Behavior Mechanical Engineering Magazine July 2009 pp 2227 29 Drummond Mike Rise of the Machines Inventors Digest February 2008 pp 1623 30 Zeldovich Lina Robots to the Rescue Mechanical Engineering Magazine March 2019 pp 3035 31 Gibson Tom Power Suit Mechanical Engineering Magazine July 2017 pp 3841 32 Mech Madness Mechanical Engineering Magazine Nov 2017 p 72 33 Monster Machine ASEEPrism Magazine February 2017 p 13 34 A Robotic Titan to Build Rocket Parts NASA Tech Briefs December 2015 p 8 35 From Torque Controlled to Intrinsically Compliant Humanoid Robots ASME Dynamic Systems and Control June 2015 pp 711 36 Brown Alan Work Buddies Mechanical Engineering Magazine June 2015 pp 3843 37 Brown Alan Something to Prove Robots Are Starting to Replace Human Technicians in Infrastructure Inspection Mechanical Engineering Magazine August 2018 pp 3035 38 Brown Alan Proving Grounds Mechanical Engineering Magazine July 2017 pp 3237 39 Microbot Wings Mechanical Engineering Magazine August 2018 pp 1011 40 CellSized Robots Sense Their Environment NASA Tech Briefs November 2018 p 50 41 Smallest Robot Targeted at Cancer Mechanical Engineering Magazine November 2018 pp 2021 42 Chang Kenneth John Scwartz Led by Robots Roaches Abandon Instincts The New York Times November 15 2007 43 Yeaple Judith A Robot Insects Popular Science March 1991 pp 5255 and 86 44 Freedman David Invasion of the Insect Robots Discover March 1991 pp 4250 45 Thakoor Sarita B Kennedy A Thakoor Insectile and Vemiform Exploratory Robots NASA Tech Briefs November 1999 pp 6163 46 Spiderbot Ben Gurion University Department of Mechanical Engineering Robotics Laboratory httpwww youtubecomwatchvuBikHgnt16E 47 OConner Leo Robotic Fish Gotta Swim Too Mechanical Engineering Magazine January 1995 p 122 48 Lipson Hod JB Pollack The Golem Project Automatic Design and Manufacture of Robotic Lifeforms httpdemocsbrandeisedugolem 49 Zeldovich L The Drone and the Honey Mechanical Engineering Magazine May 2019 pp 3237 50 Practical Robots Mechanical Engineering Magazine July 2017 pp 2223 Fundamentals 31 51 Biomorphic Gliders NASA Tech Briefs April 2001 pp 6566 52 The Flying STAR Meiri Nir and Zarrouk D Ben Gurion University of the Negev httpsyoutube xLuQifpJv8 53 Jones Adam SB Niku Animatronic Lips with Speech Synthesis AliSS Proceedings of the 8th Mechatronics Forum and International Conference University of Twente the Netherlands June 2002 54 Sanders John K SB Shooter The Design and Development of an Animatronic Eye Proceedings of DETC98 MECH 25th ASME Biennial Mechanisms Conference September 1998 55 Lawrence Carol Requiem for Rethink Robotics Mechanical Engineering Magazine February 2019 pp 3945 56 Coates VT The Potential Impacts of Robotics paper number 83WATS9 American Society of Mechanical Engineers 1983 57 Albus James Brains Behavior and Robotics Byte Books McGraw Hill 1981 58 Do They Deserve Legal Rights Mechanical Engineering Magazine April 2018 p 1 Problems 11 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown 12 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown A Figure P11 A Figure P12 Introduction to Robotics 32 13 Draw the approximate workspace for the following robot Assume the dimensions of the base and other parts of the structure of the robot are as shown Figure P13 Fundamentals 33 2 Kinematics of Serial Robots Position Analysis 21 Introduction In this chapter we will study forward and inverse kinematics of serial robots With forward kinematic equa tions we can determine where the robots end hand will be if all joint variables are known Inverse kine matics enables us to calculate what each joint variable must be to position the hand at a desired location and orientation Using matrices we first establish a method of describing objects locations orientations and movements Then we study the forward and inverse kinematics of different serial robot configurations such as Cartesian cylindrical and spherical coordinates Finally we use the DenavitHartenberg representation to derive forward and inverse kinematic equations of all possible configurations of serial robots regardless of number of joints order of joints and presence or lack of offsets and twists In Chapters 3 and 4 we continue with screwbased kinematic analysis of serial robots and with the kinematic analysis of parallel robots It is important to realize that in practice manipulatortype robots are delivered with no end effector In most cases there may be a gripper attached to the robot however depending on the actual application dif ferent end effectors are attached to the robot by the user Obviously the end effectors size and length deter mine where the end of the robot will be see Chapter 1 For a short end effector the end will be at a different location compared to a long end effector In this chapter we assume that the end of the robot is a plate to which the end effector can be attached as necessary We will call this the hand or the endplate of the robot If necessary we can always add the length of the end effector to the robot for determining the location and orientation of the end effector It should be mentioned here that a real robot manipulator for which the length of the end effector is not defined will calculate its joint values based on the endplate location and orientation which may be different from the position and orientation perceived by the user 22 Robots as Mechanisms Manipulatortype serial robots are multidegrees of freedom DOF threedimensional openloop chain mechanisms MultiDOF means that robots possess many joints allowing them to move freely within their workspace In a 1DOF system when the actuating variable is set to a particular value the mechanism is totally set and all its other variables are known For example in the 1DOF 4bar mechanism in Figure 21 when the crank is set to 120 the angles of the coupler link and the rocker arm are also known whereas in a multiDOF mechanism all input variables must be individually defined to know the remaining parameters Robots are multiDOF machines where each joint variable must be known in order to determine the location of the robots hand Robots are threedimensional machines if they are to move in space Although it is possible to have a two dimensional multiDOF robot they are not common or useful Serial robots are openloop mechanisms Unlike mechanisms that are closedloop eg 4bar mechanisms even if all joint variables are set to particular values there is no guarantee that the hand will be at the given 35 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed location This is because deflections in any joint or link change the location of all subsequent links without feedback For example in the 4bar mechanism in Figure 22a when link AB deflects as a result of load F link BO2 will also move and therefore the deflection can be detected whereas in an openloop system such as the serial robot in Figure 22b the deflections will move all succeeding members without any feedback There fore in openloop systems either all joint and link parameters must continuously be measured or the end of the system must be monitored otherwise the kinematic position of the machine is not completely known This difference can be expressed by comparing the vector equations describing the relationship between dif ferent links of the two mechanisms as follows For the 4bar mechanism O1A AB O1O2 O2B 21 For the robot O1A AB BC O1C 22 As shown if there is a deflection in link AB of the 4bar mechanism link O2B will move accordingly both sides of Eq 21 change corresponding to the changes in the links On the other hand if link AB of the robot deflects all subsequent links will move too but unless O1C is measured by other means the change will not be known To remedy this problem in openloop robots either the position of the hand is constantly measured with devices such as a camera the robot is made into a closedloop system with external means such as the use of secondary arms or laser beams 1 2 3 or as standard practice the robot links and joints are made exces sively strong to eliminate all deflections This renders the robot heavier more massive and slower and its specified payload is very low compared to what it can actually carry Parallel robots Figure 23 are closed 120 A B O1 O2 Figure 21 A 1DOF closedloop 4bar mechanism A B O1 O2 O1 A B C F F a b Figure 22 Closedloop a versus openloop b mechanisms Introduction to Robotics 36 loop and consequently can be lighter and much faster The tradeoff is muchreduced range of motions and workspace 23 Conventions Throughout this book we use the following conventions for describing vectors frames transformations etc Vectors i or î x or x p or P Vector components nx ny nz ax ay az Frames Fxyz Fnoa xyz noa Fcamera Transformations T1 T2 UT BP UTR Sine and cosine of angles S1 C1 Sθ Cα 24 Matrix Representation Matrices can be used to represent points vectors frames translations rotations transformations as well as objects and other kinematic elements We use this representation throughout the book 241 Representation of a Point in Space A point P in space Figure 24 can be represented relative to a reference frame as P axi byj czk 23 Figure 23 A typical parallel manipulator Kinematics of Serial Robots Position Analysis 37 where ax by and cz are the three coordinates of the point represented in the reference frame Obviously other coordinate representations can also be used to describe the location of a point in space 242 Representation of a Vector in Space A vector can be represented by three coordinates of its tail and its head A vector starting at point A and ending at point B can be represented by PAB BxAx i ByAy j Bz Az k Specifically if the vector starts at the origin Figure 25 then P axi byj czk 24 where ax by and cz are the three components of the vector in the reference frame In fact point P in the Section 241 is in reality represented by a vector connected to it at point P and expressed by the three com ponents of the vector The three components of the vector can also be written in matrix form as in Eq 25 This format is used throughout this book to represent all kinematic elements P ax by cz 25 z x y ax cz by P Figure 24 Representation of a point in space z x y ax cz by P Figure 25 Representation of a vector in space Introduction to Robotics 38 This representation can be slightly modified to also include a scale factor w such that if Px Py Pz are divided by w they yield ax by and cz Therefore the vector can be written as P Px Py Pz w where ax Px w by Py w cz Pz w 26 w may be any number and as it changes it can change the overall size of the vector This is similar to the zooming function in computer graphics As the value of w changes the size of the vector changes accordingly If w is bigger than 1 all vector components enlarge if w is smaller than 1 all vector components become smaller When w is 1 the size of these components remains unchanged in this case the actual vector is represented However if w 0 then ax by and cz will be infinity In this case Px Py and Pz as well as ax by and cz will represent a vector whose length is infinite but nonetheless is in the direction represented by the vector This means that a direction vector can be represented by a scale factor of w 0 where the length is not important but the direction is represented by the three components of the vector This is used throughout the book to represent direction vectors In computer graphics applications the addition of a scale factor allows the user to zoom in or out simply by changing this value Since the scale factor increases or decreases all vector lengths proportionally the size of a vector or drawing can be easily changed without the need to redraw it However our reason for this inclu sion is different and it will become apparent shortly Example 21 A vector is described as P 3i 5j 2k Express the vector in matrix form 1 With a scale factor of 2 2 If it were to describe a direction as a unit vector Solution The vector can be expressed in matrix form with a scale factor of 2 as well as with 0 for direction as P 6 10 4 2 and P 3 5 2 0 However in order to make the vector into a unit vector we normalize the length to be equal to 1 To do this each component of the vector is divided by the square root of the sum of the squares of the three components λ P2 x P2 y P2 z 6 16 and Px 3 6 16 0 487 etc Therefore Punit 0 487 0 811 0 324 0 Note that 0 4872 0 8112 0 3242 1 Kinematics of Serial Robots Position Analysis 39 Example 22 A vector p is 5 units long and is in the direction of a unit vector q described as follows Express the vector in matrix form qunit 0 371 0 557 qz 0 Solution The unit vectors length must be 1 Therefore λ q2 x q2 y q2 z 0 371 2 0 557 2 q2 z 1 qz 0 743 qunit 0 371 0 557 0 743 0 and p qunit 5 1 855 2 785 3 715 1 243 Representation of a Frame at the Origin of a FixedReference Frame A frame is generally represented by three mutually orthogonal axes such as x y and z Since we may have more than one frame at any given time we use axes x y and z to represent the fixed Universe reference frame Fxyz and a set of axes n o and a to represent another moving frame Fnoa relative to the Universe frame This way there should be no confusion about which frame is referenced The letters n o and a are derived from the words normal orientation and approach Referring to Figure 26 it should be clear that in order to avoid hitting the part while trying to pick it up the robot would have to approach it along the zaxis of the gripper In robotic nomenclature this axis is called approachaxis and is referred to as the aaxis The orientation with which the gripper frame approaches the part is called orientationaxis and is referred to as the oaxis Since the xaxis is normal to both it is referred to as the naxis Throughout this book we refer to a moving frame as Fnoa with normal orientation and approach axes x y n o a z Figure 26 The normal orientation and approachaxes of a moving frame Introduction to Robotics 40 The direction of each axis of a frame Fnoa located at the origin of a reference frame Fxyz Figure 27 is represented by its three directional cosines relative to the reference frame as in section 242 Consequently the three axes of the frame can be represented by three vectors in matrix form as F nx ox ax ny oy ay nz oz az 27 244 Representation of a Frame Relative to a Fixed Reference Frame To fully describe a frame relative to another frame both the location of its origin and the directions of its axes must be specified If a frame is not at the origin or in fact even if it is at the origin of the reference frame its location relative to the reference frame is described by a vector between the origin of the frame and the origin of the reference frame Figure 28 Similarly the position vector is expressed by its components relative to the reference frame Therefore the frame can be expressed by three vectors describing its directional unit vectors and a fourth vector describing its location as F nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 28 z y x n a ox o oy oz Figure 27 Representation of a frame at the origin of the reference frame z y x n o a p Figure 28 Representation of a frame in a frame Kinematics of Serial Robots Position Analysis 41 As shown in Eq 28 the first three vectors are directional vectors with w 0 representing the directions of the three unit vectors of the frame Fnoa while the fourth vector with w 1 represents the location of the origin of the frame relative to the reference frame Unlike the unit vectors the length of vector p is important Consequently we use a scale factor of 1 A frame may also be represented by a 3 4 matrix without the scale factors but it is not common Adding the fourth row of scale factors to the matrix makes it a 4 4 or homogeneous matrix We see why this is important shortly Example 23 The frame F shown in Figure 29 is located at 357 units with its naxis parallel to x its oaxis at 45 relative to the yaxis and its aaxis at 45 relative to the zaxis The frame can be described by F 1 0 0 3 0 0 707 0 707 5 0 0 707 0 707 7 0 0 0 1 245 Representation of a Rigid Body An object can be represented in space by a frame attached to it Since the object is permanently attached to this frame its position and orientation relative to the frame are always known regardless of how complicated it might be As a result so long as the frame can be described in space the objects location and orientation relative to the fixed frame will be known Figure 210 As before a frame can be represented by a matrix z y x n o a p 45 45 Figure 29 An example of representation of a frame z x y n o a p Figure 210 Representation of an object in space Introduction to Robotics 42 where the origin of the frame and the three vectors representing its orientation relative to the reference frame are expressed Therefore Fobject nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 29 As was discussed in Chapter 1 a point in space has only 3 degrees of freedom DOF it can only move along the three reference axes However a rigid body in space has 6 DOF meaning that not only can it move along the x y and zaxes but it can also rotate about these three axes Consequently all that is needed to completely define an object in space is six pieces of information describing the location of the origin of the object in the reference frame and its orientation about the three axes However as can be seen in Eq 29 12 pieces of information are given 9 for orientation and 3 for position this excludes the scale factors on the last row of the matrix because they do not add to this information Obviously there must be some constraints present in this representation to limit the pieces of information to six There fore we need 6 constraint equations to reduce the pieces of information from 12 to 6 The constraints come from the known characteristics of a frame that have not been utilized yet that The three unit vectors n o a are mutually perpendicular and Each unit vector representing directional cosines must be equal to 1 These constraints translate into the following six constraint equations 1 n o 0 the dot product of n and ovectors must be zero 2 n a 0 3 a o 0 4 n 1 the magnitude of the lenght of the vector must be 1 5 o 1 6 a 1 210 As a result the values representing a frame in a matrix must satisfy these equations Otherwise the frame will not be correct However a dot product is a scalar To ensure that the righthand rule for the three direc tion vectors is maintained the dot products in Eq 210 can be replaced by a cross product as n o a 211 Since Eq 211 includes the correct righthand rule relationship too it is recommended that this equation be used to determine the correct relationship among the three vectors It should be mentioned that since the calculation of lengths requires taking square roots we must make sure that we only choose values that satisfy the righthand rule Example 24 For the following frame find the values of the missing elements and complete the matrix representation of the frame F 0 5 0 707 3 0 2 0 0 0 1 Kinematics of Serial Robots Position Analysis 43 Solution Obviously 532 represent the position of the origin of the frame and do not affect the constraint equa tions Notice that only three values for directional vectors are given This is all that is needed Using Eq 210 we get nx ox ny oy nz oz 0 or nx 0 0707 oy nz oz 0 nx ax ny ay nz az 0 or nx ax 0707 ay nz 0 0 ax ox ay oy az oz 0 or ax 0 ay oy 0 oz 0 nx 2 ny 2 nz 2 1 or nx 2 07072 nz 2 1 ox 2 oy 2 oz 2 1 or 02 oy 2 oz 2 1 ax 2 ay 2 az 2 1 or ax 2 ay 2 02 1 Simplifying these equations yields 0707 oy nzoz 0 nxax 0707 ay 0 ayoy 0 nx 2 nz 2 05 oy 2 oz 2 1 ax 2 ay 2 1 Solving these six equations yields nx 0707 nz 0 oy 0 oz 1 ax 0707 and ay 0707 Notice that both nx and ax must have the same sign The reason for multiple solutions is that with the given parameters it is possible to have two sets of mutually perpendicular vectors in opposite direc tions The final matrix is F1 0 707 0 0 707 5 0 707 0 0 707 3 0 1 0 2 0 0 0 1 or F2 0 707 0 0 707 5 0 707 0 0 707 3 0 1 0 2 0 0 0 1 As you can see both matrices satisfy all the requirements set by the constraint equations but only F1 follows the righthand rule It is important to realize that the values representing the three direction vectors are not arbitrary but are bound by these equations Therefore you may not randomly use any desired values in the matrix The problem may also be solved using n o a or i j k nx ny nz ox oy oz axi ayj azk or i nyoz nzoy j nxoz nzox k nxoynyox axi ayj azk 212 Substituting the values into this equation yields i 0 707oz nzoy j nxoz k nxoy axi ayj 0k Solving the three simultaneous equations results in 0 707oz nzoy ax nxoz ay nxoy 0 Introduction to Robotics 44 which replace the three equations for the dot products Together with the three unitvector length constraint equations there are six equations Note that using the crossproduct constraint equation results only in F1 Example 25 Find the missing elements of the following frame representation F 0 3 0 5 9 0 7 0 0 0 1 Solution n2 x n2 y n2 z 1 n2 x 0 25 1 nx 0 866 n o 0 0 866 0 0 5 oy 0 oz 0 oy 0 o 1 oz 1 n o a i 0 5 j 0 866 k 0 axi ayj azk ax 0 5 ay 0 866 az 0 25 Homogeneous Transformation Matrices For a variety of reasons it is best to keep matrices in square form either 3 3 or 4 4 First as we see later it is much easier to calculate the inverse of square matrices than rectangular matrices Second in order to mul tiply two matrices their dimensions must match such that the number of columns of the first matrix must be the same as the number of rows of the second matrix as in m n and n p which results in a matrix of m p dimensions If two matrices A and B are square with m m and m m dimensions we may multiply A by B or B by A both resulting in m m dimensions However if the two matrices are not square with m n and n p dimensions respectively A can be multiplied by B but B may not be multi plied by A and the result of AB has a dimension different from A and B Since we will have to multiply many matrices together in different orders to find the equations of motion of the robots we need to have square matrices In order to keep representation matrices square if we represent both orientation and position in the same matrix we add the scale factors to the matrix to make it 4 4 If we represent the orientation alone we may either drop the scale factors and use 3 3 matrices or add a fourth column with zeros for position in order to keep the matrix square Matrices of this form are called homogeneous matrices and we refer to them as F nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 213 Kinematics of Serial Robots Position Analysis 45 26 Representation of Transformations A transformation is defined as making a movement in space When a frame a vector an object or a moving frame moves in space relative to a fixed reference frame we represent this motion in a form similar to a frame representation This is because a transformation is a change in the state of a frame representing the change in its location and orientation therefore it can be represented like a frame A transformation may be in one of the following forms A pure translation A pure rotation about an axis A combination of translations andor rotations In order to see how these can be represented we study each one separately 261 Representation of a Pure Translation If a frame representing a point a vector or an object moves in space without any change in its orientation the transformation is a pure translation In this case the directional unit vectors remain unchanged only the location of the origin of the frame relative to the reference frame changes as shown in Figure 211 The trans formation T representing a pure translation simply is T Trans dxdydz 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 214 where dx dy and dz are the three components of a pure translation vector d relative to the x y and zaxes of the reference frame The first three columns represent no rotational movement equivalent of a 1 while the last column represents the translation The new location of the frame relative to the fixed reference frame can be found by adding the translation vector to the vector representing the original location of the origin of the frame In matrix form the new frame representation may be found by premultiplying the frame with a matrix representing the transforma tion The new location of the frame is Fnew 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 nx ox ax px dx ny oy ay py dy nz oz az pz dz 0 0 0 1 215 z y x p d n o a n o a Figure 211 Representation of a pure translation in space Introduction to Robotics 46 This equation is also symbolically written as Fnew Trans dxdydz Fold 216 First as you see premultiplying the frame matrix by the transformation matrix yields the new location of the frame Second notice that the directional vectors remain the same after a pure translation but the new location of the frame is at d p Third notice how homogeneous transformation matrices facilitate the mul tiplication of matrices resulting in a matrix with the same dimensions as before Example 26 A frame F is moved 3 units along the xaxis and 2 units along the zaxis of the reference frame Find the new location of the frame F 0 527 0 574 0 628 8 0 369 0 819 0 439 10 0 766 0 0 643 6 0 0 0 1 Solution Using Eq 215 or 216 we get Fnew Trans dxdydz Fold Trans 302 Fold 1 0 0 3 0 1 0 0 0 0 1 2 0 0 0 1 0 527 0 574 0 628 8 0 369 0 819 0 439 10 0 766 0 0 643 6 0 0 0 1 0 527 0 574 0 628 11 0 369 0 819 0 439 10 0 766 0 0 643 8 0 0 0 1 262 Representation of a Pure Rotation about an Axis To simplify the derivation of rotations about an axis lets first assume that the frame is at the origin of the reference frame and is parallel to it We later expand the results to other rotations as well as combinations of rotations Lets assume that a frame Fnoa located at the origin of the reference frame Fxyz rotates an angle θ about the xaxis of the reference frame Lets also assume that attached to the rotating frame Fnoa is a point p with coordinates px py and pz relative to the reference frame and pn po and pa relative to the moving frame As the frame rotates about the xaxis point p attached to the frame will also rotate with it Before rotation the coordinates of the point in both frames are the same remember that the two frames are at the same location and are parallel to each other After rotation the pn po and pa coordinates of the point remain the same in the rotating frame Fnoa but px py and pz will be different in the Fxyz frame Figure 212 We want to find the new coordinates of the point relative to the fixed reference frame after the moving frame has rotated Now lets look at the same coordinates in 2D as if we were standing on the xaxis The coordinates of point p are shown before and after rotation in Figure 213 The coordinates of point p relative to the reference frame are px py pz while its coordinates relative to the rotating frame to which the point is attached remain as pn po and pa Kinematics of Serial Robots Position Analysis 47 Figure 213 shows that the value of px does not change as the frame rotates about the xaxis but the values of py and pz do change Verify that px pn py l1l2 po cosθpa sinθ pz l3 l4 po sinθ pa cosθ 217 and in matrix form px py pz 1 0 0 0 cosθ sinθ 0 sinθ cosθ pn po pa 218 z y x z y x n o a p py px pz p px py pz a n o θ θ Before rotation After rotation Figure 212 Coordinates of a point in a rotating frame before and after rotation y z o a p l1 l2 l3 l4 pz pa po pa po py θ θ Figure 213 Coordinates of a point relative to the reference frame and rotating frame as viewed from the xaxis Introduction to Robotics 48 This means that the coordinates of the point p or vector p in the rotated frame must be premultiplied by the rotation matrix as shown to get the coordinates in the reference frame This rotation matrix is only for a pure rotation about the xaxis of the reference frame and is denoted as pxyz Rot xθ pnoa 219 Notice that the first column of the rotation matrix in Eq 218 representing the naxis has 100 values indicating that the coordinate along the xaxis has not changed To simplify writing of these matrices it is customary to designate Cθ to denote cosθ and Sθ to denote sinθ Therefore the rotation matrix may be also written as Rot xθ 1 0 0 0 Cθ Sθ 0 Sθ Cθ 220 You may want to do the same for the rotation of a frame about the y and zaxes of the reference frame Verify that the results are Rot yθ Cθ 0 Sθ 0 1 0 Sθ 0 Cθ and Rot zθ Cθ Sθ 0 Sθ Cθ 0 0 0 1 221 Equation 219 can also be written in a form that assists in easily following the relationship between dif ferent frames Denoting the transformation as UTR the transformation of R relative to U for Universe denoting pnoa as Rp p relative to frame R and denoting pxyz as Up p relative to frame U Eq 219 simplifies to Up UTR Rp 222 As you see canceling the Rs yields the coordinates of point p relative to U The same notation is used throughout this book to relate to multiple transformations Example 27 A point p2 3 4T is attached to a rotating frame The frame rotates 90 about the xaxis of the reference frame Find the coordinates of the point relative to the reference frame after the rota tion and verify the result graphically Solution Of course since the point is attached to the rotating frame the coordinates of the point relative to the rotating frame remain the same after the rotation The coordinates of the point relative to the reference frame are px py pz 1 0 0 0 C90 S90 0 S90 C90 pn po pa 1 0 0 0 0 1 0 1 0 2 3 4 2 4 3 As shown in Figure 214 the coordinates of point p relative to the reference frame after rotation are 2 4 3 as obtained by the above transformation Kinematics of Serial Robots Position Analysis 49 263 Representation of Combined Transformations Combined transformations consist of a number of successive translations and rotations about the fixed ref erence frame axes or the moving current frame axes Any transformation can be resolved into a set of transla tions and rotations in a particular order For example we may rotate a frame about the xaxis then translate about the x y and zaxes and then rotate about the yaxis in order to accomplish the desired transforma tion As we see later this order is very important such that if the order of two successive transformations changes the result may be completely different To see how combined transformations are handled lets assume that a frame Fnoa is subjected to the fol lowing three successive transformations relative to the reference frame Fxyz 1 Rotation of α degrees about the xaxis 2 Followed by a translation of l1l2l3 relative to the x y and zaxes respectively 3 Followed by a rotation of β degrees about the yaxis Also lets say that a point pnoa is attached to the rotating frame at the origin of the reference frame As the frame Fnoa rotates or translates relative to the reference frame point p attached to it moves with it and the coordinates of the point relative to the reference frame change After the first transformation as we saw in the previous section the coordinates of point p relative to the reference frame can be calculated by pxyz 1 Rot xα pnoa 223 where pxyz1 is the coordinates of the point after the first transformation relative to the reference frame The coordinates of the point relative to the reference frame at the conclusion of the second transformation are pxyz 2 Trans l1l2l3 pxyz 1 Trans l1l2l3 Rot xα pnoa 224 Similarly after the third transformation the coordinates of the point relative to the reference frame are pxyz pxyz 3 Rot yβ pxyz 2 Rot yβ Trans l1l2l3 Rot xα pnoa As you see the coordinates of the point relative to the reference frame at the conclusion of each transfor mation are found by premultiplying the coordinates of the point by each transformation matrix Of course as shown in Appendix A the order of matrices cannot be changed this order is very important Also notice that for each transformation relative to the reference frame the matrix is premultiplied Consequently the order of matrices written is the opposite of the order of transformations performed Example 28 A point p7 3 1T is attached to a frame Fnoa and is subjected to the following transformations 1 Rotation of 90 about the zaxis 2 Followed by a rotation of 90 about the yaxis 3 Followed by a translation of 4 3 7 z y x n o a p z y x n p o a Figure 214 Rotation of a frame relative to the xaxis of the reference frame Introduction to Robotics 50 Find the coordinates of the point relative to the reference frame at the conclusion of transformations Solution The matrix equation representing the transformation can be found through premultiplying by each transformation as pxyz Trans 4 37 Rot y90 Rot z90 pnoa 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 7 3 1 1 5 4 10 1 The first transformation of 90 about the zaxis rotates the Fnoa frame as shown in Figure 215 fol lowed by the second rotation about the yaxis followed by the translation relative to the reference frame Fxyz The point p in the frame can then be found relative to the Fnoa as shown The final coordi nates of the point can be traced on the x y zaxes to be 4 1 5 3 7 4 and 7 3 10 Be sure to follow this graphically Example 29 In this case assume the same point p7 3 1T attached to Fnoa is subjected to the same transformations but the transformations are performed in a different order as shown 1 A rotation of 90 about the zaxis 2 Followed by a translation of 4 37 3 Followed by a rotation of 90 about the yaxis Find the coordinates of the point relative to the reference frame at the conclusion of transformations Solution The matrix equation representing the transformation is pxyz Rot y90 Trans 4 37 Rot z90 pnoa 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 7 3 1 1 8 4 1 1 z y x n2 o2 a2 z y x n3 o3 a3 4 3 7 p 7 3 1 z y x n1 a1 o1 After the first transformation After the second transformation After the third transformation Figure 215 Effects of three successive transformations Kinematics of Serial Robots Position Analysis 51 As you see in Figure 216 although the transformations are exactly the same as in Example 28 since the order of transformations is changed the final coordinates of the point are completely different In this case although the first transformation creates exactly the same change in the frame the second transformation moves the rotating frame Fnoa outward As a result of the third transformation this frame will rotate about the yaxis therefore rotating downward The location of point p attached to the frame is also shown Verify that the coordinates of this point relative to the reference frame are 7 1 8 3 7 4 and 4 3 1 which is the same as the analytical result 264 Transformations Relative to the Current Moving Frame All transformations we have discussed so far have been relative to the fixed reference frame This means that all translations rotations and distances except for the location of a point relative to the moving frame have been measured relative to the reference frame axes However it is possible to make transformations relative to the axes of a moving or current frame This means that for example a rotation of 90 may be made relative to the naxis of the moving frame also referred to as the current frame and not the xaxis of the reference frame To calculate the changes in the coordinates of a point that is attached to the current frame relative to the reference frame the transformation matrix is postmultiplied instead Note that since the position of a point or an object attached to a moving frame is always measured relative to that moving frame the position matrix describing the point or object is also always postmultiplied Example 210 Assume that the same point as in Example 29 is now subjected to the same transfor mations but all relative to the current moving frame as 1 A rotation of 90 about the aaxis 2 Then a translation of 4 37 along n o aaxes 3 Followed by a rotation of 90 about the oaxis Find the coordinates of the point relative to the reference frame after the transformations are completed Solution In this case since the transformations are made relative to the current frame each transformation matrix is postmultiplied As a result the equation representing the coordinates is z y x z y x n1 o1 a1 n2 o2 a2 4 3 7 z y x 3 n3 o3 a3 p 7 7 After the first transformation After the second transformation After the third transformation Figure 216 Changing the order of transformations will change the final result Introduction to Robotics 52 pxyz Rot a90 Trans 4 37 Rot o90 pnoa pxyz 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 0 0 4 0 1 0 3 0 0 1 7 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 7 3 1 1 0 5 0 1 As expected the result is completely different from the other cases both because the transformations are made relative to the current frame and because the order of the matrices is now different Figure 217 shows the results graphically Notice how the transformations are accomplished relative to the current frames Notice how the 731 coordinates of point p in the current frame results in 050 coordinates relative to the reference frame 265 Mixed Transformations Relative to Rotating and Reference Frames It is of course possible to also perform mixed transformations relative to the reference and current frames In that case pre and postmultiplying the frame of interest by corresponding transformations results in the total transformation Postmultiplying the transformation by the coordinates of point p in the frame yields the location of the point relative to the reference frame Example 211 A frame B was rotated about the xaxis 90 followed by a translation about the current oaxis of 2 inches followed by a rotation about the aaxis of 90 and a translation along the current y axis of 3 inches a Write an equation that describes the motions b Find the final location of a point Bp 132 T relative to the reference frame Solution In this case transformations alternate relative to the reference and current frames a Starting with frame B and pre or postmultiplying each motions matrix accordingly we get UTB Trans 030 Rot x90 B Trans 020 Rot a90 z y x n1 o1 a1 z y x n2 o2 a2 z y x n3 o3 a3 p After the first transformation After the second transformation After the third transformation Figure 217 Transformations relative to the current frames Kinematics of Serial Robots Position Analysis 53 b Substituting the matrices and multiplying them we get Up UT B Bp 1 0 0 0 0 1 0 3 0 0 1 0 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 2 0 0 1 0 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 0 0 0 0 1 1 3 2 1 3 1 3 1 Example 212 A frame F was rotated about the oaxis 90 followed by a rotation about the yaxis of 30 followed by a translation of 3 units along the aaxis and finally a rotation of 90 along the xaxis Find the transformed frame Fold 0 0 1 3 1 0 0 2 0 1 0 6 0 0 0 1 Solution The following set of matrices written in the proper order to represent transformations relative to the reference frame or the current frame describes the total transformation and the new frame Starting with the frame F we find Fnew Rot x90 Rot y30 Fold Rot o 90 Trans 003 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 0 866 0 0 5 0 0 1 0 0 0 5 0 0 866 0 0 0 0 1 0 0 1 3 1 0 0 2 0 1 0 6 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 0 866 0 5 0 5 6 0 5 0 866 0 3 7 0 0 1 1 0 0 0 1 Verify graphically that this is true 27 Inverse of Transformation Matrices As was mentioned earlier there are many situations where the inverse of a matrix is needed in robotic anal ysis as the following example shows Suppose the robot in Figure 218 is to be moved to part P in order to drill a hole in the part The robots base position relative to the reference frame U is described by a frame R the robots hand is described by frame H and the end effector lets say the end of the drill bit that will be used to drill the hole is described by frame E The parts position is described by frame P The location of the point Introduction to Robotics 54 where the hole will be drilled can be related to the reference frame U through two independent paths one through the part one through the robot Therefore the following equation can be written UT E UTR RT H HTE UT P PT E 225 The location of point E on the part can be achieved by moving from U to P and from P to E or by a trans formation from U to R from R to H and from H to E In reality the transformation of frame R relative to the Universe frame UTR is known since the location of the robots base must be known in any setup For example if a robot is installed in a workcell the location of the robots base is known since it is bolted to a table Even if the robot is mobile or attached to a conveyor belt its location at any instant is known because a controller must be following the position of the robots base at all times The HTE or the transformation of the end effector relative to the robots hand is also known since any tool used at the end effector is a known tool and its dimensions and configuration are known UTP or the transformation of the part relative to the Universe is also known since we must know where the part is located if we are to drill a hole in it This location is known by putting the part in a jig through the use of a camera and vision system through the use of a conveyor belt and sensors or other similar devices PTE is also known since we need to know where the hole is to be drilled on the part Consequently the only unknown transformation is RTH or the transformation of the robots hand relative to the robots base This means we need to find the robots joint variables angles of revolute joints and lengths of prismatic joints of the robot in order to position the end effector at the hole for drilling Consequently it is necessary to cal culate this transformation which tells us what needs to be accomplished The transformation is later used to actually solve for joint angles and link lengths To calculate this matrix unlike in an algebraic equation we cannot simply divide the right side by the left side of the equation We need to pre or postmultiply by inverses of appropriate matrices to eliminate them As a result we have UT R 1 UT R RTH HT E HT E 1 UTR 1 UTP PTE HT E 1 226 or since UTR 1 UTR I and HT E HTE 1 I the left side of Eq 226 simplifies to RTH and we get RTH UT R 1UT P PT E HT E 1 227 H E P U R Figure 218 The Universe robot hand part and end effector frames Kinematics of Serial Robots Position Analysis 55 We can check the accuracy of this equation by realizing that HT E 1 is the same as ETH Therefore the equation can be rewritten as RTH UT R 1UTP PT E HT E 1 RT U UTP PTE ETH RTH 228 It is now clear that we need to be able to calculate the inverse of transformation matrices for kinematic analysis as well In order to see what transpires lets calculate the inverse of a simple rotation matrix about the xaxis Please review the process for calculation of square matrices in Appendix A The rotation matrix about the xaxis is Rot xθ 1 0 0 0 Cθ Sθ 0 Sθ Cθ 229 Recall that the following steps must be taken to calculate the inverse of a matrix 1 Calculate the determinant of the matrix 2 Transpose the matrix 3 Replace each element of the transposed matrix by its own minor adjoint matrix 4 Divide the adjoint matrix by the determinant Applying the process to the rotation matrix we get det Rot xθ 1 C2θ S2θ 0 1 Rot xθ T 1 0 0 0 Cθ Sθ 0 Sθ Cθ Now we calculate each minor As an example the minor for the 22 element is Cθ0 Cθ the minor for the 11 element is C2θ S2θ 1 and so on As you notice for the rotation matrix the minor for each element is the same as the element itself Therefore Adj Rot xθ Rot xθ T minor Rot xθ T Since the determinant of the original rotation matrix is 1 dividing the AdjRotx θ matrix by the deter minant yields the same matrix Consequently the inverse of a rotation matrix about the xaxis is the same as its transpose or Rot xθ 1 Rot xθ T 230 Of course you would get the same result with the second method mentioned in Appendix A A matrix with this characteristic is called a unitary matrix It turns out that all rotation matrices are unitary matrices There fore all we need to do to calculate the inverse of a rotation matrix is to transpose it Verify that rotation matrices about the y and zaxes are also unitary in nature Be aware that only rotation matrices are unitary if a matrix is not a simple rotation matrix it may not be unitary The preceding result is true only for a simple 3 3 rotation matrix For a homogenous 4 4 transformation matrix it can be shown that the inverse of the matrix can be written by dividing the matrix into two portions The rotation portion of the matrix can be simply transposed as it is still unitary The position portion of the homogeneous matrix is the negative of the dot product of the pvector with each of the n o and avectors as follows Introduction to Robotics 56 T nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 and T 1 nx ny nz p n ox oy oz p o ax ay az p a 0 0 0 1 231 As shown the rotation portion of the matrix is simply transposed the position portion is replaced by the negative of the dot products and the last row scale factors is not affected This is very helpful since we will need to calculate inverses of transformation matrices but direct calculation of 4 4 matrices is a lengthy process Example 213 Calculate the matrix representing Rot x40 1 Solution The matrix representing a 40 rotation about the xaxis is Rot x40 1 0 0 0 0 0 766 0 643 0 0 0 643 0 766 0 0 0 0 1 The inverse of this matrix is Rot x40 1 1 0 0 0 0 0 766 0 643 0 0 0 643 0 766 0 0 0 0 1 Since the position vector of the matrix is zero its dot product with the n o and avectors is also zero Example 214 Calculate the inverse of the given transformation matrix T 0 5 0 0 866 3 0 866 0 0 5 2 0 1 0 5 0 0 0 1 Solution Based on the previous discussion the inverse of the transformation is T 1 0 5 0 866 0 3 0 5 2 0 866 5 0 0 0 1 3 0 2 0 5 1 0 866 0 5 0 3 0 866 2 0 5 5 0 0 0 0 1 0 5 0 866 0 3 23 0 0 1 5 0 866 0 5 0 1 598 0 0 0 1 You may want to verify that TT 1 is an identity matrix Kinematics of Serial Robots Position Analysis 57 Example 215 In a robotic setup a camera is attached to the fifth link of a 6DOF robot It observes an object and determines its frame relative to the cameras frame Using the following information deter mine the necessary motion the end effector must make to get to the object 5Tcam 0 0 1 3 0 1 0 0 1 0 0 5 0 0 0 1 5TH 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 camTobj 0 0 1 2 1 0 0 2 0 1 0 4 0 0 0 1 HTE 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 Solution Referring to Eq 225 we can write a similar equation to relate the different transformations and frames to each other as RT5 5T H HTE ETobj RT 5 5Tcam camTobj Since RT5 appears on both sides of the equation we can simply neglect it All other matrices with the exception of ETobj are known Then ETobj HT E 1 5T H 1 5Tcam camTobj ET H HT 5 5Tcam camTobj where HT E 1 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 5T H 1 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 Substituting the matrices and the inverses in the equation representing ETobj results in ETobj 1 0 0 0 0 1 0 0 0 0 1 3 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 4 0 0 0 1 0 0 1 3 0 1 0 0 1 0 0 5 0 0 0 1 0 0 1 2 1 0 0 2 0 1 0 4 0 0 0 1 1 0 0 2 0 1 0 1 0 0 1 4 0 0 0 1 Example 216 The following transformation matrix F is the result of two rotations one was θ about the zaxis but it is unclear whether this was the first or second rotation Determine the axis of rotation of α and whether it was performed first or second T Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα Solution To do this we need to decouple the two rotations by premultiplying the transformation by Rot zθ 1 But since we do not know the order of rotations we first assume the rotation were about the reference frame and that the rotation about the zaxis was performed first We write Introduction to Robotics 58 T Rot α Rot zθ T Rot zθ 1 Rot α Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα Cθ Sθ 0 Sθ Cθ 0 0 0 1 C2θ S2θCα SθCθSθCθCα SθSα SθCθSθCθCα S2θ C2θCα CθSα SθSα SαCθ Cα Obviously this is not a satisfactory answer Assuming that rotation about the zaxis was performed second we write T Rot zθ Rot α Rot zθ 1 T Rot α Cθ Sθ 0 Sθ Cθ 0 0 0 1 Cθ SθCα SθSα Sθ CθCα CθSα 0 Sα Cα C2θ S2θ SθCθCα SθCθCα SθCθSαSθCθSα SθCθ SθCθ S2θCα C2θCα S2θSαC2θSα 0 Sα Cα 1 0 0 0 Cα Sα 0 Sα Cα This is clearly a first rotation about the xaxis or a second rotation about the naxis 28 Forward and Inverse Kinematics of Robots Suppose we have a robot whose configuration is known This means that all the link lengths and joint angles are known Calculating the position and orientation of the hand of the robot is called forward kinematic anal ysis In other words if all robot joint variables are known using forward kinematic equations we can calculate where the robot is at any instant However if we want to place the hand of the robot at a desired location and orientation we need to know how much each link length or joint angle must be such that at those values the hand will be at the desired position and orientation This is called inverse kinematic analysis This means that instead of substituting the known robot variables in the forward kinematic equations of the robot we need to find the inverse of these equations to enable us to find the necessary joint values to place the robot at the desired location and orientation In reality the inverse kinematic equations are far more important to enable the robot controller to calculate the joint values using these equations and to run the robot to the desired position and orientation Later we first develop the forward kinematic equations of robots then using these equations we derive the inverse kinematic equations You may recall from Chapter 1 that in order to position and orient a rigid body in space we attach a frame to the body and specify the position of the origin of the frame and the orientation of its 3 axes This requires a total of 6 DOF or alternately six pieces of information to completely define the position and orientation of the body Here too if we want to define or find the position and orientation of the hand of a robot in space we attach a frame to it and define the position and orientation of the hand frame of the robot For a particular Kinematics of Serial Robots Position Analysis 59 configuration of the links and joints of a robot a particular set of equations relate the hand frame to the reference frame Figure 219 shows a hand frame the reference frame and their relative positions and orien tations The undefined connection between the two frames is related to the configuration of the robot Of course there are many different possibilities for this configuration and we will later see how we can develop the equations relating the two frames depending on the robot configuration In order to simplify the process we analyze the position and orientation issues separately First we develop the position equations and then the orientation equations Later we combine the two for a complete set of equations Finally we will see about the use of the DenavitHartenberg representation which is an encom passing representation for any robot configuration 29 Forward and Inverse Kinematic Equations Position In this section we study the forward and inverse kinematic equations for position As was mentioned earlier the position of the origin of a frame attached to a rigid body has 3 DOF and hence it can be completely defined by three pieces of information in any customary coordinate system including Cartesian coordinates three linear motions Cylindrical coordinates two linear motions and one rotation Spherical coordinates two rotations and one linear motion Articulated coordinates three rotations We consider all four possibilities 291 Cartesian Gantry Rectangular Coordinates In this case there are three linear motions along the x y and zaxes In a Cartesian robot all actuators are linear such as a hydraulic ram or a linear power screw and the positioning of the hand of the robot is accom plished by moving the three linear joints along the 3 axes Figure 220 A gantry robot is a Cartesian robot usually attached to a gantry frame upside down Of course since there are no rotations the transformation matrix representing this motion to point p is a simple translation matrix Remember that here we are only concerned with the position of the origin of the frame and not its orientation which we will see next The transformation matrix representing the forward kinematic equation of the position of the hand frame in a Cartesian coordinate system is RTp Tcart pxpypz 1 0 0 px 0 1 0 py 0 0 1 pz 0 0 0 1 232 x y z a n o Figure 219 The hand frame of the robot relative to the reference frame Introduction to Robotics 60 where RTP is the transformation between the reference frame and the origin of the hand p and Tcartpx py pz denotes Cartesian transformation matrix All that is needed for the inverse kinematic solution is simply set ting the desired position equal to p Example 217 We desire to position the origin of the hand frame of a Cartesian robot at point p 546 T Calculate the necessary Cartesian coordinate motions that need to be made Solution Setting the forward kinematic equation represented by the RTP matrix of Eq 232 equal to the desired position yields RTp 1 0 0 px 0 1 0 py 0 0 1 pz 0 0 0 1 1 0 0 5 0 1 0 4 0 0 1 6 0 0 0 1 or px 5 py 4 pz 6 292 Cylindrical Coordinates A cylindrical coordinate system includes two linear translations and one rotation The sequence is a trans lation of r along the xaxis a rotation of α about the zaxis and a translation of l along the zaxis as shown in Figure 221 Since these transformations are all relative to the Universe frame the total transformation caused by these three transformations is found by premultiplying by each matrix as follows x y z p px py pz a n o Figure 220 Cartesian coordinates x y z r l α p a o n Figure 221 Cylindrical coordinates Kinematics of Serial Robots Position Analysis 61 RTp Tcyl rαl Trans 00l Rot zα Trans r00 233 RT p 1 0 0 0 0 1 0 0 0 0 1 l 0 0 0 1 Cα Sα 0 0 Sα Cα 0 0 0 0 1 0 0 0 0 1 1 0 0 r 0 1 0 0 0 0 1 0 0 0 0 1 RTp Tcyl rαl Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 234 The first three columns represent the orientation of the frame after this series of transformations However at this point we are only interested in the position of the origin of the frame or the last column Obviously in cylindrical coordinate movements due to the rotation of α about the zaxis the orientation of the moving frame changes This orientation change will be discussed later You may restore the original orientation of the frame by rotating the n o a frame about the aaxis an angle of α which is equivalent to postmultiplying the cylindrical coordinate matrix by a rotation matrix of Rot a α As a result the frame will be at the same location but will be parallel to the reference frame again as follows Tcyl Rot a α Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 C α S α 0 0 S α C α 0 0 0 0 1 0 0 0 0 1 1 0 0 rCα 0 1 0 rSα 0 0 1 l 0 0 0 1 Clearly the location of the origin of the moving frame did not change but the orientation was restored to being parallel to the reference frame Notice that the last rotation was performed about the local aaxis in order to not cause any change in the position of the frame but only in its orientation For inverse kinematic equations we equate the position terms of Eq 234 to the desired values However as is discussed in Appendix A it is very important to determine in which quadrant the actual answer is oth erwise the result will be incorrect Throughout the book whenever possible we try to find the sine and the cosine of the angle independently and use the ATAN2 function for correct answer Unfortunately in many instances this is not possible For cylindrical coordinates we get rCα Px rSα Py α ATAN2 PyPx l Pz 235 Example 218 Suppose we desire to place the origin of the hand frame of a cylindrical robot at 4 5 6T Calculate the joint variables of the robot Solution Using Eq 235 we get l 6 rCα 5 and rSα 4 and therefore α ATAN2 45 38 7 Substituting α into either equation yields r 64 The final answer is r 64 units α 38 7 and l 6 units Introduction to Robotics 62 Example 219 The position and restored orientation of a cylindrical robot are given Find the matrix representing the original position and orientation of the robot before it was restored T 1 0 0 2 394 0 1 0 6 578 0 0 1 9 0 0 0 1 Solution Since r is always positive it is clear that Sα and Cα are positive and negative respectively Therefore α is in the second quadrant From T we get l 9 α ATAN2 6 578 2 394 110 r sin α 6 578 r 7 Substituting these values into Eq 234 yields the original orientation of the robot RTp Cα Sα 0 rCα Sα Cα 0 rSα 0 0 1 l 0 0 0 1 0 342 0 9397 0 2 394 0 9397 0 342 0 6 578 0 0 1 9 0 0 0 1 293 Spherical Coordinates A spherical coordinate system consists of one linear motion and two rotations The sequence we study here is a translation of r along the zaxis a rotation of β about the yaxis and a rotation of γ about the zaxis as shown in Figure 222 Since these transformations are all relative to the Universe frame the total transformation can be found by premultiplying by each matrix as follows RT P Tsph rβγ Rot zγ Rot yβ Trans 00r 236 β γ x y z p r a o n Figure 222 Spherical coordinates Kinematics of Serial Robots Position Analysis 63 RT p Cγ Sγ 0 0 Sγ Cγ 0 0 0 0 1 0 0 0 0 1 Cβ 0 Sβ 0 0 1 0 0 Sβ 0 Cβ 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 r 0 0 0 1 RTP Tsph rβγ CβCγ Sγ SβCγ rSβCγ CβSγ Cγ SβSγ rSβSγ Sβ 0 Cβ rCβ 0 0 0 1 237 The first three columns represent the orientation of the frame while the last column is the position of the origin Here too the original orientation of the final frame may be restored to make it parallel to the ref erence frame This exercise is left for the reader to find the correct sequence of movements to get the right answer The inverse kinematic equations for spherical coordinates are more complicated than the simple Car tesian or cylindrical coordinates because the two angles β and γ are coupled Lets see how this could be done through an example Example 220 Suppose that we now want to place the origin of the hand of a spherical robot at 4 5 6T Calculate the joint variables of the robot Solution Setting the components of the location of the origin of the frame from Tsph matrix of Eq 237 to the desired values we get rSβCγ 5 rSβSγ 4 rCβ 6 From the third equation we determine that the Cβ is positive but there are no independent values for Sβ Sγ Cγ and consequently we cannot use the ATAN2 function As a result there are two possible solutions for each angle Later we will have to check the final results to ensure they are correct tan γ 4 5 γ 38 7 or 218 7 then Sγ 0 625 or 0 625 and Cγ 0 781 or 0 781 and rSβ 4 0 625 6 4 or 6 4 and since rCβ 6 β 46 8 or 46 8 and r 8 77 You may check both answers and verify that they both satisfy all position equations If you also follow these angles about the given axes in 3D you get to the same point physically However you must notice that only one set of answers will also satisfy the orientation equations In other words these two answers result in the same position but at different orientations Since we are not concerned with the orientation of the hand frame at this point both position answers are correct In fact since we can not specify any orientation for a 3DOF robot anyway we cannot determine which of the two answers relates to a desired orientation Introduction to Robotics 64 294 Articulated Coordinates Articulated coordinates consist of three rotations as shown in Figure 223 We will develop the matrix rep resentation for this later when we discuss the DenavitHartenberg representation 210 Forward and Inverse Kinematic Equations Orientation Suppose the moving frame attached to the hand of the robot has already moved to a desired position in Cartesian cylindrical spherical or articulated coordinates and is either parallel to the reference frame or in an orientation other than what is desired The next step is to rotate the frame appropriately in order to achieve a desired orientation without changing its position This can only be accomplished by rotating about the current frame axes rotations about the reference frame axes change the position The appro priate sequence of rotations depends on the design of the wrist of the robot and the way the joints are assembled together We consider the following three common configurations Roll pitch yaw RPY angles Euler angles Articulated joints 2101 Roll Pitch Yaw RPY Angles This is a sequence of three rotations about the current aon axes respectively which orients the hand to a desired orientation The assumption here is that the current frame is parallel to the reference frame before the application of RPY Otherwise the final orientation of the robots hand is a combination of the previous orientation postmultiplied by the RPY To maintain the position of the frame and only rotate it to the desired orientation we postmultiply the frame by the RPY matrices Referring to Figure 224 the RPY sequence of rotations consists of Rotation of ϕa about the aaxis zaxis of the moving frame calledroll Rotation of ϕo about the oaxis yaxis of the moving frame called pitch Rotation of ϕn about thenaxis xaxis of the moving frame called yaw x y θ2 θ1 θ3 z a n Figure 223 Articulated coordinates Kinematics of Serial Robots Position Analysis 65 The matrix representing the RPY orientation change is RPY ϕaϕoϕn Rot aϕa Rot oϕo Rot nϕn CϕaCϕo CϕaSϕoSϕnSϕaCϕn CϕaSϕoCϕn SϕaSϕn 0 SϕaCϕo SϕaSϕoSϕn CϕaCϕn SϕaSϕoCϕnCϕaSϕn 0 Sϕo CϕoSϕn CϕoCϕn 0 0 0 0 1 238 This matrix represents the orientation change caused by the RPY alone The location and the final orien tation of the frame relative to the reference frame will be the product of the two matrices representing the position change and the RPY For example suppose that a robot is designed based on spherical coordinates and RPY Then the robot may be represented by RTH Tsph rβγ RPY ϕaϕoϕn The inverse kinematic solution for the RPY is more complicated than the spherical coordinates because here there are three coupled angles where we need to have information about the sines and the cosines of all three angles individually to solve for the angles To decouple these angles we premultiply both sides of Eq 238 by Rot aϕa 1 Rot aϕa 1RPY ϕaϕoϕn Rot oϕo Rot nϕn 239 Assuming that the final desired orientation achieved by RPY is represented by the n o a matrix we have Rot aϕa 1 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Rot oϕo Rot nϕn 240 Multiplying the matrices we get nxCϕa nySϕa oxCϕa oySϕa axCϕa aySϕa 0 nyCϕanxSϕa oyCϕaoxSϕa ayCϕaaxSϕa 0 nz oz az 0 0 0 0 1 Cϕo SϕoSϕn SϕoCϕn 0 0 Cϕn Sϕn 0 Sϕo CϕoSϕn CϕoCϕn 0 0 0 0 1 241 z x y a z a n o z n o a n o x y x y Rotation ϕa Rotation ϕo Rotation ϕn ϕa ϕo ϕn Figure 224 RPY rotations about the current axes Introduction to Robotics 66 Remember that the n o a components in Eq 240 represent the final desired values normally given or known The values of the RPY angles are the unknown variables Equating the different elements of the righthand and the lefthand sides of Eq 241 results in the following From the 21 elements we get nyCϕanxSϕa 0 ϕa ATAN2 nynx and ϕa ATAN2 ny nx 242 Note that since we do not know the sign of sinϕa or cosϕa two complementary solutions are possible From the 31 and 11 elements we get Sϕo nz Cϕo nxCϕa nySϕa ϕo ATAN2 nz nxCϕa nySϕa 243 And finally from the 22 and 23 elements we get Cϕn oyCϕaoxSϕa Sϕn ayCϕa axSϕa ϕn ATAN2 ayCϕa axSϕa oyCϕaoxSϕa 244 Later we use the same approach for decoupling angles in other equations Example 221 The desired final position and orientation of the hand of a Cartesian RPY robot is as follows Find the necessary RPY angles and displacements RTP nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 233 0 255 0 939 4 24 0 113 0 951 0 287 2 65 0 966 0 173 0 192 6 0 0 0 1 Solution From the equations we find two sets of answers ϕa ATAN2 nynx ATAN2 0 1130 233 26 or 206 ϕo ATAN2 nz nxCϕa nySϕa ATAN2 0 966 0 259 75 or 255 ϕn ATAN2 ayCϕa axSϕa oyCϕaoxSϕa ATAN2 0 669 0 743 42 or 222 px 4 24 py 2 65 pz 6 units Example 222 For the same position and orientation as in Example 221 find all necessary joint vari ables if the robot is cylindrical RPY Solution In this case we use RTP 0 233 0 255 0 939 4 24 0 113 0 951 0 287 2 65 0 966 0 173 0 192 6 0 0 0 1 Tcyl rαl RPY ϕaϕoϕn The righthand side of this equation now involves four coupled angles as before these must be decoupled However since the rotation of α about the zaxis for the cylindrical coordinates does Kinematics of Serial Robots Position Analysis 67 not affect the aaxis it remains parallel to the zaxis As a result the rotation of ϕa about the aaxis for RPY will simply be added to α This means that the 26 angle we found for ϕa is the summation of ϕa α see Figure 225 Using the position information given the solution from Example 221 and referring to Eq 234 we get rCα 4 24 rSα 2 65 α 32 ϕa α 26 ϕa 6 Sα 0 53 r 5 pz 6 l 6 Asin Example 2 21 ϕo 75 ϕn 42 Of course a similar solution may be found for the second set of answers 2102 Euler Angles Euler angles are very similar to RPY except that the last rotation is also about the current aaxis as shown in Figure 226 We still need to make all rotations relative to the current axes to prevent any change in the posi tion of the robot The rotations representing the Euler angles are Rotation of ϕabout theaaxis z axis of the moving frame followed by Rotation of θ about the oaxis y axis of the moving frame followed by Rotation of ψ about theaaxis z axis of the moving frame x y z r l P a o n ϕa α Figure 225 Cylindrical and RPY coordinates from Example 221 z x y a z a n o z n o a n o x y x y Rotation of ϕ about the aaxis Rotation of θ about the oaxis Rotation of ψ about the aaxis ψ θ ϕ Figure 226 Euler rotations about the current axes Introduction to Robotics 68 The matrix representing the Euler angles orientation change is Euler ϕθψ Rot aϕ Rot oθ Rot aψ CϕCθCψ SϕSψ CϕCθSψ SϕCψ CϕSθ 0 SϕCθCψ CϕSψ SϕCθSψ CϕCψ SϕSθ 0 SθCψ SθSψ Cθ 0 0 0 0 1 245 Once again this matrix represents the orientation change caused by the Euler angles alone The location and the final orientation of the frame relative to the reference frame will be the product of the two matrices representing the position change and the Euler angles The inverse kinematic solution for the Euler angles is found in a manner very similar to RPY We pre multiply the two sides of Eq 245 by Rot 1 aϕ to separate ϕ from one side and move it to the other By equating the elements of the two sides to each other we find the following equations Assuming the final desired orientation achieved by the Euler angles is represented by the n o a matrix Rot 1 aϕ nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 CθCψ CθSψ Sθ 0 Sψ Cψ 0 0 SθCψ SθSψ Cθ 0 0 0 0 1 246 or nxCϕ nySϕ oxCϕ oySϕ axCϕ aySϕ 0 nxSϕ nyCϕ oxSϕ oyCϕ axSϕ ayCϕ 0 nz oz az 0 0 0 0 1 CθCψ CθSψ Sθ 0 Sψ Cψ 0 0 SθCψ SθSψ Cθ 0 0 0 0 1 247 Remember that the n o a components in Eq 246 represent the final desired values that are normally given or known The values of the Euler angles are the unknown variables Equating the different elements of the righthand and the lefthand sides of Eq 247 results in the following From the 23 elements we get axSϕ ayCϕ 0 ϕ ATAN2 ayax or ϕ ATAN2 ay ax 248 With ϕ known all the elements of the lefthand side of Eq 247 are known From the 21 and 22 elements we get Sψ nxSϕ nyCϕ Cψ oxSϕ oyCϕ ψ ATAN2 nxSϕ nyCϕ oxSϕ oyCϕ 249 And finally from the 13 and 33 elements we get Sθ axCϕ aySϕ Cθ az θ ATAN2 axCϕ aySϕ az 250 Kinematics of Serial Robots Position Analysis 69 Example 223 The desired final orientation of the hand of a CartesianEuler robot is given Find the necessary Euler angles RT H nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 167 0 773 0 612 7 0 932 0 078 0 354 2 0 321 0 630 0 707 6 0 0 0 1 Solution From these equations we find ϕ ATAN2 ayax ATAN2 0 354 0 612 30 or 210 Realizing that both the sines and cosines of 30 and 210 can be used for the remainder ψ ATAN2 nxSϕ nyCϕ oxSϕ oyCϕ 0 8910 454 63 or 243 θ ATAN2 axCϕ aySϕaz ATAN2 7070 707 45 or 135 Unlike Example 222 for a robot of Euler cylindrical configuration it will not be easy to find the angles because there are two rotations about the aaxis The angles have to be decoupled individually In this case it is probably better to use the DenavitHartenberg technique presented in Section 212 2103 Articulated Joints Articulated joints consist of three rotations other than RPY or Euler Similar to section 294 we develop the matrix representing articulated joints in Section 212 when we discuss the DenavitHartenberg representation 211 Forward and Inverse Kinematic Equations Position and Orientation The matrix representing the final location and orientation of the robot is a combination of a positioning choice and an orientation choice For example if the robot is Cartesian and RPY the final position and ori entation of the end frame are RTH Tcart pxpypz RPY ϕaϕoϕn 251 Similarly for a spherical and Euler robot we get RTH Tsph rβγ Euler ϕθψ 252 The forward and inverse kinematic solutions for these cases are not developed here since many different combinations are possible Instead in complicated designs the DenavitHartenberg representation is recom mended We will discuss this next 212 DenavitHartenberg Representation of Forward Kinematic Equations of Robots In 1955 Denavit and Hartenberg 4 published a paper in the ASME Journal of Applied Mechanics that was later used to represent and model robots and to derive their equations of motion This technique has become a standard way of representing robots and modeling their motions and therefore is essential to learn Addi tionally the method by which frames are assigned and handled can be used in countless other applications Introduction to Robotics 70 The DenavitHartenberg DH method of representation is a very simple way of modeling robot links and joints of any configuration regardless of the sequence or complexity It can also be used to represent trans formations in any coordinates we have already discussed such as Cartesian cylindrical spherical Euler and RPY Additionally it can be used for representation of allrevolute articulated robots SCARA robots or any possible combinations of joints and links Although the direct modeling of robots with the previous techni ques is faster and more straight forward the DH representation has an added benefit as we see later analyses of differential motions and Jacobians dynamic analysis force analysis and others are based on the results obtained from DH representation 59 Robots may be made of a succession of joints and links in any order The joints may be either prismatic linear or revolute rotational move in different planes and have offsets The links may also be of any length including zero may be twisted and bent and may be in any plane We need to be able to model and analyze any robot configuration whether or not it follows any of the preceding specific coordinates To do this we assign a reference frame to each joint and use a general procedure to transform from one joint to the next one frame to the next If we combine all the transformations from the base to the first joint from the first joint to the second joint etc until we get to the last joint we will have the robots total trans formation matrix In the following sections we define a general procedure based on the DH representation to assign reference frames to each joint Then we define how a transformation between any two successive frames may be accomplished Finally we write the total transformation matrix for the robot A robot may be made of a series of links and joints in any form Figure 227 represents three successive joints and two links between them Although these joints and links are not necessarily similar to any real robot joint or link they are very general and can easily represent any joint or link in real robots The joints may be revolute or prismatic or both Although in real robots it is customary to only have 1DOF joints the joints in Figure 227 represent 1 or 2DOF joints In Figure 227a we assign joint number n to the first joint n 1 to the second joint and n 2 to the third joint There may be other joints before or after these Each link is also assigned a link number as shown Link n will be between joints n and n 1 and link n 1 is between joints n 1 and n 2 Although this seems tedious in practice it is very intuitive and simple To model the robot with the DH representation we first assign a local reference frame to each and every joint To each joint we assign a local zaxis and an xaxis although for moving frames we have used the n o and a designations for simplicity we use x y and z here We normally do not need to assign a yaxis since we always know that yaxes are mutually perpendicular to both x and zaxes In addition the Denavit Har tenberg representation does not use the yaxis at all The following is the procedure for assigning a local ref erence frame to each joint All joints without exception are represented by a zaxis If the joint is revolute the zaxis is in the direction of rotation as followed by the righthand rule for rotations If the joint is prismatic the z axis is along the direction of the linear movement In each case the index number for the zaxis of joint n is n 1 For example the zaxis representing motions about joint number n 1 is zn These simple rules allow us to quickly assign zaxes to all joints For revolute joints the rotation about the z axis represented by θ is the joint variable For prismatic joints the length of the link along the zaxis represented by d is the joint variable As shown in Figure 227a in general joints may not necessarily be parallel or intersecting As a result the zaxes may be skew lines There is always one line mutually perpendicular to any two skew lines called the common normal which is the shortest distance between them We always assign the xaxis of the local reference frame in the direction of the common normal between the previous and current axes Therefore if an represents the common normal between zn1 and zn the direction of xn is along an Similarly if the common normal between zn and zn1 is an1 the direction of xn1 will be along an1 The common normal lines between successive joints are not necessarily intersecting or collinear As a result the origins of two successive frames may also not be at the same location Based on the above we can assign coordinate frames to all joints with the following special cases Kinematics of Serial Robots Position Analysis 71 a Joint n Joint n1 Joint n2 x y z zn1 zn zn1 dn1 an an1 αn1 αn θn1 θn θn2 Linkn Linkn1 zn Parallel to zn Parallel to zn1 xn yn xn1 θn1 zn zn1 an1 xn1 dn1 xn zn zn1 an1 xn1 dn1 xn zn zn1 an1 xn1 xn zn zn1 xn1 xn αn1 zn zn1 xn1 xn zn zn1 xn1 xn b c d e f g Figure 227 The DenavitHartenberg representation of a general purpose jointlink combination Introduction to Robotics 72 If two zaxes are parallel there are an infinite number of common normals between them We pick the common normal that is collinear with the common normal of the previous joint This will sim plify the model If the zaxes of two successive joints are intersecting there is no common normal between them or it has a zero length We assign the xaxis along a line perpendicular to the plane formed by the two axes This means that the common normal is a line perpendicular to the plane containing the two zaxes which is equivalent of picking the direction of the crossproduct of the two zaxes This also simplifies the model In Figure 227a θ represents a rotation about the zaxis d represents the distance on the zaxis between two successive common normals or joint offset a represents the length of each common normal the length of a link and α represents the angle between two successive zaxes also called the twist angle Commonly only θ and d are joint variables Values a and α are known physical parameters The next step is to follow the necessary motions to transform from one reference frame to the next Assum ing we are at the local reference frame xnzn we do the following sequence of four standard motions to get to the next local reference frame xn1zn1 1 Rotate about the znaxis an angle of θn 1 Figure 227ab This will make xn parallel to xn1 This is true because an and an1 are both perpendicular to zn and rotating zn an angle of θn 1 will make them parallel and coplanar 2 Translate along the znaxis a distance of dn1 to make xn and xn1 collinear Figure 227c Since xn and xn1 were already parallel and normal to zn moving along zn will lay them over each other 3 Translate along the alreadyrotated xnaxis a distance of an1 to bring the origins of xn and xn1 together Figure 227de At this point the origins of the two reference frames will be at the same location 4 Rotate the znaxis about the xn1axis an angle of αn 1 to align the znaxis with the zn 1axis Figure 227f At this point frames n and n 1 will be exactly the same Figure 227g and we have transformed from one to the next Repeating the exact same four motions between the successive next frames n 1 and n 2 etc results in the total transformation between the reference frame and the end frame Starting with the robots reference frame we can transform to the first joint second joint etc until the end effector Note that this sequence of movements remains the same between any two frames The transformation nTn 1 called An 1 between two successive frames representing the four movements is the product of the four matrices representing them Since all transformations are relative to the current frame they are measured and performed relative to the axes of the current local frame all matrices are post multiplied The result is nTn 1 An 1 Rot zθn 1 Trans 00dn 1 Trans an 100 Rot xαn 1 Cθn 1 Sθn 1 0 0 Sθn 1 Cθn 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 dn 1 0 0 0 1 1 0 0 an 1 0 1 0 0 0 0 1 0 0 0 0 1 1 0 0 0 0 Cαn 1 Sαn 1 0 0 Sαn 1 Cαn 1 0 0 0 0 1 An 1 Cθn 1 Sθn 1Cαn 1 Sθn 1Sαn 1 an 1Cθn 1 Sθn 1 Cθn 1Cαn 1 Cθn 1Sαn 1 an 1Sθn 1 0 Sαn 1 Cαn 1 dn 1 0 0 0 1 253 Kinematics of Serial Robots Position Analysis 73 For example the transformation between joints 2 and 3 of a generic robot is 2T 3 A3 Cθ3 Sθ3Cα3 Sθ3Sα3 a3Cθ3 Sθ3 Cθ3Cα3 Cθ3Sα3 a3Sθ3 0 Sα3 Cα3 d3 0 0 0 1 254 We should expect to have one A matrix for each joint Calling each transformation an An1 the total trans formation between the base and the hand of the robot is RTH RT1 1T2 2T 3 n1Tn A1A2A3An 255 where n is the joint number For a 6DOF robot there could be six A matrices To facilitate the calculation of the A matrices we use a parameters table Table 21 where joint and link parameters from the schematic drawing of the robot are determined Subsequently these values are substi tuted into each A matrix In the following examples we assign frames as necessary fill out the parameters table and substitute the values into the A matrices Starting with a simple 2axis robot and moving up to a robot with six axes we apply the DH representation in the following examples to derive the forward kinematic equations for each one Many additional practical notes are discussed as well Example 224 For the simple 2axis planar robot in Figure 228 assign the necessary coordinate sys tems based on the DH representation fill out the parameters table and derive the forward kinematic equations for the robot Table 21 DH parameters table θ d a α 01 12 23 34 45 56 xU yU zU z0 z1 zH x0 x1 xH a1 a2 θ2 θ1 Figure 228 A simple 2axis articulated robot arm Introduction to Robotics 74 Solution First note that both joints rotate in the xy plane and that a frame xH zH shows the end of the robot We start by assigning the zaxes to the joints z0 is assigned to joint 1 and z1 is assigned to joint 2 Figure 228 shows both zaxes pointing out from the page as are the zU and zHaxes Notice that the 0frame is fixed and does not move the robot moves relative to it Next we assign the xaxis for each frame Since the first frame frame 0 is at the base of the robot and therefore there are no joints before it the direction of x0 is arbitrary For convenience only we may choose to assign it in the same direction as the Universe xaxis As we see later there is no problem if another direction is chosen all it means is that if we were to specify UTH instead of 0TH we would have to include an additional fixed rotation to indicate that the xU and x0axes are not parallel Since z0 and z1 are parallel the common normal between them is in the direction between the two and therefore the x1axis is as shown Table 22 shows the parameters table for the robot To identify the values follow the four necessary transformations required to go from one frame to the next according to the DH convention 1 Rotate about the z0axis an angle of θ1 to make x0 parallel to x1 2 Since x0 and x1 are in the same plane translation d along the z0axis is zero 3 Translate along the alreadyrotated x0axis a distance of a1 4 Since the z0 and z1axes are parallel the necessary rotation α about the x1axis is zero The same steps can be repeated for transforming between frames 1 and H Notice that since there are two revolute joints the unknowns are θ1 and θ2 The forward kinematic equation of the robot is found by substituting these parameters into the corresponding A matrices as follows A1 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 and A2 C2 S2 0 a2C2 S2 C2 0 a2S2 0 0 1 0 0 0 0 1 0TH A1 A2 C1C2S1S2 C1S2S1C2 0 a2 C1C2S1S2 a1C1 S1C2 C1S2 S1S2 C1C2 0 a2 S1C2 C1S2 a1S1 0 0 1 0 0 0 0 1 Referring to Appendix A we use C1C2S1S2 C θ1 θ2 C12 and S1C2 C1S2 S θ1 θ2 S12 to simplify the transformation matrix to 0T H C12 S12 0 a2C12 a1C1 S12 C12 0 a2S12 a1S1 0 0 1 0 0 0 0 1 256 Table 22 DH parameters table for Example 224 θ d a α 01 θ1 0 a1 0 1H θ2 0 a2 0 Kinematics of Serial Robots Position Analysis 75 The forward kinematic solution allows us to find the location and orientation of the robots end if values for θ1 θ2 a1 and a2 are specified We find the inverse kinematic solution for this robot later Example 225 Assign the necessary frames to the robot in Figure 229 and derive the forward kin ematic equation of the robot Solution As you see this robot is very similar to the robot from Example 224 except that another joint is added to it But notice how this small addition changes a few things in the analysis The same assignments of frames 0 and 1 are applicable to this robot but we need to add another frame for the new joint We add a z2axis perpendicular to the joint as shown Since the z1 and z2axes intersect at joint 2 the x2axis is perpendicular to both at the same location as shown remember z1 points out of the page Table 23 shows the parameters for the robot Follow the four required transformations between every two frames and make sure that you note the following The direction of the Hframe is changed to represent the motions of the gripper The physical length of link 2 is now d3 and not a2 due to the change in the direction of zH Also notice the direction of x2 which is perpendicular to both z1 and z2 Joint 3 is shown as a revolute joint In this case d3 is fixed However the joint could have been a prismatic joint in which case d3 would be a variable but θ3 would be fixed or both in which case both θ3 and d3 would be variables Remember that the rotations are measured with the righthand rule The curled fingers of your right hand rotating in the direction of rotation determine the direction of the axis of rotation along the thumb θ2 θ3 θ1 xU yU zU z0 z1 zH x0 x1 xH a1 d3 z2 x2 Figure 229 The 3DOF robot from Example 225 Table 23 DH parameters table for Example 225 θ d a α 01 θ1 0 a1 0 12 90 θ2 0 0 90 2H θ3 d3 0 0 Introduction to Robotics 76 Notice that the rotation about z1 is shown to be 90 θ2 and not θ2 This is because if we assume that the robots home position where all angles are zero is when it is horizontal there is a 90 angle between x1 and x2 see Figure 230 This is a very important factor in the analysis We need to always consider what the reset position of the robot is because all joint motions are measured from that position Remember that whether or not the robot is shown in its home position it is a machine and it moves You must visualize its motions Another important note is that at times it appears that the angle between two xaxes is zero but we know that one of them moves relative to the other as joint angles change We must take this into account when assigning values in the parameters table Robot joints move although the robot is drawn in one position Noting that sin 90 θ cos θ and cos 90 θ sin θ the matrices representing each joint transformation and the total transformation of the robot are A1 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 A2 S2 0 C2 0 C2 0 S2 0 0 1 0 0 0 0 0 1 A3 C3 S3 0 0 S3 C3 0 0 0 0 1 d3 0 0 0 1 0TH A1A2A3 C1S2S1C2 C3 C1S2S1C2 S3 C1C2S1S2 C1C2S1S2 d3 a1C1 C1C2S1S2 C3 C1C2S1S2 S3 C1S2 S1C2 C1S2 S1C2 d3 a1S1 S3 C3 0 0 0 0 0 1 Simplifying the matrix with C1C2S1S2 C12 and S1C2 C1S2 S12 we get 0T H A1A2A3 S12C3 S12S3 C12 C12d3 a1C1 C12C3 C12S3 S12 S12d3 a1S1 S3 C3 0 0 0 0 0 1 for θ1 0 θ2 0 θ3 0 0TH 0 0 1 d3 a1 1 0 0 0 0 1 0 0 0 0 0 1 and θ3 θ1 θ2 z0 z1 x0 a1 zH x1 d3 xH z2 x2 xU yU zU Figure 230 Robot from Example 224 in reset position Kinematics of Serial Robots Position Analysis 77 for θ1 90 θ2 0 θ3 0 0TH 1 0 0 0 0 0 1 d3 a1 0 1 0 0 0 0 0 1 Verify that these values do in fact represent the robot correctly by comparing the hand frame with the Universe Example 226 For the simple 6DOF robot in Figure 231 assign the necessary coordinate frames based on the DH representation fill out the accompanying parameters table and derive the forward kinematic equation of the robot Assume that all joint offsets cancel each other so that d values are zero Solution As you notice when the number of joints increases in this case to six the analysis of the forward kin ematics becomes more complicated However all principles apply the same as before Also notice that this 6DOF robot is still simplified with no joint offsets or twist angles In this example for simplicity we are assuming that joints 2 3 and 4 are in the same plane which renders their dn values zero oth erwise the presence of offsets makes the equations slightly more involved Generally offsets change the position terms but not orientation terms To assign coordinate frames to the robot we first assign zaxes to the joints followed by xaxes Follow the coordinates as shown in Figures 232 and 233 1 2 3 4 5 6 x y z Figure 231 A simple 6DOF articulate robot x y z 1 2 3 z0 x0 z1 x1 z2 x2 z3 x4 x3 z4 z5 x5 z6 x6 a2 a3 a4 4 5 6 Figure 232 Reference frames for the simple 6DOF articulate robot Introduction to Robotics 78 Figure 233 is a line drawing of the robot in Figure 231 for simplicity Notice where the origin of each frame is and why Start at joint 1 z0 represents motions about the first joint x0 is chosen to be parallel to the xaxis of the reference frame This is done only for convenience x0 is a fixed axis representing the base of the robot and does not move The movement of the first joint occurs around the z0x0 axes Next z1 to z6 are assigned to joints 26 and the end effector x1 is normal to z0 and z1 because these two axes are intersecting x2 is in the direction of the common normal between z1 and z2 x3 is in the direction of the common normal between z2 and z3 Similarly x4 is in the direction of the common normal between z3 and z4 Finally z5 and z6 are as shown because they are parallel and collinear z5 represents the motions about joint 6 while z6 represents the motions of the end effector Although we normally do not include the end effector in the equations of motion it is necessary to include the end effector frame regardless because it allows transforming out of frame z5x5 Also important to notice is the location of the origins of the first and the last frames This determines the total transformation equation of the robot You may assign other or different intermediate coordinate frames between the first and the last but as long as the first and the last frames are not changed the total transformation of the robot will be the same Notice that the origin of the first joint is not at the physical location of the joint Practically whether the actual joint is a little higher or lower will not make any difference in the robots move ments Therefore the origin can be as shown or at the base without regard to the physical location of the joint If at the base the total transformation between the base and the end effector of the robot would have included the height of the robot too whereas the way we have assigned the base frame our measurements are relative to the present 0frame We can simply add the height to our equation later in order to facilitate measuring height from the base Also notice that in reality we may choose the opposite sense for any x or z axis Although the para meters table changes and intermediate A matrices are slightly different the final transformation of the robot will be the same The choice of the sense of these vectors is arbitrary Next we follow the assigned coordinate frames to fill out the parameters of Table 24 Starting with z0x0 is a rotation of θ1 to bring x0 to x1 a translation of zero along z1 and zero along x1 to align the xs x y z z0 z1 x1 z2 x2 z3 x3 z4 x4 z5 x5 x6 a2 a3 a4 x0 z6 Figure 233 Line drawing of the reference frames for the 6DOF articulate robot Table 24 Parameters for the robot from Example 225 θ d a α 01 θ1 0 0 90 12 θ2 0 a2 0 23 θ3 0 a3 0 34 θ4 0 a4 90 45 θ5 0 0 90 56 θ6 0 0 0 Kinematics of Serial Robots Position Analysis 79 together and a rotation of α1 90 to bring z0 to z1 Remember that the rotations are measured with the righthand rule The curled fingers of your right hand rotating in the direction of rotation deter mine the direction of the axis of rotation along the thumb At this point we are at z1x1 Continue with the next joints the same way to fill out the table You must realize that like any other machine robots do not stay in one configuration as shown in a drawing You need to visualize the motions even though the schematic is in 2D For example x3 is always in the direction of a3 along the line between joints 3 and 4 As the lower arm of the robot rotates about joint 3 x3 moves as well but not x2 However x2 will move as the upper arm rotates about joint 2 This must be kept in mind as we determine the parameters θ represents the joint variable for a revolute joint and d represents the joint variable for a prismatic joint Since this is an allrevolute robot all joint variables are angles Since there are no joint offsets all d values are zero The transformations between each two successive joints can be written by simply substituting the parameters from the parameters table into the Amatrix We get A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 S2 0 C2a2 S2 C2 0 S2a2 0 0 1 0 0 0 0 1 A3 C3 S3 0 C3a3 S3 C3 0 S3a3 0 0 1 0 0 0 0 1 A4 C4 0 S4 C4a4 S4 0 C4 S4a4 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 257 Once again to simplify the final solutions we use the following trigonometric functions Sθ1Cθ2 Cθ1Sθ2 S θ1 θ2 S12 Cθ1Cθ2Sθ1Sθ2 C θ1 θ2 C12 258 The total transformation between the base of the robot where the 0frame is and the hand is RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5S6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5S6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 259 Introduction to Robotics 80 Note the following important insights It is acceptable to use additional frames to make things easier to follow However you may not have any fewer or more unknown variables than you have joints It is possible that in a robot model the same zaxis may represent both a rotation and a translation effectively two joints together This results in one A matrix having two unknowns ending up with one fewer A matrix But the results will be the same However in reality there are no practical revoluteprismatic joints in one It is better to still use two separate frames representing one unknown each The DH representation does not use a transformation along the yaxis Therefore if you find that you need to move along the yaxis to transform from one frame to another you either have made a mistake or you need an additional frame in between In reality there may be small angles between parallel zaxes due to manufacturing errors or tol erances To be able to represent these errors between seemingly parallel zaxes it is necessary to make transformations along the yaxis Therefore the DH methodology cannot represent these errors Note that frame xnzn represents link n before itself It is attached to link n and moves with it relative to frame n 1 Motions about joint n are relative to frame n 1 Obviously you may use other representations to develop the kinematic equations of a robot How ever in order to be able to use subsequent derivations that will be used for differential motions dynamic analysis and trajectory planning which are all based on the DH representation you may benefit from following this methodology So far in all of our examples in this section we derived the transformation between the base of the robot and the end effector RTH It is also possible to derive the transformation between the Universe frame and the end effector UTH In that case we need to premultiply RTH by the transformation between the base and the Universe frames or UTH UTR RTH Since the location of the base of the robot is always known this will not add to the number of unknowns or complexity of the problem The transformation UTR usually involves simple translations and rotations about the Universe frame to get to the base frame This process is not based on the DH representation it is a simple set of rotations and translations As you have probably noticed the DH representation can be used for any configuration of joints and links whether or not they follow known coordinates such as Cartesian spherical Euler etc Addi tionally you cannot use those representations if there are any twist angles or joint offsets In reality twist angles and joint offsets are very common The derivation of kinematic equations based on Car tesian cylindrical spherical RPY and Euler was presented only for teaching purposes You should normally use DH for analysis Example 227 The Stanford arm Assign coordinate frames to the Stanford arm Figure 234 and fill out the parameters table The Stanford arm is a spherical coordinate arm where the first two joints are revolute the third is prismatic and the last three wrist joints are all revolute joints The home posi tion of the arm is when it is vertical Solution To allow you to work on this before you see the solution the answer to this problem is included at the end of this chapter It is recommended that before you look at the assignment of the frames and the solution of the arm you try to do this on your own The final forward kinematic solution of the arm 5 is the product of the six matrices representing the transformation between successive joints as follows Kinematics of Serial Robots Position Analysis 81 RTHStanford 0T 6 nx ox ax px ny oy ay py nz oz ay pz 0 0 0 1 where nx C1 C2 C4C5C6S4S6 S2S5C6 S1 S4C5C6 C4S6 ny S1 C2 C4C5C6S4S6 S2S5C6 C1 S4C5C6 C4S6 nz S2 C4C5C6S4S6 C2S5C6 ox C1 C2 C4C5S6 S4C6 S2S5S6 S1 S4C5S6 C4C6 oy S1 C2 C4C5S6 S4C6 S2S5S6 C1 S4C5S6 C4C6 oz S2 C4C5S6 S4C6 C2S5S6 ax C1 C2C4S5 S2C5 S1S4S5 ay S1 C2C4S5 S2C5 C1S4S5 az S2C4S5 C2C5 px C1S2d3S1d2 py S1S2d3 C1d2 pz C2d3 260 1 2 3 4 x y z 5 6 Figure 234 Schematic drawing of the Stanford arm Introduction to Robotics 82 Example 228 Assign required frames to the 4DOF robot in Figure 235 fill out the parameters table and write the equation describing UTH Solution This example shows a robot with twist angles joint offsets and a doubleaction joint represented by the same zaxis We apply the same procedure to assign frames to each joint Table 25 shows the para meters associated with the robot Notice that z1 x0 and x3 are pointed out of the page At reset there is 90 between x0 and x1 note why it is minus and 90 between x2 and x3 The transformation between frames 2 and 3 involves both the unknown angle θ2 and the unknown length l4 The transformation between frames 3 and the hand frame does not have an unknown The transformation from xU to x0 and from zU to z0 requires a Trans 0l2 l1 followed by a Rot x 90 The total transformation for the robot is UTH UTR RTH 1 0 0 0 0 1 0 l2 0 0 1 l1 0 0 0 1 1 0 0 0 0 0 1 0 0 1 0 0 0 0 0 1 A1A2A3AH Example 229 Assign the required frames to the 4DOF robot in Figure 236 fill out the parameters table and write the equation describing UTH l1 l5 l4 l3 l2 xU yU zU z0 z1 x0 z2 x1 x2 zH xH θ2 θ1 θ3 z3 x3 Figure 235 The 4axis robot from Example 228 Table 25 Parameters for the robot from Example 228 θ d a α 01 90 θ1 0 0 90 12 θ2 0 l3 90 23 90 θ3 l4 0 90 3H 90 l5 0 0 Kinematics of Serial Robots Position Analysis 83 Solution This example shows a robot with 45 twist angle and a doubleaction joint represented by the same z axis We apply the same procedure to assign frames to each joint Notice the location of the origin of frame 2 Axes x0 and z1 are pointed out of the page The reset position is as shown Table 26 shows the parameters associated with the robot The transformation from the Uframe to the Hframe with the chosen axes requires RotyU 180 fol lowed by RotzU 180Trans 0 l20 UTH UT R RT H 1 0 0 0 0 1 0 l2 0 0 1 0 0 0 0 1 A1A2A3AH 213 The Inverse Kinematic Solution of Robots As we discussed earlier we are actually interested in the inverse kinematic solutions with which we deter mine the value of each joint variable needed to place the robot at a desired position and orientation We have already seen the inverse kinematic solutions of specific coordinate systems In this section we learn a general procedure for solving the kinematic equations Since each robot may have a different configuration the inverse kinematic equations have to be derived specifically for it The procedure presented here can be used as a guide As you have noticed by now the forward kinematic equations have a multitude of coupled angles such as C234 This makes it impossible to find enough elements in the matrix to solve for individual sines and cosines l1 l5 l4 l3 l2 z0 z1 z2 x2 zH xH x1 yU zU U x0 45 θ3 θ2 θ1 Figure 236 The 4axis robot from Example 229 Table 26 Parameters for the robot from Example 229 θ d a α 01 90 θ1 l1 l3 90 12 90 θ2 0 l4 sin 45 90 2H θ3 l4 cos 45 l5 0 0 Introduction to Robotics 84 to calculate the angles To decouple some of the angles we may multiply the RTH matrix with individual An 1 matrices This yields one side of the equation free of an individual angle allowing us to find elements that yield sines and cosines of the angle and subsequently the angle itself We will demonstrate the procedure in the following section Example 230 Find a symbolic expression for the joint variables of the robot from Example 224 Solution The forward kinematic equation for the robot is shown as Eq 256 repeated here Assume that we desire to place the robot at a position and consequently an orientation given as n o a p vectors 0T H A1 A2 C12 S12 0 a2C12 a1C1 S12 C12 0 a2S12 a1S1 0 0 1 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 Since this robot has only 2 DOF its solution is relatively simple We can solve for the angles either algebraically or by decoupling the unknowns We will do both for comparison Remember that when ever possible we should look for values of both the sine and cosine of an angle in order to correctly identify the quadrant in which the angle falls I Algebraic solution Equating elements 21 11 14 and 24 of the two matrices we get S12 ny and C12 nx θ12 ATAN2 nynx a2C12 a1C1 px or a2nx a1C1 px C1 pxa2nx a1 a2S12 a1S1 py or a2ny a1S1 py S1 pya2ny a1 θ1 ATAN2 S1C1 ATAN2 pya2ny a1 pxa2nx a1 Since θ1 and θ12 are known θ2 can also be calculated II Alternative solution In this case we postmultiply both sides of Eq 256 by A1 2 to decou ple θ1 from θ2 We get A1 A2 A1 2 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 2 or A1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 2 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 C2 S2 0 a2 S2 C2 0 0 0 0 1 0 0 0 0 1 Kinematics of Serial Robots Position Analysis 85 C1 S1 0 a1C1 S1 C1 0 a1S1 0 0 1 0 0 0 0 1 C2nxS2ox S2nx C2ox ax pxa2nx C2nyS2oy S2ny C2oy ay pya2ny C2nz S2oz S2nz C2oz az pz a2nz 0 0 0 1 From elements 14 and 24 we get a1C1 pxa2nx and a1S1 pya2ny which is exactly what we got from the other method Knowing S1 and C1 we can find expressions for S2 and C2 2131 General Solution for Articulated Robot Arms In this section we look at a procedure that may generally be used for inverse kinematic analysis of manip ulators 5 The process is applied to the simple manipulator arm from Example 226 Although this solution is for this particular robot with the given configuration it may be adapted for other robots The final trans formation between the robot base frame and the hand frame repeated here is RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5S6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5S6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 We denote this matrix as RHS righthand side for simplicity in writing Lets once again express the desired location and orientation of the robot with RTH nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 261 To solve for the angles we premultiply these two matrices with selected A1 n matrices first with A1 1 A1 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1 1 RHS A2A3A4A5A6 262 Introduction to Robotics 86 C1 S1 0 0 0 0 1 0 S1 C1 0 0 0 0 0 1 nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A2A3A4A5A6 nxC1 nyS1 oxC1 oyS1 axC1 ayS1 pxC1 pyS1 nz oz az pz nxS1nyC1 oxS1oyC1 axS1ayC1 pxS1pyC1 0 0 0 1 C234C5C6S234S6 C234C5S6S234C6 C234S5 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5S6 C234C6 S234S5 S234a4 S23a3 S2a2 S5C6 S5S6 C5 0 0 0 0 1 263 From the 34 elements of Eq 263 pxS1pyC1 0 θ1 tan1 py px and θ1 θ1 180 264 From the 14 and 24 elements we get pxC1 pyS1 C234a4 C23a3 C2a2 pz S234a4 S23a3 S2a2 265 We rearrange the two expressions in Eq 265 and square and add to get pxC1 pyS1C234a4 2 C23a3 C2a2 2 pz S234a4 2 S23a3 S2a2 2 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 S2S23 C2C23 Referring to the trigonometric functions from Eq 258 S2S23 C2C23 cos θ2 θ3 θ2 cosθ3 C3 Therefore C3 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 266 In this equation everything is known except for S234 and C234 which we find next Knowing that S3 1C2 3 we write θ3 tan1 S3 C3 267 Kinematics of Serial Robots Position Analysis 87 Since joints 2 3 and 4 are parallel additional premultiplications by A1 2 and A1 3 will not yield useful results The next step is to premultiply by the inverses of A1 through A4 which results in A1 4 A1 3 A1 2 A1 1 nx ox ax px ny oy ay py nz oz ay pz 0 0 0 1 A1 4 A1 3 A1 2 A1 1 RHS A5A6 268 which yields C234 C1nx S1ny S234nz C234 C1ox S1oy S234oz C234 C1ax S1ay S234az C234 C1px S1py S234pz C34a2C4a3a4 C1nyS1nx C1oyS1ox C1ayS1ax 0 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz S234 C1ax S1ay C234az S234 C1px S1py C234pz S34a2 S4a3 0 0 0 1 C5C6 C5S6 S5 0 S5C6 S5S6 C5 0 S6 C6 0 0 0 0 0 1 269 From the 33 elements of the matrices in Eq 269 S234 C1ax S1ay C234az 0 θ234 tan1 az C1ax S1ay and θ234 θ234 180 270 and we can calculate S234 and C234 which are used in Eqs 266 and 267 to calculate θ3 Referring again to Eq 265 repeated here we can calculate the sine and cosine of θ2 as follows pxC1 pyS1 C234a4 C23a3 C2a2 pz S234a4 S23a3 S2a2 Since C12 C1C2 S1S2 and S12 S1C2 C1S2 we get pxC1 pyS1C234a4 C2C3S2S3 a3 C2a2 pz S234a4 S2C3 C2S3 a3 S2a2 271 Treating this as a set of two equations and two unknowns and solving for C2 and S2 we get S2 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 2 S2 3 a2 3 C2 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 C3a3 a2 2 S2 3 a2 3 272 Introduction to Robotics 88 Although this is a large equation all its elements are known and it can be evaluated Then θ2 tan1 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 273 Now that θ2 and θ3 are known θ4 θ234θ2θ3 274 Remember that since there are two solutions for θ234 Eq 270 there will be two solutions for θ4 as well From the 13 and 23 elements of Eq 269 we get S5 C234 C1ax S1ay S234az C5 C1ay S1ax 275 and θ5 tan1C234 C1ax S1ay S234az S1axC1ay 276 Note that there is no decoupled equation for θ6 As a result we have to premultiply Eq 269 by the inverse of A5 to decouple it We get C5 C234 C1nx S1ny S234nz S5 S1nxC1ny C5 C234 C1ox S1oy S234oz S5 S1oxC1oy 0 0 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 0 0 0 0 1 0 0 0 0 1 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 277 From the 21 and 22 elements of Eq 277 we get θ6 tan1 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 278 Therefore we have found six equations that collectively yield the values needed to place and orient the robot at any desired location Although this solution is only good for the given robot a similar approach may be adapted for other robots An important note here is that this solution is only possible because the last three joints of the robot are intersecting at a common point Otherwise it will not be possible to solve for this kind of solution we would have to solve the matrices directly or by calculating the inverse of the matrix and solving for the unknowns All industrial robots have intersecting wrist joints 214 Inverse Kinematic Programming of Robots The inverse kinematic equations are directly used by the robot controller to drive the robot to its destination it does not use the forward kinematic equations This is important for the practical reason that the accuracy of a Kinematics of Serial Robots Position Analysis 89 robot motion is a function of how quickly the controller calculates the joint values The faster it obtains the joint variablesthemoreaccurateisthemotionInrealityevenforfastcomputersdirectlycalculatingtheinverseofthe forward kinematic equations or substituting values into the equations and calculating joint variables by methods such as Gaussian elimination take too long For a robot to move in a predictable path trajectory say a straight line it is necessary to recalculate the joint variables many times a second Imagine that a robot needs to move in a straight line between points A and B Figure 237 If no other action is taken and the robot moves from point A to point B by changing the joint values from the present values at point A to the calculated joint values of point B called pointtopoint motion the path of the end frame is unpredictable as the robot moves all its joints at different rates until they are at the final value To make the robot follow a straight line it is necessary to break the line into many small sections and direct the robot to follow those very small sections sequentially This means that a new solution must be recalculated for each small section typically between 50 to 200 times a second taking no more than 20 to 5 ms 10 Otherwise the robot loses its claimed accuracy or will not follow the specified path The shorter the time is to calculate a new solution the more accurate is the robot As a result it is vital to eliminate as many unnecessary computations as possible to allow the controller to calculate more solutions This is why the designer must do all the mathematical manipulations beforehand and only program the controller to calculate the final solutions This is discussed in more detail in Chapter 7 For the sixaxis robot discussed earlier given the final desired location and orientation as RTHDESIRED nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 all that the controller needs to use to calculate the unknown angles is the set of inverse solutions as summar ized here θ1 tan1 py px and θ1 θ1 180 θ234 tan1 az C1ax S1ay and θ234 θ234 180 Intermediate points A B Figure 237 The path between points A and B is divided into many small sections to force the robot to follow the desired path Introduction to Robotics 90 C3 pxC1 pyS1C234a4 2 pz S234a4 2 a2 2 a2 3 2a2a3 S3 1C2 3 θ3 tan1 S3 C3 θ2 tan1 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C3a3 a2 pxC1 pyS1C234a4 S3a3 pz S234a4 θ4 θ234θ2θ3 θ5 tan1C234 C1ax S1ay S234az S1axC1ay θ6 tan1 S234 C1nx S1ny C234nz S234 C1ox S1oy C234oz 279 Although this is not trivial it is much quicker to use these equations and calculate the angles than it is to invert the matrices or do Gaussian elimination Notice that all operations in this computation are simple arithmetic or trigonometric operations 215 DualArm Cooperating Robots Cooperating robots are generally defined as robots working with each other either two separate robots or a dualarmed robot as shown in Figure 238 These robots can benefit from technologies used in collaborative robots too When two robots handle a part together the sensors and ideas that make collaborative robots more flexible and safer can benefit cooperative robots by preventing collisions damage to the part or drop ping the part due to uncoordinated motions In some systems one robot acts as a master and the other Figure 238 Cooperative robots may be two robots working together or a twoarmed robot Source Reproduced with permission of Yaskawa Electric Kinematics of Serial Robots Position Analysis 91 follows its motions However the two robots may be controlled independently either by one or by two sep arate controllers Figure 239 shows two robots handling a part We assign a frame to the base of each robot a frame to the endplate of each robot and two frames at two ends of the part where it is grabbed by the robots We can write the loop equation between the part and the two robots as UTR1 R1TH1 H1TP1 P1TP2 UTR2 R2TH2 H2TP2 280 The transformations between the Universe frame and the two robot bases are known since we know where the robots are located The transformations from each hand to the part are also known because we know the length of each end effector The two frames describing the part are also known at least initially Since we also know the dimensions of the part whether rigid or not we should also know about the transformation between the two frames describing the part at all times For example imagine that the part is picked up by the two robots and is to be placed at another location at a different orientation At all times we can cal culate the relative location and orientation of the two corners of the part This leaves us with two unknown transformations R1TH1 and R2TH2 However if we define the trajectory path of one of the robots as it moves from one location and orientation to another we can determine what the second robot must do to keep up with it without dropping or damaging the part Premultiplying Eq 280 with proper inverse transforma tions we can write R2TH2 UTR2 1 UTR1 R1TH1 H1TP1 P1TP2 H2TP2 1 which simplifies to R2TH2 R2TU UTR1 R1TH1 H1TP1 P1TP2 P2TH2 281 Since all matrices on the right hand side are known R2TH2 can be calculated at all times allowing deter mination of its joint values Obviously this requires calculating the configuration of one of the robots based on the path it is to take and then the configuration of the second robot based on that or vice versa 216 Degeneracy and Dexterity 2161 Degeneracy Degeneracy occurs when the robot loses a degree of freedom and therefore cannot perform as desired 11 This occurs under two conditions i when the robots joints reach their physical limits and as a result can not move any further and ii the zaxes of two joints become collinear This means that at this instant U R1 R2 H1 H2 P1 P2 Figure 239 Dualarm robots handling a part Introduction to Robotics 92 whichever joint moves the same motion will result and consequently the controller does not know which joint to move Since in either case the total number of DOF available is less than 6 there is no solution for the robot In the case of collinear joints the determinant of the position matrix is zero as well Figure 240 shows a simple robot in a vertical configuration where joints 1 and 6 are collinear If either joint 1 or joint 6 rotates the end effector will rotate the same amount In practice it is important to direct the controller to take an emergency action otherwise the robot will stop Note that this condition occurs if the two joints produce similar motions Otherwise if one joint is prismatic and one is revolute as in joints 3 and 4 of the Stanford arm although the zaxes are collinear the robot will not be in a degenerate condition Paul 11 has shown that if sin α4 sin α5 or sin θ5 is zero the robot will be degenerate this occurs if joints 4 and 5 or 5 and 6 are parallel and therefore result in similar motions Obviously α4 and α5 can be designed to prevent the degeneracy of the robot However any time θ5 approaches zero or 180 the robot becomes degenerate 2162 Dexterity We should be able to position and orient a 6DOF robot at any desired location within its work envelope by specifying the position and the orientation of the hand However as the robot gets increasingly closer to the limits of its workspace although it is possible to locate it at a desired point it becomes impossible to orient it at desired orientations The volume of points where we can position the robot as desired but not orient it is called the nondexterous volume 217 The Fundamental Problem with the DenavitHartenberg Representation Although the DH representation has been extensively used in modeling and analysis of serial robot motions there is a fundamental flaw with this technique which many researchers have tried to solve by modifying the process 12 The fundamental problem is that since all motions are about the x and zaxes the method cannot represent any motion about the yaxis Therefore if there is any motion about the yaxis the method will fail This occurs in a number of circumstances For example suppose 2 joint axes that are supposed to be parallel are assembled with a slight deviation The small angle between the 2 axes requires a motion about the yaxis Since all real industrial robots have some degree of inaccuracy in their manufacture their inaccuracy cannot be modeled with the DH representation 1 2 3 4 5 6 x y z Figure 240 An example of a robot in a degenerate position Kinematics of Serial Robots Position Analysis 93 We now continue with the solution of the Stanford arm Example 227 continued Reference frames for the Stanford arm Figure 241 is the solution for the Stanford arm in Example 227 Figure 234 It is simplified for improved visibility Table 27 shows the corresponding parameters Note that it is assumed that the reset position is when the robot is pointed up and vertical The following is a summary of the inverse kinematic solution for the Stanford arm 5 13 θ1 tan1 py px tan1 d2 r2 d2 2 where r p2 x p2 y 282 Table 27 The parameters table for the Stanford arm θ d a α 01 θ1 0 0 90 12 θ2 d2 0 90 23 0 d3 0 0 34 θ4 0 0 90 45 θ5 0 0 90 56 θ6 0 0 0 1 4 x y z 5 6 1 4 d2 z0 x0 x1 z1 x2 z2 x3 x4 x5 x6 z4 z3 z5z6 d3 Figure 241 The frames of the Stanford arm Introduction to Robotics 94 θ2 tan1C1px S1py pz 283 d3 S2 C1px S1py C2pz 284 θ4 tan1 S1ax C1ay C2 C1ax S1ay S2az and θ4 θ4 180 if θ5 0 285 θ5 tan1C4 C2 C1ax S1ay S2az S4 S1ax C1ay S2 C1ax S1ay C2az 286 θ6 tan1 S6 C6 where S6 C5 C4 C2 C1ox S1oy S2oz S4 S1ox C1oy S5 S2 C1ox S1oy C2oz C6 S4 C2 C1ox S1oy S2oz C4 S1ox C1oy 287 Example 231 Application of the DH methodology in the design of a fingerspelling hand A fingerspelling hand was designed at Cal Poly San Luis Obispo in order to enable ordinary users to communicate with individuals who are blind and deaf The hand with its 14 DOF can form all the fingerspelling letters and numbers Figure 242 Each fingerwrist combination can be assigned a set of frames based on the DH representation in order to derive the forward and inverse kinematic equa tions of the hand These equations may be used to drive the fingers to position This application shows that in addition to modeling the motions of a robot the DH technique may be used to represent transformations rotations and movements between different kinematic elements regardless of whether a robot is involved You may also find other applications for this representation 218 Design Projects Starting with this chapter and continuing with the rest of the book we apply the current information in each chapter to the design of simple robots Since common 6DOF robots are complicated we consider simpler Figure 242 Cal Poly fingerspelling hand Supported by the SmithKettlewell Eye Research Institute Version 3 designed and built by Kendall Searing Kinematics of Serial Robots Position Analysis 95 robots with fewer DOF The intention is to design a simple robot that can possibly be built by you from readily available parts from hobby shops hardware stores and surplus dealers In this section you may consider the preliminary design of the robot and its configuration keeping in mind the possible types of actuators you may want to consider later Although we study this subject later it is a good idea to consider the types of actuators now You should also consider the types of links and joints you may want to use possible lengths types of joints and material for example wood dowels hollow aluminum or brass tubes available in hardware stores and so on 2181 StairClimbing Robot Figure 243 shows a simple robot that was designed to carry loads up and down stairs 14 15 All actuators in this robot except the wheels are prismatic You may simplify the design by eliminating some DOF although that limits the devices capabilities By sequentially moving the leg actuators up and down and extending and retracting the legs from the chassis the robot can navigate any terrain stairs or slopes while carrying a load On flat surfaces it can move on its wheels at higher speeds You may design your own robot based on your own specifications 2182 A 3DOF Robot For this project you may want to design your own preferred robot with your own preferred configuration Creativity is always encouraged However we will discuss a simple robot as a guideline for you to design and build After the configuration of the robot is finalized you should proceed with the derivation of forward and inverse kinematic equations The final result of this part of the design project is a set of inverse kinematic equations for the simple 3DOF robot that can later be used to drive the robot to desired positions You must realize that the price we pay for this simplicity is that we may specify only the position of the robot not its orientation Figure 243 A stairclimbing robot Designed by Jeremy DePangher supported by Michael Goren Introduction to Robotics 96 One of the important considerations in the design of the robot is its joints Figure 244a shows a simple design that has no joint offset d This would apparently simplify the analysis of the robot since the A matrix related to the joint would be simpler However manufacturing such a joint is not as simple as the design in Figure 244b The latter allows a larger range of motion too On the other hand although we apparently have to deal with a joint offset d with the joint design in Figure 244b you must remember that in most cases there will be a second joint with the same joint offset in the opposite direction which cancels the former in the robots overall equation As a result we assume that the joints of our robot can be built as in Figure 244b without having to worry about joint offset d We will discuss actuators in Chapter 9 However for this design project you should probably consider the use of a servomotor or a stepper motor While you are designing your robot consider what type of actuators you will use and how you will connect the actuators to the links and joints Remember that at this point you are only designing the robot configuration and that you can always change your actuators and the design of your robot When the preliminary sketch of the robot is finished assign coordinate frames to each joint fill out the parameters table for the frames develop the matrices for each transformation and calculate the final UTH Then using the methods learned in this chapter develop the inverse kinematic equations for the robot This means that using these equations if you actually build the robot you will be able to run it and control its position since the robot has 3 DOF you will not be able to control its orientation Figure 245 shows a simple design for a 3DOF robot you may use as a guide for your design In one student design the lengths of links and joint offsets were 8 2 9 2 and 9 inches respectively The links were made of Joint offset d a b Figure 244 Two simple designs for a joint xU yU zU z0 z1 z2 x2 z3 x0 x1 l1 l2 l3 l4 l5 y z x zH x3 xH Figure 245 A simple 3DOF robot design that may be used for the design project Kinematics of Serial Robots Position Analysis 97 hollow aluminum bars actuated by three DC gearmotors with encoder feedback and connected to the joints through worm gears The robot is at reset when pointed up and x0 is parallel to xU Figure 245 also shows one possible set of frames assigned to the joints The end of the robot has its own frame Frame 3 is needed to transform from frame 2 to the hand frame To correctly develop forward and inverse kinematic equations of the robot it is crucial to define the reset position of the robot where all joint angles are zero In this example the reset position is defined as the robot pointing up and x0 parallel to xU At this point there is a 90 angle between x1 and x2 Therefore the actual angle for this joint should be 90 θ2 The same is true for x0 and x1 where a 90 angle exists between the two when θ1 is zero and therefore the angle between the two is 90 θ1 Also notice the permanent angles between other frames This exercise is left for you to complete The following inverse kinematic equations for the robot relative to frame 0 are derived assuming that the 8 in distance between frames 0 and U is subtracted from the actual desired height θ1 tan1 pxpy θ3 cos1 pyC1 2 pz 2162 162 θ2 cos1 pzC1 1 C3 pyS3 18 1 C3 C1 288 Please note If cos θ1 is zero use pxS1 instead of pyC1 2183 A 3DOF Mobile Robot Another project you may consider is a mobile robot These robots are very common and are used in auton omous navigation and developing artificial intelligence for robots In general you may assume the robot is capable of moving in a plane that may be represented by translations along the x and yaxes or a translation and rotation in a polar form r θ Additionally the orientation of the robot may be changed by rotating it about the zaxis α Therefore the kinematic equations of the motion of the robot can be developed and used to control its motions A schematic representation of the robot is shown in Figure 246 See also Chapter 9 for a design project involving a singleaxle robot that may be used for this project too A popular version of such a robot is the vacuum cleaner sold in stores It is simply a 3DOF machine with capability to run around a room and vacuum Most of its ability is in its embedded program that controls the motions of the device otherwise it is a simple x y α mobile robot In the next chapters we continue with the design of your robot r x y z px α θ py Figure 246 Schematic representation of a 3DOF mobile robot Introduction to Robotics 98 219 Summary In this chapter we discussed methods for representation of points vectors frames and transformations by matrices Using matrices we discussed forward and inverse kinematic equations for specific types of robots such as Cartesian cylindrical and spherical robots as well as Euler and RPY orientation angles However the main thrust of this chapter was to learn how to represent the motions of a multiDOF serial robot in space and how to derive the forward and inverse kinematic equations of serial robots using the DH representation technique This method can be used to represent any type of robot configuration regardless of the number and type of joints or joint and link offsets or twists In the next chapters we learn about representation of robots using screwbased mechanics followed by the representation of kinematic equations of parallel robots before we study the differential motions which in effect is the equivalent of velocity analysis of robots References 1 Niku S Scheme for Active Positional Correction of Robot Arms Proceedings of the 5th International Conference on CADCAM Robotics and Factories of Future Springer Verlag pp 590593 1991 2 Puopolo Michael G Saeed B Niku Robot Arm Positional Deflection Control with a Laser Light Proceedings of the Mechatronics 98 Conference Skovde Sweden Adolfsson and Karlsen editors Pergamon Press Sep 98 pp 281286 3 Ardayfio DD Q Danwen Kinematic Simulation of Novel Robotic Mechanisms Having Closed Kinematic Chains Paper 85DET81 American Society of Mechanical Engineers 1985 4 Denavit J RS Hartenberg A Kinematic Notation for LowerPair Mechanisms Based on Matrices ASME Journal of Applied Mechanics June 1955 215221 5 Paul Richard P Robot Manipulators Mathematics Programming and Control MIT Press Cambridge Mass 1981 6 Craig John J Introduction to Robotics Mechanics and Control 4th edition Pearson Education 2017 7 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 8 Tsai LungWen Robot Analysis John Wiley and Sons 1999 9 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 10 Eman Kornel F Trajectories International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons 1988 pp 17961810 11 Paul Richard P CN Stevenson Kinematics of Robot Wrists The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3138 12 Barker Keith Improved RobotJoint Calculations NASA Tech Briefs Sep 1988 p 79 13 Ardayfio DD R Kapur SB Yang WA Watson Micras Microcomputer Interactive Codes for Robot Analysis and Simulation Mechanisms and Machine Theory vol 20 no 4 1985 pp 271284 14 Goren Michael Jeremy E Goren StairClimbing Human Transporter US Patent 7246671 July 24 2007 15 Depanger J Design and Implementation of EightLegged Robotic Transporter California Polytechnic State University San Luis Obispo 2013 Problems The isometric grid Figure 247 is provided to you for use with some of the problems in this chapter It is meant to be used as a tracing grid for drawing 3D shapes and objects such as robots frames and transforma tions You may make copies of the grid for each problem that requires graphical representation or verification of the results The grid is also available commercially Kinematics of Serial Robots Position Analysis 99 21 Write a unit vector in matrix form that describes the direction of the cross product of p 3i5j 4k and q 3i 7k 22 A vector p is 10 units long and is perpendicular to vectors q and r described here Express the vector in matrix form qunit 0 3 qy 0 5 0 runit rx 0 4 0 5 0 23 Vectors p 2i 3j 5k and q 3i 6k are given Find a vector r that is perpendicular to both 24 Will the three vectors p q and r in Problem 22 form a traditional frame If not find the necessary unit vector s to form a frame between p q and s 25 Suppose that instead of a frame a point P3 9 5T in space was translated a distance of d 478 T Find the new location of the point relative to the reference frame 26 The following frame B was moved a distance of d 426 T Find the new location of the frame relative to the reference frame Figure 247 Isometric grid Introduction to Robotics 100 B 0 1 0 2 1 0 0 5 0 0 1 8 0 0 0 1 27 For frame F find the values of the missing elements and complete the matrix representation of the frame F 0 1 4 0 0 5 1 0 7 0 0 0 1 28 Find the values of the missing elements of frame B and complete the matrix representation of the frame B 0 707 0 2 0 1 4 0 707 0 5 0 0 0 1 29 Find the values of the missing elements of frame B and complete the matrix representation of the frame B 0 766 0 643 0 3 0 8 0 1 6 0 0 0 1 210 Derive the matrix that represents a pure rotation about the yaxis of the reference frame 211 Derive the matrix that represents a pure rotation about the zaxis of the reference frame 212 Verify that the rotation matrices about the reference frame axes follow the required constraint equa tions set by the orthogonality and length requirements of directional unit vectors 213 Find the coordinates of point P9 2 8T relative to the reference frame after a rotation of 45 about the xaxis 214 Find the coordinates of point P5 9 3T relative to the reference frame after a rotation of 30 about the zaxis 215 Find the new location of point P1 2 3T relative to the reference frame after a rotation of 30 about the zaxis followed by a rotation of 60 about the yaxis Kinematics of Serial Robots Position Analysis 101 216 A point P in space is defined as BP 534 T relative to frame B which is attached to the origin of the reference frame A and is parallel to it Apply the following transformations to frame B and find AP Using the 3D grid plot the transformations and the result and verify it Also verify graphically that you would not get the same results if you applied the transformations relative to the current frame Rotate 90 about the xaxis then Translate 3 units about the yaxis 6 units about the zaxis and 5 units about the xaxis Then Rotate 90 about the zaxis 217 A point P in space is defined as BP 235 T relative to frame B which is attached to the origin of the reference frame A and is parallel to it Apply the following transformations to frame B and find AP Using the 3D grid plot the transformations and the result and verify it Rotate 90 about the xaxis then Rotate 90 about the local aaxis and then Translate 3 units about the y 6 units about the z and 5 units about the xaxis 218 A frame B is rotated 90 about the zaxis then translated 2 and 4 units relative to the n and oaxes respectively then rotated another 90 about the yaxis and finally rotated 90 about the aaxis Find the new location and orientation of the frame B 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 1 219 The frame B of problem 218 is rotated 90 about the aaxis 90 about the yaxis then translated 3 and 8 units relative to the x and yaxes respectively and then rotated another 90 about the naxis Find the new location and orientation of the frame B 0 1 0 1 1 0 0 1 0 0 1 1 0 0 0 1 220 The following frame B is rotated 30 about the oaxis 90 about the yaxis then translated 3 and 8 units relative to the x and yaxes respectively and then rotated another 90 about the xaxis Find the new location and orientation of the frame B 0 1 0 2 1 0 0 7 0 0 1 1 0 0 0 1 221 Show that rotation matrices about the y and zaxes are unitary 222 Calculate the inverse of matrix B Introduction to Robotics 102 B 1 0 2 4 2 6 1 0 2 4 6 8 1 0 0 2 223 Calculate the inverse of matrix C C 0 5 1 0 0 1 2 1 8 0 1 9 6 6 7 2 5 224 Calculate the inverse of the following transformation matrices T1 0 527 0 574 0 628 4 0 369 0 819 0 439 3 0 766 0 0 643 2 0 0 0 1 and T2 0 92 0 0 39 3 0 1 0 4 0 39 0 0 92 1 0 0 0 1 225 Write the correct sequence of movements that must be made in order to restore the original orien tation of the spherical coordinates and make it parallel to the reference frame About what axes are these rotations supposed to be 226 A spherical coordinate system is used to position the hand of a robot In a certain situation the hand orientation of the frame is later restored in order to be parallel to the reference frame and the matrix representing it is described as Tsph 1 0 0 3 1375 0 1 0 2 195 0 0 1 3 214 0 0 0 1 Find the necessary values of r β γ to achieve this location Find the components of the original matrix n o a vectors for the hand before the orientation was restored 227 Suppose that a robot is made of a Cartesian and RPY combination of joints Find the necessary RPY angles to achieve the following T 0 527 0 574 0 628 4 0 369 0 819 0 439 6 0 766 0 0 643 9 0 0 0 1 Kinematics of Serial Robots Position Analysis 103 228 Suppose that a robot is made of a Cartesian and Euler combination of joints Find the necessary Euler angles to achieve the following T 0 527 0 574 0 628 4 0 369 0 819 0 439 6 0 766 0 0 643 9 0 0 0 1 229 Assume that the three Euler angles used with a robot are 304050 respectively Determine what angles should be used to achieve the same result if RPY is used instead 230 Assume that the RPY angles used with a robot are 603045 respectively Determine what angles should be used to achieve the same result if Euler angles are used instead 231 A frame UB was moved along its own oaxis a distance of 6 units then rotated about its naxis an angle of 60 then translated about the zaxis for 3 units followed by a rotation of 60 about the zaxis and finally rotated about the xaxis for 45 Calculate the total transformation performed What angles and movements would we have to make if we were to create the same location and orientation using Cartesian and Euler configurations 232 A frame UF was moved along its own naxis a distance of 5 units then rotated about its oaxis an angle of 60 followed by a rotation of 60 about the zaxis then translated about its aaxis for 3 units and finally rotated 45 about the xaxis Calculate the total transformation performed What angles and movements would we have to make if we were to create the same location and orientation using Cartesian and RPY configurations 233 Frames describing the base of a robot and an object are given relative to the Universe frame Find a transformation RTH of the robot configuration if the hand of the robot is to be placed on the object By inspection show whether this robot can be a 3axis spherical robot and if so find α β r Assuming that the robot is a sixaxis robot with Cartesian and Euler coordinates find px py pz ϕ θ ψ UTobj 1 0 0 2 0 0 1 3 0 1 0 0 0 0 0 1 UTR 0 1 0 2 1 0 0 5 0 0 1 0 0 0 0 1 234 Frames describing the base of a robot and an object are given relative to the Universe frame Find a transformation RTH of the robot configuration if the hand of the robot is to be placed on the object Assuming that the robot is a sixaxis robot with Cartesian and RPY coordinates find px py pz ϕa ϕo ϕn UTobj 0 0 707 0 707 0 0 866 0 3535 0 3535 0 0 5 0 6123 0 6123 0 0 0 0 1 UT R 1 0 0 3 0 1 0 6 0 0 1 1 0 0 0 1 Introduction to Robotics 104 235 A 3DOF robot arm has been designed for applying paint on flat walls as shown Assign coordinate frames as necessary based on the DH representation Fill out the parameters table Find the UTH matrix 236 In the 2DOF robot shown the transformation matrix 0TH is given in symbolic form as well as in numerical form for a specific location The length of each link l1 and l2 is 1 ft Calculate the values of θ1 and θ2 for the given location 0TH C12 S12 0 l2C12 l1C1 S12 C12 0 l2S12 l1S1 0 0 1 0 0 0 0 1 0 2924 0 9563 0 0 6978 0 9563 0 2924 0 0 8172 0 0 1 0 0 0 0 1 xu yu zu l5 R zH xH l6 l4 l3 l2 l1 Figure P235 z x y x0 z1 x1 zH xH z0 θ2 θ1 Figure P236 Kinematics of Serial Robots Position Analysis 105 237 The SCARAtype robot shown is in reset position when both arms are aligned along the xaxis Assign the coordinate frames based on the DH representation Fill out the parameters table Write all the A matrices Write the UTH matrix in terms of the A matrices 238 A special 3DOF spraying robot has been designed as shown The reset position is when the arms are horizontal Assign the coordinate frames based on the DH representation Fill out the parameters table Write all the A matrices Write the UTH matrix in terms of the A matrices xU zU d5 d1 d2 d3 d4 xH zH yU Figure P237 l3 l2 l1 zU yU xU zH xH Figure P238 Introduction to Robotics 106 239 For the given 4DOF robot designed for a specific operation Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated 240 For the given specialty designed 4DOF robot Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated l1 l2 l3 l4 l5 l6 l7 l8 zH xH β xU zU yU l9 Figure P239 l1 l2 l3 l4 l5 l6 l7 xU zU yU zH xH Figure P240 Kinematics of Serial Robots Position Analysis 107 241 For the given 3DOF robot Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated 242 For the given 4DOF robot shown at reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated x y z l1 l2 l3 U l6 l4 l5 xh zh Figure P242 l1 l2 l5 l6 l7 xU zU yU zH xH l3 l4 Figure P241 Introduction to Robotics 108 243 For the given 4DOF robot shown at reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of A matrices that shows how UTH can be calculated 244 For the given 5DOF robot shown at its reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated 245 For the given 4DOF robot shown at its reset position Assign appropriate frames for the DH representation Fill out the parameters table Write an equation in terms of Amatrices that shows how UTH can be calculated l1 l5 l4 l3 l2 l6 zH xH θ1 θ2 θ3 xU yU Figure P243 zH l1 l4 l3 l2 xH θ4 θ3 θ1 θ5 yU zU U 45 l5 Figure P244 Kinematics of Serial Robots Position Analysis 109 246 Derive the inverse kinematic equations for the robot from Problem 240 247 Derive the inverse kinematic equations for the robot from Problem 241 l1 xU yU zU l5 l4 l3 l2 xH zH 30 Figure P245 Introduction to Robotics 110 3 Robot Kinematics with ScrewBased Mechanics 31 Introduction In Chapter 2 we studied the kinematic analysis of robots using the DenavitHartenberg approach This anal ysis can also be accomplished through screwbased mechanics According to Chasles Theorem also referred to as MozziChasles theorem the motions of a rigid body in space regardless of what it looks like can be decomposed into a translation and a rotation about a screw axis As we already saw in Chapter 2 a trans formation can be achieved by a series of rotations about the x y and zaxes and a translation along the same axes A vector in the direction composed of these motions expressed along the unit vector ŝ is the screw axis about and along which these transformations can be accomplished In this chapter we study screwbased mechanics and how it can be used to model a robot and to derive the kinematic equations of motion This technique is an alternative to the DenavitHartenberg DH method and its result are similar but it provides a different approach and insight 32 What Is a Screw A screw of any type including a common screw is really an inclined plane wrapped around a cylinder A point moving along the inclined plane will move up or down depending on the direction it is moving on the plane Since it is wrapped around the cylinder the updown motion is achieved when the point rotates around the axis of the cylinder Therefore for a righthand screw turning in the direction of curled fingers of the righthand will cause a forward motion and vice versa The translation along the axis of the cylinder caused by one rotation is called pitch Figure 31 Pitch Screw axis Figure 31 A screw axis representing rotations and translations 111 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed There are two interesting states that can help us If the pitch goes to zero the rotation about the axis will not cause an advance on the axis In this case this represents a pure rotation about the axis This can represent a revolute joint If the pitch is infinite the advance along the axis caused by one rotation will be infinite therefore representing a pure translation along the axis of the screw This can represent a prismatic joint Additionally imagine that the nut on the screw has an extension attached to it as shown in Figure 31 In that case whether the pitch is zero or infinite the extension can represent a linkage or an offset We will use these in our modeling and development of kinematics equations of motion The total transformation through a screw can be divided into two separate and independent components i a rotation of zero pitch around the axis of the screw plus ii a pure translation along the axis of the screw We first derive the equations representing a rotation followed by a general transformation 33 Rotation about a Screw Axis The following derivation will give us a way to calculate the transformation matrix for a rotation about an arbitrary axis in space through the origin of a fixed frame We will later adapt it to a screw axis that does not necessarily go through the origin Figure 32 shows a fixed frame as well as a frame S that is coincident with the fixed frame and a screw axis denoted by its unit vector ŝ that goes through the origin O P1 and P2 show a point rotating in a plane per pendicular to the screw axis before and after a rotation of an angle θ about the axis We can write OP2 OC CN NP2 31 We will derive each one of these vectors separately before adding them In doing so we try to derive all the vectors in terms of OP1 With that having the values of the rotation angle θ the translation along the screw axis t and the location of P1 is all that is needed to calculate the location of P2 1 OC As shown in Figure 32b vector OC is the same as the projection of OP1 onto screw axis OC Using a dot product and knowing this projection is in the direction of the screw axis ŝ we get OC s OP1 s 32 a b c O C P1 ˆs P2 P1 N C x y z O P1 C P2 θ N ˆs S Figure 32 Rotation about a screw axis through the origin of the reference frame Introduction to Robotics 112 Note The dot product OP1 s is a scalar whose length is the projection of OP1 along ŝ Multiplying it by the unit vector ŝ expresses the vector in that direction 2 CN We know CN CP2 cosθ CP1 cosθ is in the direction of CP1 We also know that CP1 OP1 OC Substituting Eq 32 in this equation we get CP1 OP1 s OP1 s Therefore CN OP1 s OP1 s cosθ 33 3 NP2 From Figure 32c we know NP2 CP2 sinθ CP1 sinθ This can be written as a cross product of CP1 and ŝ the magnitude is CP1 sin θ and its direction is perpendicular to both vectors or NP2 s CP1 sinθ 34 The cross product of ŝ and OP1 is perpendicular to both and in the direction of NP2 and is equal to s OP1 s OC CP1 s OC s CP1 s CP1 35 because s OC 0 Substituting Eq 35 into Eq 34 yields NP2 s CP1 sinθ s OP1 sinθ 36 Now that we have derived the three components in terms of OP1 substituting Eqs 32 33 and 36 into Eq 31 we get OP2 s OP1 s OP1 s OP1 s cosθ s OP1 sinθ or OP2 s OP1 s 1cosθ OP1 cosθ s OP1 sinθ 37 Equation 37 is known as Rodrigues rotation formula It relates the spatial location of a point after rotating about a screw axis Let OP1 P1xP1yP1z T and OP2 P2xP2yP2z T each describing the position of points P1 and P2 in Figure 32 The transformation can be written as P2x P2y P2z P1 T P2 P1x P1y P1z 38 To see what this transformation is we expand each term of Eq 37 as follows OP1 s P1xP1yP1z T sxsysz T P1xsx P1ysy P1zsz s OP1 s 1cosθ sx sy sz P1xsx P1ysy P1zsz 1cosθ P1xs2 x P1ysxsy P1zsxsz P1xsxsy P1ys2 y P1zsysz P1xsxsz P1ysysz P1zs2 z 1cosθ Robot Kinematics with ScrewBased Mechanics 113 and OP1 cosθ P1x P1y P1z cosθ and s OP1 sinθ sx sy sz P1x P1y P1z sinθ syP1z szP1y sxP1z szP1x sxP1ysyP1x sinθ Combining these equations and forming them into a matrix results in P2x P2y P2z s2 x 1cosθ cosθ sxsy 1cosθ sz sinθ sxsz 1cosθ sy sinθ sysx 1cosθ sz sinθ s2 y 1cosθ cosθ sysz 1cosθ sx sinθ szsx 1cosθ sy sinθ szsy 1cosθ sx sinθ s2 z 1cosθ cosθ P1x P1y P1z Therefore the transformation matrix is P1 T P2 s2 x 1Cθ Cθ sxsy 1Cθ szSθ sxsz 1Cθ sySθ sysx 1Cθ szSθ s2 y 1Cθ Cθ sysz 1Cθ sxSθ szsx 1Cθ sySθ szsy 1Cθ sxSθ s2 z 1Cθ Cθ 39 Note that this matrix only requires the screw axis ŝ and angle of rotation θ Also note that this is a 3 3 matrix only representing the rotation Obviously we can simply add scale factors to the vectors and a trans lation vector to the matrix to make it a 4 4 homogeneous matrix Example 31 Assume that the screw axis in Figure 33 is at 60 from the yaxis in the yz plane described as s 00 50 866 T Point P is attached to the axis with coordinates P 011 T Point P is rotated θ 90 about the screw axis Find the new coordinates of the point Solution Using Eqs 38 and 39 and substituting the values of the screw axis directional cosines and the angle of rotation we can calculate the new location of the point at x y z O a b P1 θ P2 ˆs n S o a n o a l P1 m l 60 Figure 33 Rotation about a screw axis through the origin of the reference frame from Example 31 Introduction to Robotics 114 P2x P2y P2z P1 T P2 P1x P1y P1z 0 0 866 0 5 0 866 0 25 0 433 0 5 0 433 0 75 0 1 1 0 366 0 683 1 183 For comparison we can calculate the new location P2 using rotation and translation transformation matrices The values of l and m in Figure 33b can be found by Py l cos60 m sin60 1 Pz l sin60m cos60 1 or l 1 366 m 0 366 Note that the transformations involved in getting to P2 include a rotation of 60 about the xaxis a translation along the current oaxis of 1366 a rotation of 90 about the current oaxis and the location of point P along the aaxis of 0 366 We get P2 Rot x60 trans 01 3660 Rot o90 P1 or P2x P2y P2z 1 1 0 0 0 0 0 5 0 866 0 0 0 866 0 5 0 0 0 0 1 1 0 0 0 0 1 0 1 366 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 0 1 0 0 0 0 0 0 1 0 0 0 366 1 0 366 0 683 1 183 1 which is exactly what we found using the screw transformation equation Next we will examine the case where the screw axis does not go through the origin of the fixed frame and may include a translation This will allow us to relate to transformations about successive screw axes 34 Homogenous Transformations about a General Screw Axis Figure 34 shows a screw axis ŝ with its origin at point S that is not coincident with the origin of the fixed frame Points P1 and P3 indicate the initial and final locations of a point that has moved on the screw axis As indicated before based on Chasles theorem this transformation can be resolved into a pure rotation of an angle θ about the screw axis from P1 to P2 plus a pure translation of t along the screw axis to P3 θ and t are the screw parameters and are all we need to define the transformation From Figure 34 and noting that P2P3 ts we write OP1 OS SP1 SP1 OP1OS 310 and OP3 OS SP2 ts 311 Note that OP1 and OP2 in Figure 33 are equivalent to SP1 and SP2 in Figure 34 Replacing OP1 and OP2 with SP1 and SP2 in Eq 37 and substituting it and Eq 310 into Eq 311 we get OP3 OS ts s OP1 OS s 1Cθ OP1 OS Cθ s OP1 OS Sθ 312 Robot Kinematics with ScrewBased Mechanics 115 We can relate points OP1 P1xP1yP1z T and OP3 P3xP3yP3z T through a transformation matrix as before and write P3x P3y P3z P1 T P3 P1x P1y P1z 313 Note that since we added a translation we extend the transformation matrix to a homogenous 4 4 matrix Using a process similar to that in Section 33 to manipulate the vectors and gather similar elements in a 4 4 matrix we get P1 T P3 s2 x 1Cθ Cθ sxsy 1Cθ szSθ sxsz 1Cθ sySθ T14 sysx 1Cθ szSθ s2 y 1Cθ Cθ sysz 1Cθ sxSθ T24 szsx 1Cθ sySθ szsy 1Cθ sxSθ s2 z 1Cθ Cθ T34 0 0 0 1 314 where T14 tsxOSx T111 OSyT12OSzT13 T24 tsyOSxT21OSy T221 OSzT23 T34 tsz OSxT31OSyT32OSz T331 315 Note how the orientation of P3 is calculated through Eq 314 which is only affected by the direction of the screw axis ŝ and the angle of rotation θ and that the position is found by Eq 315 which is affected by the location of the origin of the screw axis the direction of the screw axis the angle of rotation θ the translation along the screw axis and of course the location of P1 The values of the last column of the transformation as given by Eq 315 require the values of T11 through T33 which are already calculated x y z O S n o a Rs P1 C P2 N ˆs ˆs P3 t r1 r3 r2 θ Figure 34 Homogeneous transformation about a general screw axis Introduction to Robotics 116 Example 32 Extending Example 31 lets assume that point S is on the screw axis and is described as OS 010 5 T while SP1 011 T remains the same as shown in Figure 35 and we add a translation of 03 units along the screw axis Find the location of P3 Solution To find the location of P3 we use Eqs 313315 as follows OP1 P1x P1y P1z OS SP1 0 1 0 5 0 1 1 0 2 1 5 P1 T P3 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 P3x P3y P3z 1 P1 T P3 P1x P1y P1z 1 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 0 2 1 5 1 0 366 1 833 1 9428 1 For comparison we can say that point P3 can be reached by the following transformations P3 Trans 010 5 Rot n60 Trans 01 3660 Rot o90 Trans 00 0 366 2P3 P3x P3y P3z 1 0 0 1 0 366 0 866 0 5 0 1 683 0 5 0 866 0 1 683 0 0 0 1 0 0 0 3 1 0 366 1 833 1 9428 1 x y z O a b P1 P2 P3 θ ˆs n S o a n o a l P1 m l S O Figure 35 The screw axis from Example 32 Robot Kinematics with ScrewBased Mechanics 117 which once again is the same as earlier Notice that the orientations do not appear to be the same because we have not included the orientation of a frame we might attach to point P1 Doing so we would get P3 P1 T P3 P1 0 0 866 0 5 0 616 0 866 0 25 0 433 0 684 0 5 0 433 0 75 0 0482 0 0 0 1 1 0 0 0 0 0 5 0 866 2 0 0 866 0 5 1 5 0 0 0 1 0 0 1 0 366 0 866 0 5 0 1 833 0 5 0 866 0 1 9428 0 0 0 1 Example 33 Now lets assume that the setup from Example 32 is moved along the xaxis a distance of 02 units as shown in Figure 36 such that OS 0 210 5 T and OP1 0 221 5 T Find the location of P3 Solution Calculating the new values of T14 through T34 we get P3x P3y P3z 1 P1 T P3 P1x P1y P1z 1 0 0 866 0 5 0 816 0 866 0 25 0 433 0 5103 0 5 0 433 0 75 0 0518 0 0 0 1 0 2 2 1 5 1 0 166 1 833 1 9428 1 which shows the same result except that P3x has moved 02 units forward as expected θ x y z O P1 P2 P3 ˆs n o a l 1 02 05 Figure 36 The screw axis from Example 33 Introduction to Robotics 118 These examples show the similarities between these two techniques as well as their differences Note that in the case of screw mechanics only a small number of parameters are needed to calculate the new locations of a point regardless of whether the screw axis goes through the origin or where it is located As we will see in the next section we can extend this relationship between different screw axes each of which will represent a joint of a robot 35 Successive ScrewBased Transformations Equations 314 and 315 represent the transformations of a point on a screw axis relative to a frame Now imagine that we attach another screw axis to the present one A similar transformation matrix can represent the transformations of the second screw axis Therefore by assigning screw axes to each joint of a robot we can represent a transformation between the base and the end of the robot Figure 37 shows two screw axes ŝ1 which is fixed and ŝ2 which is moving connected together by the first link Similar to the DH representation the fixed screw axis represents the first fixed in place joint while the rest of the mechanism moves relative to it The total transformation is the combination of rotations and translations about these two or more axes independent of their order Note how each screw axis is defined by its own unit vector ŝn relative to the fixed reference frame and by a point Sn that is also defined relative to the reference frame Unlike the DH representation the screw axes are all defined relative to the reference frame not the previous frame Similarly subsequent screw axes can be attached to the second moving link and so on as shown in Figure 38 Similar to Chapter 2 denoting each transformation by a matrix An n1Tn the total transforma tion can be written as 0An A1A2 An 316 where each transformation is calculated with its own parameters Note that the orientation and location of the endplate are defined by a frame Unlike the DH method this representation uses only two frames the reference frame and the end frame Therefore x y z First link Second link θ1 θ2 S1 S2 t1 t2 ˆs2 ˆs1 Figure 37 Successive screw transformations Robot Kinematics with ScrewBased Mechanics 119 all motions are relative to the values at the reset position This means that unlike the DH represen tation where the desired joint values are subtracted from the previous joint values to calculate how much each joint must move in a screw representation all joint values are measured relative to the fixed reference frame In this representation a revolute joint is defined by its angle of rotation θi and zero pitch while a prismatic joint is defined by its pitch value ti and zero θ 36 Forward and Inverse Position Analysis of an Articulated Robot Figure 39 shows a 6axis articulated arm in its defined reset reference position All subsequent move ments about all joints will be measured relative to this position Joints are defined by screw axes ŝ1ŝ6 while the wrist is defined by the noa frame Note that we have only two frames defined the reference frame and the wrist frame Screw axes are not frames Note how all screw parameters are measured with respect to the reference frame Table 31 shows the parameters of each screw axis We use these values to calculate the transformation matrices for each screw a2 aw nw a3 xU zU ˆs3 ˆs1 ˆs5 ˆs4 ˆs2 ˆs6 a4 Figure 39 An articulated robot arm in its reset position represented by screw axes x y z S1 S2 ˆs2 ˆs1 Fixed base ˆs3 ˆs4 S3 S4 Figure 38 Successive screw axes can be used to represent a robot Introduction to Robotics 120 Notice how because the screw axis ŝ6 goes through the origin of the base frame its coordinates are 000 The orientation of the wrist frame w at reset can be represented by nw 001 T ow 0 10 T aw 100 T and its position by Pw a2 a3 a4 00 T We represent the desired target wrist position as before with Tdesired nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 Substituting the screw parameters into Eqs 314316 yields the forward kinematics equation of the robot A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 C2 0 S2 0 0 1 0 0 S2 0 C2 0 0 0 0 1 A3 C3 0 S3 a2 1C3 0 1 0 0 S3 0 C3 a2S3 0 0 0 1 A4 C4 0 S4 a2 a3 1C4 0 1 0 0 S4 0 C4 a2 a3 S4 0 0 0 1 A5 C5 S5 0 a2 a3 a4 1C5 S5 C5 0 a2 a3 a4 S5 0 0 1 0 0 0 0 1 A6 1 0 0 0 0 C6 S6 0 0 S6 C6 0 0 0 0 1 Note that these Amatrices are not similar to DH matrices because they represent transformations relative to the base reference frame and not a previous frame Multiplying A1A6 yields the total transformation between the wrist frame and the reference frame Next we analyze the position of the wrist followed by its orientation Notice that the position of the wrist not its orientation is not affected by the rotations about ŝ5 and ŝ6 and therefore we do not include A5 and A6 Table 31 Parameters table for the articulated arm in Figure 39 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 010 θ2 0 000 3 010 θ3 0 a2 0 0 4 010 θ4 0 a2 a300 5 001 θ5 0 a2 a3 a400 6 100 θ6 0 000 Robot Kinematics with ScrewBased Mechanics 121 in the transformation between the reference frame and the wrist frame although an endeffector length can be added to the position equation if desired The inverse kinematics analysis for the position of the wrist requires multiplication of only A1 through A4 followed by the position vector of the wrist joint The orientation of the wrist is affected by the rotations of the last two joints as well We have Pdesired A1A2A3A4Pw 317 As we did with the DH inverse kinematics analysis we premultiply both sides of this equation with A1 1 to decouple θ1 from the rest A1 1Pdesired A2A3A4Pw C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 Px Py Pz 1 C234 0 S234 a2C2 a3C23 a2 a3 C234 0 1 0 0 S234 0 C234 a2S2 a3S23 a2 a3 S234 0 0 0 1 a2 a3 a4 0 0 1 Therefore C1Px S1Py S1Px C1Py Pz 1 a2C2 a3C23 a4C234 0 a2S2 a3S23 a4S234 1 318 From the 21 elements we have S1Px C1Py 0 or θ1 tan1 Py Px and θ1 θ1 180 319 Equation 319 yields two answers for θ1 which may need to be checked Next by rearranging squaring and adding elements 11 and 31 of Eq 318 and remembering that S2S23 C2C23 cos θ2 θ3 θ2 C3 we get C1Px S1Pya4C234 2 Pz a4S234 2 a2C2 a3C23 2 a2S2 a3S23 2 a2 2 a3 2 2a2a3C3 Therefore θ3 cos1 C1Px S1Pya4C234 2 Pz a4S234 2a22a32 2a2a3 320 which results in two solutions θ3 and θ3 Solving the same elements 11 and 31 from Eq 318 simulta neously results in a solution for θ2 with respect to θ3 and θ234 which we will find shortly We get C1Px S1Pya4C234 a2C2 a3 C2C3S2S3 Pz a4S234 a2S2 a3 S2C3 C2S3 Solving these equations for S2 and C2 we get S2 Pz a4S234 a2 a3C3 C1Px S1Pya4C234 a3S3 a2 a3C3 2 a3S3 2 321 Introduction to Robotics 122 and C2 Pz a4S234 a3S3 C1Px S1Pya4C234 a2 a3C3 a2 a3C3 2 a3S3 2 322 Consequently θ2 ATAN2 S2C2 323 To simplify our derivations since the aaxis of the wrist is in the same orientation as ŝ6 we do not need to involve A6 among our transformations to calculate θ5 Consequently for the aaxes of the reference frame and the wrist frame we can write A1 1 ax ay az 0 desired A2A3A4A5 ax ay az 0 wrist C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 ax ay az 0 desired C234C5 C234S5 S234 S5 C5 0 S234C5 S234S5 C234 0 0 0 1 1 0 0 0 324 Note that the position vector of the transformation matrix is not of concern at this point because we do not need it in our analysis we are only concerned with the aaxis From Eq 324 we get C1ax S1ay C234C5 325 S1ax C1ay S5 326 az S234C5 327 Therefore θ5 sin1 S1ax C1ay and θ5 180θ5 328 Using Eqs 325 and 327 we can calculate θ234 as θ234 ATAN2 az C5 C1ax S1ay C5 329 To calculate θ6 we consider only the naxis of the wrist which is affected by the rotation of the last joint Once again to simplify the derivation we will only consider the orientation part of the matrices not the position vector We get A1 1 A1 2 A1 3 A1 4 nx ny nz 0 desired A5A6 nx ny nz 0 wrist A5A6 0 0 1 0 330 Robot Kinematics with ScrewBased Mechanics 123 Expanding Eq 330 we get nxC1C234 nyS1C234 nzS234 S5S6 331 nxS1 nyC1 C5S6 332 nxC1S234nyS1S234 nzC234 C6 333 Multiplying both sides of Eq 331 by S5 and Eq 332 by C5 and adding we get S6 S5 nxC1C234 nyS1C234 nzS234 C5 nxS1 nyC1 334 From Eqs 334 and 333 we find θ6 ATAN2 S6C6 Therefore all joint parameters can be calculated Example 34 Forward and inverse position analysis of the Stanford arm Figure 310 shows the Stanford arm at its assumed reset position and the screw axes and wrist frame attached to it Remem ber that Stanford arm is a spherical robot its third joint is prismatic Find the forward and inverse kinematics equations of the robot Solution Table 32 shows the screw parameters for the Stanford arm Notice that at reset the prismatic joint has a nominal value of d3 its stroke is represented by an additional pitch value of t a o z ˆs6 ˆs5 ˆs4 ˆs2 ˆs1 x n ˆs3 l2 d3 t Figure 310 The Stanford arm from Example 34 Table 32 Parameters table for the Stanford arm from Example 34 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 100 θ2 0 000 3 010 0 t l2 0 0 4 010 θ4 0 l2 0 0 5 001 θ5 0 l2 d3 0 6 010 θ6 0 l2 0 0 Introduction to Robotics 124 The wrist frame w at reset can be represented by nw 100 T ow 00 1 T aw 010 T and Pw l2d30 T We represent the desired target wrist position as before with Tdesired nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 The matrices representing the transformation are A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 1 0 0 0 0 C2 S2 0 0 S2 C2 0 0 0 0 1 A3 1 0 0 0 0 1 0 t 0 0 1 0 0 0 0 1 A4 C4 0 S4 l2 1C4 0 1 0 0 S4 0 C4 l2S4 0 0 0 1 A5 C5 S5 0 l2 1C5 d3S5 S5 C5 0 l2S5 d3 1C5 0 0 1 0 0 0 0 1 A6 C6 0 S6 l2 1C6 0 1 0 0 S6 0 C6 l2S6 0 0 0 1 To solve for the first three joint variables θ1 θ2 and t we multiply the transformations of the first three joints and the wrist and set the result equal to the desired position Pdesired A1A2A3Pw 335 Px Py Pz 1 C1 S1C2 S1S2 tS1C2 S1 C1C2 C1S2 tC1C2 0 S2 C2 tS2 0 0 0 1 l2 d3 0 1 C1l2S1C2 d3 t S1l2 C1C2 d3 t S2 d3 t 1 336 Squaring adding and simplifying the two sides of Eq 336 will yield d3 t P2 x P2 y P2 z l2 2 337 Note that d3 is the fixed length of the arm at reset which is a known quantity This equation gives two answers for the pitch value Since we now know the value of t we can calculate θ2 from θ2 sin1 Pz d3 t 338 Substituting d3 t and θ2 into Px and Py and solving for sin θ1 and cos θ1 we get S1 Pyl2PxC2 d3 t l2 2 C2 2 d3 t 2 and S1 Pxl2 PyC2 d3 t l2 2 C2 2 d3 t 2 θ1 ATAN2 S1C1 339 Robot Kinematics with ScrewBased Mechanics 125 With an approach similar to that in Section 36 the remaining three screw variables can be found The total transformation for the robot can be found by multiplying A1A2A3 and A4A5A6 where A4A5A6 C4C5C6S4S6 C4S5 C4C5S6 S4C6 l2S4S6 l2l2C4C5C6 d3C4S5 S5C6 C5 S5S6 l2S5C6 d3 1C5 S4C5C6C4S6 S4S5 S4C5S6 C4C6 l2S4C5C6 l2C4S6d3S4S5 0 0 0 1 Example 35 Figure 311 shows a 4axis robot at its reset position Derive the transformation matrix between the wrist and the reference frame Solution We assign screw axes to the joints and fill out the table of parameters as before and write the trans formation matrices and multiply to get the total transformation matrix Notice that ŝ3 represents both the revolute and prismatic joints For this robot at reset Pw l1 l3l20 T nw 0 10 T ow 00 1 T aw 100 T We find A1 C1 S1 0 0 S1 C1 0 0 0 0 1 0 0 0 0 1 A2 C2 0 S2 l1 C21 0 1 0 0 S2 0 C2 l1S2 0 0 0 1 A3 1 0 0 t 0 C3 S3 l2 C31 0 S3 C3 l2S3 0 0 0 1 z s1 x t l1 l2 l3 nw aw ˆs3 ˆ ˆs2 y θ3 θ2 θ1 Figure 311 The robot from Example 35 Table 33 Parameters table for the robot from Example 35 Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSxOSyOSz 1 001 θ1 0 000 2 010 θ2 0 l1 0 0 3 100 θ3 t 0 l2 0 Introduction to Robotics 126 The transformation matrix is A1A2A3 C1C2 S1C3C1S2S3 S1S3C1S2C3 C1C2t l2S1 C31 l2C1S2S3l1C1 C21 S1C2 C1C3S1S2S3 C1S3S1S2C3 S1C2tl2C1 C31 l2S1S2S3l1S1 C21 S2 C2S3 C2C3 S2tl2C2S3l1S2 0 0 0 1 340 The location and orientation of the wrist frame can be found by nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 A1A2A3 0 0 1 l1 l3 1 0 0 l2 0 1 0 0 0 0 0 1 For example at θ1 θ2 θ3 0 we get nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 0 1 l1 l3 t 1 0 0 l2 0 1 0 0 0 0 0 1 For θ1 90 and θ2 θ3 0 we get nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 1 0 0 l2 0 0 1 l1 l3 t 0 1 0 0 0 0 0 1 37 Design Projects You may select any of the robot projects mentioned in Chapter 2 and instead apply the screwbased mechan ics to it Notice that one important difference is the way each joint motion is controlled relative to the ref erence frame not the previous frame Otherwise the same issues will be addressed as we continue with the next chapters 38 Summary Although there are differences between the DH method and the screwbased method they are also very similar in many respects Knowing both techniques provides for better understanding of the kinematic anal ysis of robots The advantage of the DH method is its extensive development and application when it comes to differential motion analysis velocities and dynamic analysis as we see later It is also a straightforward easytoapply method that can be applied to any robot without confusion The screwbased method provides for direct control of each actuator of the robot with respect to the reset values instead of joint parameters Robot Kinematics with ScrewBased Mechanics 127 relative to the previous joint values as in DH method In certain problems the development and calculation of the inverse kinematic equations with the screwbased method are actually easier than with DH too In the next chapter we will study the kinematics of parallel robots Additional Reading 1 Craig John J Introduction to Robotics Mechanics and Control 4th edition Pearson Education 2017 2 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 3 Tsai LungWen Robot Analysis John Wiley and Sons 1999 4 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 5 Rocha CR CP Tonetto A Dias A Comparison between the DenavitHartenberg and the ScrewBased Methods Used in Kinematic Modeling of Robot Manipulators Robotics and ComputerIntegrated Manufacturing 27 pp723728 2011 Problems For the following problems you may use a copy of the following table as appropriate Joint Screw axis ŝn ŝx ŝy ŝz Rotation angle θn Pitch t Screw position OSn OSx OSy OSz 1 2 3 31 Derive the transformation matrix and the new location of point P after a rotation of θ 90 as shown in Figure P31 32 Using the screwbased method derive the transformation matrix and the new location of point P after a rotation of i θ 45 ii θ 90 as shown in Figure P32 θ x y z l1 o l2 P ˆs Figure P31 Introduction to Robotics 128 33 Verify the results of Problem 32 using rotation and translation transformations for both i θ 45 ii θ 90 as shown in Figure 32 34 Figure P34 shows a screw axis and point P attached to it Find the new location of the point after the screw axis is rotated θ 90 35 Repeat Problem 34 but also find the new orientation of a frame attached to point P as shown in Figure P35 36 Repeat Problem 34 but assume that point P also moves up with a pitch of t 1 unit 37 Derive the transformation matrix for the screw axis in Figure P37 Verify your solution for θ 0t 0 Calculate the new location of point P for θ 90 and θ 135 θ x y z l1 o l2 P ˆs x z P l1 l2 b a 45 45 Figure P32 z 3 2 5 30 1 y z o P b x y o P ˆs 1 5 3 2 1 S a Figure P34 b a z 3 2 5 30 1 y z o P1 x y o P ˆs 1 5 3 2 1 S n o a n o Figure P35 Robot Kinematics with ScrewBased Mechanics 129 38 For the SCARA robot in Figure P38 derive the transformation matrix and the position of point P 39 For the robot in Figure P39 derive the transformation matrix and the matrix representing the orien tation and position of the wrist as the robot moves x y z l1 l2 o S t P l3 ˆs θ Figure P37 l2 z P t l3 l1 x ˆs1 ˆs2 ˆs3 θ2 θ1 l2 Figure P38 aw nw 1 x z ˆs3 ˆs1 ˆs2 l3t3 l2 l1 θ2 θ1 Figure P39 Introduction to Robotics 130 310 For the robot in Figure P310 derive the transformation matrix and the matrix representing the ori entation and position of a frame at point P as the robot moves 311 For the robot in Figure P311 derive the transformation matrix and the matrix representing the ori entation and position of a frame at the wrist as the robot moves 312 For the 3DOF robot in Figure P312 a Derive the transformation matrix relative to the 0frame The length of each arm is 9 inches b Find the equations that describe the position of point P relative to the 0frame c Find the inverse kinematics equations for θ1 θ2 θ3 aw nw z s1ˆ y P l3t3 l2t2 l4 x ˆs2 ˆs3 ˆs4 θ2 θ1 Figure P310 nw z s1ˆ l2t2 y l3 x ow θ1 θ3 ˆs2 ˆs3 Figure P311 ow aw P yU ˆs3 into the page ˆs2 into the page zU 8 z0 y0 9 9 ˆs1 Figure P312 Robot Kinematics with ScrewBased Mechanics 131 4 Kinematics Analysis of Parallel Robots 41 Introduction As discussed in Chapter 2 serial manipulators are open loop this means that if there is a deflection in a link or joint the end of the robot will move without any feedback to the base of the robot Although the loop can be closed through other means the solution is usually very expensive and time intensive Therefore manufac turers of robot manipulators severely overdesign the links and joints to eliminate deflections Additionally since in most cases the joint actuators are attached to the moving links the controller has to deal with large inertia loads Parallel robots are closed loop Not only is there feedback to the base but the structure also reduces deflec tions Therefore there is no need to overdesign manipulator components This results in much lighter mov ing parts with much less inertia lower power requirements faster speeds and better load capacity The motions of the robot require simultaneous actuation of all the limbs Additionally in most cases the actua tors are attached to the base of the robot further reducing inertia loads Similar to serial manipulator robots parallel robots may be planar or spatial and are multidegreeof freedom mechanisms Typically a parallel robot consists of a fixed platform a moving platform and multiple sets of links and joints forming kinematic loops that connect the two Generally the number of sets of links and joints dictates the number of degrees of freedom DOF Each set is actuated by an actuator that is usually mounted near the fixed platform This way the weight of the actuator is borne by the fixed platform and due to reduced inertial loads parallel robots can be much faster than serial robots However parallel manipulators have much smaller work envelopes and are less dexterous This can be a significant parameter in choosing what type of system is used On the other hand in general the forward kinematic solutions for parallel robots are much more involved than their inverse kinematic solutions Since we are generally more interested in the inverse kinematic solutions anyway this is beneficial Parallel mechanisms have been around since the 1800s The Internet is full of pictures and examples of paralleltype mechanisms including hexapods In 1949 VE Gough designed and built a parallel mechanism to test tires at Dunlop The device changed the load and the direction of application of the load on the tire to mimic load conditions to test the life of the tire In 1965 Stewart designed a 6DOF device that could be used as a flight simulator It could translate and rotate about the xyz axes and create a feeling of 3D motion search the internet for pictures of the flight simulator In 1967 Klaus Cappel applied for and received a patent for a Motion Simulator that is what we now refer to as a parallel mechanism Today many 3D parallel mechanisms are referred to as Stewart platforms or StewartGough platforms Parallel mechanisms include parallel robots but also 3D positioning systems 3D spherical joints used for wrists and hip joints 3D grinding machines 3D rapid prototyping machines and many more Figure 41 is an Omron Hornet 565 industrial parallel robot 133 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed There are many possible designs for parallel manipulators with different numbers of DOF The links and joints may be prismatic or fixed length revolute spherical and a variety of universal and planar joints that move in the fixed platform to increase the workspace 1 2 3 4 5 6 Spherical joints in par allel robots are passive joints and are used to facilitate 3D motions but they are not actively actuated or controlled Prismatic joints are slower and actuator placement may be an issue Therefore designs with rigid limbs and actuated revolute joints are preferred for industrial robots 42 Physical Characteristics of Parallel Robots Compared to serial robots parallel manipulators can be more complicated systems with a larger variety of possible configurations To better understand the issues involved we first study the following concepts about mechanisms Figure 42 shows two kinematic chains and three kinematic loops A chain consists of a number of links and joints eg a link with two spherical joints or two links attached with a revolute joint A kinematic chain Figure 41 An OmronAdept Hornet565 parallel robot Source Image provided by Omron Automation 2018 Omron All Rights Reserved A B O1 O2 C O3 a b c d e Spherical joint Spherical joint A B O1 O2 Figure 42 Kinematic chains and loops Introduction to Robotics 134 whose links are connected to each other by two paths forms a closedloop chain eg in Figure 42c O1 A B O1 O2 B Otherwise it is an openloop chain Figure 42d shows two closed loops attached together The loops in Figure 42ce are mechanisms since they are attached to the ground The mechanisms in Figure 42c d are 1DOF mechanisms they only require one input to completely describe the position of all the elements of the chain The openloop mechanism in Figure 42e has 3 DOF all three links can be moved independently The number and nature of the joints determine the DOF of a mechanism Figure 43 shows a mechanism consisting a link and two spherical joints at the ends both connected to the ground Note that the link rotates about its own axis without affecting anything This passive degree of freedom does not affect the system and should not be counted toward the total DOF of a system The same loss of degree of freedom happens in singular situations when two joints provide the same redundant motions Equation 41 referred to as the GruberKutzbach Equation allows us to calculate the number of DOF of a mechanism In this equation λ 3 for planar or spherical mechanisms and λ 6 for spatial mechanisms l is the number of links in the system including the ground j is the number of joints fi is the summation of the number of DOF of all the joints and fpassive is the total number of passive DOFs F λ lj1 fifpassive 41 where i is the number of DOF of a joint Figure 44 shows a number of different mechanisms Table 41 shows the resulting DOF for each case Note the following 1 In Figure 44d note that a spherical joint has 3 DOF Therefore f3 1 3 3 2 In Figure 44e one spherical joint is attached to the ground and the second is free to move There fore there is 1 passive DOF because both axial rotations of the spherical joints are collinear Oth erwise we will get 7 DOF for the system For this mechanism we have fi f1 f3 1 1 2 3 7 3 In Figure 44f including the ground there are only two links because the lower cylinder of the pris matic actuator is attached to the ground and part of it whereas in Figure 44g the lower cylinder rotates about the joint and therefore there are three links 4 In Figure 44i joint B counts as two joints Imagine that instead of links BC AB and O2B being attached together at B link BC was attached to a point somewhere between O2 and B while O2B remained a rigid link We would have two joints although there would still be six links 5 The StewartGough platform in Figure 44j consists of six prismatic extensible links attached to the two platforms by 12 spherical joints Each prismatic link counts as two links therefore the total number of links plus platforms is l 6 2 2 14 The total number of joints is 12 spherical and 6 prismatic or 18 and fi f1 f3 6 1 12 3 42 Spherical joint Spherical joint Figure 43 A mechanism may possess a passive degree of freedom which should not be counted toward its total DOF Kinematics Analysis of Parallel Robots 135 A parallel robot is called symmetrical if it satisfies the following requirements All loops are similar to each other have the same construction All limbs have the same number of joints that are similar The DOF of the platform equals the number of limbs a b c e d O1 f O1 g i h j O1 S S P A B C O1 O2 O3 A B O1 O2 Figure 44 The DOF of different types of mechanisms Table 41 Parameters and DOF values of the mechanisms in Figure 44 based on Eq 41 Figure 44 λ l including ground j fi fpassive DOF a 3 2 1 1 0 1 b 3 3 2 2 0 2 c 3 4 3 3 0 3 d 6 2 1 3 0 3 e 6 4 3 7 1 6 f 3 2 1 1 0 1 g 3 3 2 2 0 2 h 3 4 4 4 0 1 i 3 6 7 7 0 1 j 6 14 18 42 6 6 Introduction to Robotics 136 Otherwise the robot is said to be asymmetrical Additionally defining a kinematic chain as a series of joints and links a fully parallel robot satisfies the following conditions Every kinematic chain has only one active joint the rest are inactive No portion of a chain is linked to more than two bodies The DOF of the platform equals the number of limbs This limits the number of inverse kinematics solution to only one Otherwise the robot is not fully parallel For example if a chain consists of a prismatic link with two spherical joints at its ends as in Figure 44j for a fully parallel robot only one of the joints can be active say the prismatic joint the spherical joints only move passively as needed when the prismatic joint is extended or retracted Like serial robots parallel robots can be designed in many different configurations Parallel robots can be planar 2D or spherical and spatial 3D For symmetrical robots which we study in this chapter there are a limited number of workable configurations for 2D or 3D robots For example symmetrical planar parallel robots with 3 DOF will require three loops composed of two links and three joints each Since all joints are assumed to have 1 degree of freedom either as prismatic P or revolute R joints there can only be 7 combinations RRR RRP RPR PRR PRP PPR and RPP In each loop only one joint is actively controlled Figure 45 shows schematics of an RRR and an RPR planar robot The underlined letter specifies the active joint For spherical parallel robots the only practical joint type is revolute Therefore the loop type can only be RRR Additionally all axes of rotation should intersect at one point called the spherical center Figure 46 shows a schematic of a spherical parallel robot For 3D spatial symmetric parallel robots where all the limbs are the same we can generally assume the following The number of limbs determines the DOF of the robot threelimbed robots have 3 DOF fourlimbed robots have 4 DOF etc Figure 41 shows a 3DOF OmronAdept Hornet 565 robot with three limbs Figure 47 is a 4DOF OmronAdept Quattro 650800 robot with four limbs As long as each limb has the same number of DOF as the robot it does not matter how many links are joined together to make it In practice spherical 3DOF and cylindrical 2DOF joints are passive It is practically impossible to actively control 2 and 3DOF joints Therefore they are only used to achieve necessary DOF Only revolute or prismatic joints are actively controlled for setting the position and orientation of the mov ing platform O3 O2 O3 O1 O1 O2 Figure 45 Schematics of two possible planar parallel robots Kinematics Analysis of Parallel Robots 137 Figure 44j shows the schematic drawing of a StewartGough robot with 6 limbs each with 7 DOF minus 1 passive degree of freedom making the robot a 6DOF robot Other combinations of joints are possible too For example knowing that prismatic and revolute joints have 1 degree of freedom cylindrical and universal joints have 2 DOF and spherical joints are 3DOF joints there can be many different combinations of joints that will provide the necessary DOF for the robot For example instead of two spherical joints and one pris matic joint SPS on each limb of the StewartGough robot and remembering that one of the DOF is passive and does not count it is possible to make it with six revolute joints 6R as shown in Figure 48 with two spherical joints and one cylindrical joint SCS with 2 passive DOF with one revolute joint and two spherical joints RSS with 1 passive degree of freedom etc and achieve the same capability to position and orient the platform 1 4 Figure 46 Spherical Agile Eye and Agile Wrist parallel robotic mechanisms Source Reproduced with permission from Dr Soheil Sadeghi Figure 47 A 4DOF OmronAdept Quattro 650800 robot Source Image provided by Omron Automation 2018 Omron All Rights Reserved Introduction to Robotics 138 Most industrial parallel robots are meant for pick and place or simple assembly operations This only requires setting the x y and zcoordinates Therefore many industrial parallel robots are 3DOF and have three limbs In some cases a fourth separate motor on the fixed platform attached to a rotating toolholder in the moving platform with a linkage provides an additional rotation that makes it a 4DOF robot There are also many 4axis parallel robots with 4 set of limbs that do the same Limiting the limb design to revolute prismatic and spherical joints will also limit the number of possible designs Most industrial parallel robots only use revolute and passive spherical joints Figure 49 shows 6DOF StewartGough type platforms with type 33 63 and 66 configurations These systems all have six limbs which may be attached to the same or separate points Either way the total DOF remains the same 43 The DenavitHartenberg Approach vs the Direct Kinematic Approach The DenavitHartenberg DH representation is very general and can be used for modeling and analysis of serial and parallel robots For example imagining a generic parallel robot in Figure 410 repeated here we can assign a frame to each of the joints of each limb In this figure all joints are revolute but the same applies Figure 48 An alternative design for a 6DOF parallel robot with all revolute joints Type 33 Type 66 Type 63 Figure 49 StewartGough type 33 63 and 66 parallel robots Figures by Trent Peterson Kinematics Analysis of Parallel Robots 139 to prismatic universal cylindrical or spherical joints For cylindrical and universal joints two intersecting frames represent the variables For spherical joints three intersecting frames represent the variables As in Chapter 2 with serial robots successive frame multiplications yield transformations between frames The difference here is that since in parallel robots the kinematic loops are closed each loop representation will be 0A1 1A2 2A3 3A4 n1An nA0 I This results in a complicated but still 4 4 transformation matrix equation Simultaneously solving one matrix equation for each loop will result in a set of solutions for the unknown joint variables In order to do this it will be necessary to eliminate passive joint variables from each equation and only keep the active joint variable However DH representation of parallel robots is a very involved and timeconsuming approach As men tioned before for parallel robots the forward kinematics is generally much more difficult to do than the inverse kinematics which is exactly what we want Therefore a vectoranalysis approach is usually used to solve the kinematics of parallel robots resulting in simpler inverse kinematics solutions We will use the vectoranalysis approach for the remainder of this chapter 44 Forward and Inverse Kinematics of Planar Parallel Robots Planar parallel robots move in a plane and therefore are simpler We start our analysis of forward and inverse kinematics of parallel robots with planar robots and later analyze 3D spatial robots Conventionally and similar to serial robots the configuration of the robot is specified by the type of joints each limb has RPR indicates a revolute joint a prismatic joint and a revolute joint connected to each other by limbs The underlined letter indicates which joint is active Similarly RRR indicates three revolute joints where the first joint is actively controlled As mentioned earlier unlike with the serial robots the inverse kinematic analysis of parallel robots is easier while the forward kinematics analysis is much more involved This is to our advantage since we are generally interested in inverse kinematic solutions not the forward We want to be able to specify the position and orientation of the robot platform and calculate what the joint values should be to achieve them In the following sections we will analyze a 3RPR and a 3RRR robot z0 x1 z1 x0 z2 x4 z4 x5 z3 x3 z5 x2 Figure 410 DH frame representation for parallel robots Introduction to Robotics 140 441 Kinematic Analysis of a 3RPR Planar Parallel Robot Figure 411 shows a threelimbed RPRtype planar parallel robot Although it does not have to be so we have selected an equilateral triangular base and a moving platform for geometric simplicity All positions and orientations are measured relative to the arbitrarily located reference frame shown Vectors l1l2l3 represent the position of the fixed base of the robot Values d1 d2 d3 represent the lengths of the active prismatic joints that connect the moving platform to the base through the revolute joints Vectors c1c2c3 represent the three apexes of the moving platform relative to its center C Vector P and angle θ are the desired position and orientation of the platform relative to the fixed frame The DOF of the system can be calculated through Eq 41 F λ lj1 fifpassive 3 891 90 3 For each loop consisting of the base a limb and the platform we can write P ci li di for i 123 Since the prismatic joint is the active joint the unknown we write di P ci li 42 As shown in Figure 411b lengths c1 c2 c3 are constant but as the platform rotates about the zaxis the xand ycomponents of these values change according to the rotation matrix Rotz θ However since this is a planar robot these values cab be premultiplied by a 2D version of the rotation matrix Rot zθ Cθ Sθ Sθ Cθ x y O1 A1 P c1 c2 c3 b A2 A3 O3 O2 O n o l1 l3 l2 d3 d1 d2 c1 c2 c3 θ Figure 411 A 3RPR planar parallel robot Kinematics Analysis of Parallel Robots 141 For each loop of the planar robot Eq 42 can be expanded as dix diy Px Py Cθ Sθ Sθ Cθ cix ciy lix liy for i 123 or dix diy Px Py CθcixSθciy Sθcix Cθciy lix liy for i 123 43 Given the desired values of the location and orientation of the moving platform Px Py θ the length di of each actuator can be directly calculated from Eq 43 Calculation of the forward kinematic equations of the robot is not a trivial matter The solution is poten tially a sixthorder polynomial that yields the position and orientation of the platform given the lengths of the actuators Fortunately we do not usually need to do this but it indicates that there are potentially six solu tions for the robot As you may imagine from Figure 411 when all three actuators are at their minimum length extending the actuators may become impossible or if the platform does indeed move it may rotate in either direction and therefore it is a singularity and should be avoided Example 41 Figure 412 shows a planar 3RPR robot with a 12 in equilateral triangular base and a 3 in platform We would like to position the platform center at Px 4 in Py 5 in and θ 30 Deter mine the lengths of the three prismatic actuators that would place and orient the platform Solution From Figure 412 we get the following values l1 0 0 l2 12 0 l3 6 10 4 x y 3 12 c1 c2 c3 30 b Figure 412 The robot from Example 41 Introduction to Robotics 142 At reset position c1 1 5 0 866 c2 1 5 0 866 c3 0 1 73 Substituting into Eq 43 for each actuator we find d1x d1y 4 5 0 866 1 5 0 5 0 866 0 5 1 5 0 866 0 866 0 0 3 134 3 5 d1 4 7 in d2x d2y 4 5 0 866 1 5 0 5 0 866 0 5 1 5 0 866 0 866 12 0 6 27 5 d2 8 02 in d3x d3y 4 5 0 866 0 0 5 1 73 0 5 0 0 866 1 73 6 10 4 2 865 3 90 d3 4 84 in Calculating the lengths of each actuator for any other position or orientation only requires substitut ing the given values into Eq 43 442 Kinematic Analysis of a 3RRR Planar Parallel Robot In order to see the approach taken to solve parallel robots with revolute joints we analyze a 3RRR planar robot with three revolute joints and two links on each limb where the first revolute joint is active This allows the motor to be stationary on the frame and therefore reduces inertia load You will notice how much more involved this process is compared to the analysis of an RPR robot Figure 413 shows a planar parallel robot Although it does not have to be so we have selected an equilateral triangular base and moving platforms From Eq 41 we find the DOF of the system to be F λ lj1 fifpassive 3 891 90 3 x y A1 A3 A2 C1 C3 C2 B1 B3 B2 α1 β1 β2 α2 α3 β3 P n o l1 l3 l2 a3 a2 a1 b1 b2 b3 O2 O1 c3 c2 c1 θ Figure 413 A 3RRR planar parallel robot Kinematics Analysis of Parallel Robots 143 Vectors l1l2l3 represent the locations of the fixed revolute joints on each limb relative to the arbitrarily located reference frame Vectors c1c2c3 represent the apexes of the moving platform relative to its center which is the point where we specify the location of the moving platform Vectors a1a2a3 and b1b2b3 rep resent the linkages of each limb In practice the limbs are usually equal but in this analysis we will allow them to be of any length The angles α1 α2 α3 represent the angles of the active joints on each limb relative to the x axis The angles β1 β2 β3 represent the second joint on each limb and are measured relative to the first link These joints are not active and therefore we try to eliminate these angles Vector P is the desired location of the center of the platform and angle θ is its orientation relative to the reference frame The angles α1 α2 α3 are the unknowns The controller drives the robot limbs to these values For each limb i 123 we can write the following vector equation li ai bi P ci or li ai Pci bi The components of vectors ai and bi are expressed in terms of angles αi and αi βi Using a 2D rotation matrix to describe the orientation of the platform the x and ycomponents of these vectors can be written as lix liy Px Py aiCαi aiSαi Cθ Sθ Sθ Cθ cix ciy biC αi βi biS αi βi 44 where cix ciy are the coordinates of the moving platform at reset We are interested in eliminating βi We rearrange Eq 44 to aiCαi lixPxcixCθ ciySθ biC αi βi aiSαi liyPycixSθciyCθ biS αi βi 45 We denote the two parentheses of Eq 45 as quantities qix qiy qix lixPxcixCθ ciySθ qiy liyPycixSθciyCθ 46 to get aiCαi qix biC αi βi aiSαi qiy biS αi βi 47 To eliminate the inactive angles βi we square and add the two sides of Eq 47 as ai2C2αi qix2 2aiqixCαi bi 2C2 αi βi ai2S2αi qiy2 2aiqiySαi bi 2S2 αi βi ai 2 qix 2 qiy 2 2ai qixCαi qiySαi bi 2 or qixCαi qiySαi Qi where Qi bi 2ai2qix2qiy2 2ai 48 Referring to Appendix A we select Method 2 for solving this equation We substitute the following trig onometric equivalents for sin αi and cos αi sinα tanα 1 tan2 α and cosα 1 1 tan2 α Introduction to Robotics 144 to get qix 1 tan2 αi qiy tanαi 1 tan2 αi Qi We square both sides of the equation and rearrange it to get tan2 αi qiy 2Q2 i tanαi 2qixqiy qix 2Q2 i 0 49 Equation 49 is a simple quadratic equation that yields two values for tan αi However since we do not know whether the answer is in the first or third quadrant we do not have individual values of sine and cosine and do not know if they are positive or negative in effect Eq 49 yields four answers for each αi However not all of these values actually work Although these equations appear to be involved all the coefficients of Eq 49 are known and can be simply calculated Rearranging Eq 47 and squaring and simplifying it will allow us to also calculate βi as follows although it is not used for controlling the robot qix biC αi βi aiCαi qiy biS αi βi aiSαi qix 2 qiy 2bi 2ai 2 2aibi cosβi Angle β can also be found from subtracting the two complementary values of α Example 42 Figure 414 shows a small planar parallel 3RRR robot We have chosen the lengths of the linkages to all be ai bi 4 in while the triangular moving platform is 3 in in length and the fixed platform is 10 in in length We want to position and orient the platform at Px 7 in Py 5 in and θ 0 Find the necessary angles of each first linkage of each limb Solution we can write the following l1 0 0 l2 10 0 l3 5 8 66 x y 3 4 10 4 625 533 2464 Figure 414 Planar 3RRR parallel robot from Example 42 Kinematics Analysis of Parallel Robots 145 At reset position c1 1 5 0 866 c2 1 5 0 866 c3 0 1 73 Using Eqs 46 48 and 49 the following values are calculated q1x 5 5 q1y 4 134 Q1 5 917 tanα1 2 430 11 α1 6 25 67 6 q2x 1 5 q2y 4 134 Q2 2 42 tanα2 0 241 34 α2 53 3 13 4 166 6 q3x 2 q3y 1 93 Q3 0 97 tanα3 0 482 28 α3 66 4 246 4 25 7 Figure 415 shows how the complementary angles relate to the desired configuration It should be mentioned that although results from either set can theoretically be mixed in reality only the sets con taining either the first or the second set of angles are practical Otherwise it may become impossible to move the robot to another point due to the present angles To see what happens when the specified desired position or location changes we will do the same but this time we will specify θ 90 Substituting the same values into Eqs 46 48 and 49 we get q1x 7 87 q1y 3 5 Q1 9 27 However we find that these values will not yield a satisfactory answer because the value of the dis criminant for α1 is negative This indicates that the robot cannot be at this position and orientation The linkages are too short x y Figure 415 Complementary configurations of linkages for Example 42 Introduction to Robotics 146 45 Forward and Inverse Kinematics of Spatial Parallel Robots In this section we will study how a similar analysis can be applied to 3D parallel robots Since there are far more possible configurations for a 3D parallel robot we will limit our studies to particular types with certain simplifying assumptions Included will be StewartGough platform and 3DOF and 4DOF parallel robots with revolute and prismatic actuators Although the general approaches to derive the inverse kinematic equa tions for these robots have similarities their solutions are different 451 Kinematic Analysis of a Generic 66 StewartGough Platform As mentioned earlier the StewartGough Platform refers to a parallel robot that has six variablelength kin ematic chains connected to a fixed platform at one end and to a moving platform at the other The spacing between all connection points on both platforms is usually equal or symmetrical although it does not have to be The joints connecting the kinematic chains to the two platforms are all spherical As shown in Section 42 the StewartGough Platform has 6 DOF allowing the user to specify the position and orientation of the mov ing platform By calculating the correct length of each prismatic joint the specified position and orientation can be achieved We assume that a fixed reference frame is placed at the geometric center of the fixed platform such that its xaxis is pointed toward the spherical joint of the first kinematic chain A1 as shown in Figure 416 The zaxis of the frame is pointed up and the yaxis is mutually perpendicular to both according to the righthand rule Similarly we attach a reference frame to the moving platform at its geometric center with its naxis pointed toward the spherical joint of the first kinematic chain B1 its aaxis perpendicular to the platform and upward and its oaxis mutually orthogonal to both according to the righthand rule The position of the moving plat form is specified by the location of the center of the moving platform relative to the fixed reference frame and its orientation by three rotations relative to the fixed reference frame Notice that there may also be a Uni verse frame from which all measurements are made for convenience For example if the robot is attached a b xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B2 B3 B4 B5 B6 d1 P b1 a1 xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B2 B3 B5 B6 d1 P b1 a1 B4 Figure 416 A 66 type Stewart platform Kinematics Analysis of Parallel Robots 147 upsidedown for its task the position may be measured from a work table In that case all positions measured relative to the Universe frame can easily be transferred to the fixed frame of the base by subtraction Figure 416 shows a robot both in its reset position as well as in a position defined by position vector P and angles θ ϕ ψ relative to the x y and zaxes Notice how the fixed and moving platforms together with the six kinematic chains form six closed loops We will use these six closed kinematic loops to derive the inverse kinematic equations of the robot Referring to Figure 416a we can write a vector equation for each loop as di P bi ai for i 16 410 where di represents the variablelength link which we want to calculate P is the position of the center of the moving platform relative to the fixed frame ai is the vector between the center of the fixed platform and spherical joint Ai and bi is the vector between the center of the moving platform and spherical joint Bi Notice that the values of P a and b are given or known and constant Equation 410 also holds true for the case when the moving platform has moved Figure 416b although the vectors have to be redefined for this position Now lets first define each of these vectors Vector P is the desired position of the center of the moving platform and is given Vectors ai are constant and fixed Although in general the spacing between the spher ical joints may be different assuming symmetry they will all be 60 Therefore we can write ai a cos i1 60 a sin i1 60 0 1 411 In case of a lack of symmetry each vector can be defined based on the given information Similarly although they do not have to be equally spaced vectors bi for the rest position can be written as bi b cos i1 60 b sin i1 60 0 1 412 However if the moving platform rotates vectors bi change Therefore we need to calculate these vectors after rotation about the fixed axis Notice that the desired orientation of the moving platform is specified and known we know the three angles of rotation relative to the axes of the fixed reference frame In order to calculate the current values of vectors bi imagine that the moving reference frame noa starts at the fixed reference frame xyz and coincident with it We rotate the moving frame about the x y and zaxes angles of θ ϕ ψ respectively before moving the frame a distance of P to achieve the desired position and orientation as specified All these transformations are relative to the fixed reference frame axes xyz Therefore the frame noa will go through a set of transformations that can be calculated by premultiplying it by the correspond ing rotation matrices as nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Rot zψ Rot yϕ Rot xθ 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Introduction to Robotics 148 Substituting the appropriate rotation matrices from Chapter 2 we get nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 Cψ Sψ 0 0 Sψ Cψ 0 0 0 0 1 0 0 0 0 1 Cϕ 0 Sϕ 0 0 1 0 0 Sϕ 0 Cϕ 0 0 0 0 1 1 0 0 0 0 Cθ Sθ 0 0 Sθ Cθ 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 CψCϕ CψSϕSθSψCθ CψSϕCθ SψSθ 0 SψCϕ SψSϕSθ CψCθ SψSϕCθCψSθ 0 Sϕ CϕSθ CϕCθ 0 0 0 0 1 413 Note that this rotation arrangement is one of possible 24 different arrangements If any other arrangement is used eg rotations about the z y xaxes respectively the same method can be developed for its analysis with the proper order of matrix multiplications In that case the specification of rotations will also follow the same order Using Eq 413 we can now express vectors bi within the moving platform reference frame by bix biy biz 1 new CψCϕ CψSϕSθSψCθ CψSϕCθ SψSθ 0 SψCϕ SψSϕSθ CψCθ SψSϕCθCψSθ 0 Sϕ CϕSθ CϕCθ 0 0 0 0 1 bix biy biz 1 reset 414 Since the rotation angles as well as the vectors bi at reset are all known the value of each of the vectors of bi at the desired location can be calculated The inverse kinematic relationship of Eq 410 can now be solved for each loop as dix diy diz Px Py Pz bix biy biz aix aiy aiz for i 16 415 and di dix 2 diy 2 diz 2 for i 16 416 Notice that due to the nature of parallel robots where multiple closed loops are coupled together all di for i 1 to6 must be calculated simultaneously and continually and the controller must drive the actuators simultaneously otherwise the platform will not be at the desired position or orientation Also notice that in our model we have assumed that the platforms have a zero thickness and that the spher ical joints are located exactly on the platform In reality platforms have a thickness and spherical joints depending on how they are attached have offsets To remedy these discrepancies you may modify your loop equations to include the offsets and thicknesses or subtract them from the actual specified position vectors In other words if the actual location on the platform is specified as P the thickness of the platform and the sphericaljoint offsets can be subtracted from it before substitution into equations It is important to mention here that a general StewartGough parallel robot in which all joints are separated equally at 60 is inherently unstable when the platforms are parallel because all the loops are Kinematics Analysis of Parallel Robots 149 the same It can collapse when the moving platform rotates about the zaxis and simultaneously moves down without any change of the actuator lengths P as shown in Figure 417 When the platforms are not parallel the tendency to be unstable is reduced We assumed 60 separations here to simplify the der ivation of loop equations However if the separations between successive joints on either platform are not all equal eg 40 80 vs 60 60 due to the asymmetry between the loops the system is stable Therefore a 63 and a 33 configuration are also stable We will study these configurations next Regardless the way the equations are developed for unequal separations are the same except that vectors āi and bi are at different angles Example 43 For a generic 66 StewartGough parallel robot with a 5 in and b 3 in calculate the length of each linkage for the following positions and orientations of the moving platform a θ 90 ϕ 0 ψ 0 Px 0Py 0Pz 12 in b θ 90 ϕ 0 ψ 0 Px 2Py 2Pz 12 in c θ 90 ϕ 45 ψ 0 Px 2Py 2Pz 12 in Solution For each case we substitute the given values into Eqs 410416 For all three cases we get Loop 1 2 3 4 5 6 ax 5 25 25 5 25 25 ay 0 4330 4330 0 4330 4330 az 0 0 0 0 0 0 bx 3 15 15 3 15 15 by 0 2598 2598 0 2598 2598 bz 0 0 0 0 0 0 Figure 417 A general StewartGough platform rotating and moving down without changing the lengths of the actuators Model designed by Trent Peterson Introduction to Robotics 150 For question a we get Loop 1 2 3 4 5 6 bx rotated 3 15 15 3 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 2598 2598 0 2598 2598 dx 2 1 1 2 1 1 dy 0 4330 4330 0 4330 4330 dz 12 14598 14598 12 9402 9402 d 12166 15259 15259 12166 10399 10399 For question b we get Loop 1 2 3 4 5 6 bx rotated 3 15 15 3 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 2598 2598 0 2598 2598 dx 0 1 3 4 3 1 dy 2 233 233 2 6330 6330 dz 12 14598 14598 12 9402 9402 d 12166 1482 15084 12806 11725 11378 For question c we get Loop 1 2 3 4 5 6 bx rotated 2121 2898 0777 2121 2898 0776 by rotated 0 0 0 0 0 0 bz rotated 2121 0776 2898 2121 0776 2898 dx 0879 2398 5277 4879 1602 1276 dy 2 233 233 2 6330 6330 dz 9879 1278 14898 14121 11224 9102 d 10117 1321 15975 15074 12985 1116 As you may have noticed in this analysis the unknown parameter in this case the length of the linkage for each loop is directly calculated from each loop equation Therefore the inverse kinematic solution is straight forward and easy with a limited number of solutions However in forward kinematic calculations where the lengths of linkages are specified and the position and orientation of the moving platform are wanted the solution is a function of all the linkage lengths As a result all loop equations must be solved together to Kinematics Analysis of Parallel Robots 151 find six simultaneous unknowns three position components and three orientation components which is a much more involved process 452 Kinematic Analysis of a Generic 63 StewartGough Platform A generic 63 StewartGough parallel platform is similar to a 66 platform except that each two of the lin kages are connected to the same point on the moving platform as shown in Figure 418 The analysis of this system is very similar to the 66 platform except that points B1 and B2 B3 and B4 and B5 and B6 are 120 apart We can write six loop equations similar to the 66 platforms as in Eq 410 while incorporating the new geometry Notice that in Figure 418 for the sake of symmetry and to make our equations easier we have moved the fixed reference frame by 30 Therefore point A1 is at 30 etc We can write the following represen tation for vectors ai ai a cos i1 60 30 a sin i1 60 30 0 1 a sin i 60 a cos i 60 0 1 417 Similarly for vectors bi we can write bi b cos i1 60 b sin i1 60 0 1 fori 135 418 The remaining analysis and equations developed for 66 platforms apply here too In reality due to their physical dimensions the two spherical joints cannot be at exactly the same point Therefore the equations may be modified to account for the small angle between them xo yo zo np op ap A1 A2 A3 A4 A5 A6 B1 B3 B5 d1 P b1 a1 Figure 418 A generic 63 StewartGough platform Introduction to Robotics 152 Example 44 For a generic 63 StewartGough parallel robot with a 5 in and b 3 in calculate the length of each linkage for the following positions and orientations of the moving platform a θ 90 ϕ 0 ψ 0 Px 0Py 0Pz 12 in b θ 0 ϕ 90 ψ 0 Px 2Py 2Pz 12 in Solution For each case we substitute the given values into Eqs 410416 For both cases we get Loop 1 2 3 4 5 6 ax 433 433 0 433 433 0 ay 25 25 5 25 25 5 az 0 0 0 0 0 0 bx 3 3 15 15 15 15 by 0 0 2598 2598 2598 2598 bz 0 0 0 0 0 0 For question a we get Loop 1 2 3 4 5 6 bx rotated 3 3 15 15 15 15 by rotated 0 0 0 0 0 0 bz rotated 0 0 2598 2598 2598 2598 dx 13301 133 15 283 283 15 dy 25 25 5 25 25 5 dz 12 12 146 146 9402 94019 d 1233 1233 155 1508 1013 10754 For question b we get Loop 1 2 3 4 5 6 bx rotated 0 0 0 0 0 0 by rotated 0 0 2598 2598 2598 2598 bz rotated 3 3 15 15 15 15 dx 233 233 2 633 633 2 dy 45 05 0402 2098 1902 4402 dz 9 9 135 135 135 135 d 10329 9310 13653 15057 15031 1434 Kinematics Analysis of Parallel Robots 153 Figure 49 shows a 33 StewartGoughtype platform The analysis of this type of parallel robot will be very similar to the analysis for 66 and 63 platforms where only the descriptions of the components of the ai and bi vectors are modified and the loop equations relate to the corresponding connection points This analysis is left for the reader as an exercise 453 Kinematic Analysis of a 3Axis RSSType Parallel Robot There are many popular industrial parallel robots on the market mostly 3 or 4DOF and mostly used for highspeed pickandplace or assembly operations rapid prototyping or similar tasks These robots are very fast stiff and accurate Because their actuators are all housed on the fixed platform these robots have low inertial loads Some 3DOF models include an additional motor mounted on the fixed platform which con nects to a rotating tool holder on the moving platform through a shaft with Ujoints this allows the tool holder to rotate independently of the other three actuators therefore making it into a 4DOF robot However this additional degree of freedom is external to the kinematic loops and does not affect the kinematic equa tions of motion The moving platform of a 3DOF parallel robot always remains parallel to the fixed platform with no ori entation change As a result the user can only specify the location of the center of the platform in space but there are no rotations except with the additional independent motor rotating the tool holder Figure 419 shows a typical 3DOF robot The robots three kinematic loops are RSS type Notice that the linkages con necting the actuating arms to the moving platform called outer arms are in fact double links making them parallelograms that maintain the fixed orientation of the platform Using Eq 41 repeated here we can find the DOF of the robot as F λ lj1 fifpassive where λ 6 spatial mechanism l 11 two platforms three actuating arms six outer arms j 15 fi 3 1 12 3 39 fpassive 6 six outer arms each with one passive degree of freedom F 6 11151 396 3 Figure 419 Typical 3DOF industrialtype parallel robot Source Reproduced with permission from Yaskawa Electric Introduction to Robotics 154 Figure 420 shows the schematic drawing of a 3DOF robot Due to the nature of the tasks these robots perform they are usually mounted as shown We assign a Universe reference frame attached to the fixed platform as shown Note that the xaxis is pointed toward the first actuating joint A1 The zaxis is pointed downward to facilitate the specification of height Obviously other arrangements can also work but in this frame we measure the height relative to the fixed platform downward Measuring height can also be done relative to the work table by subtracting from the distance between the origin and the table The yaxis is orthogonal to x and zaxes Similarly a moving reference frame Mnoa is attached to the moving platform with similar directions except that this frame translates with the moving platform Angles θi represent the actuation angle of each arm and are the only variables that we need to calculate to run the robot We assume that θ 0 when the arm is horizontal Notice the direction of rotation We assume symmetry therefore lengths a distance of each actuating joint from the origin of the Universe frame d the same on the moving platform l length of each actuating arm and h length of each outer arm are the same although their coordinates differ For each of the three loops we can write UM MDi UAi AiBi BiDi for i 123 419 The angle between each actuating arm and outer arm varies as the robot moves but we do not need to calculate the angle and do not want to involve it in our calculations only θ is needed for each arm Therefore we express vectors BiDi using the coordinates of the two end points of each vector by BiDi DixBix i DiyBiy j Diz Biz k 420 Rearranging Eq 419 we get BiDi UM MDi UAi AiBi for i 123 421 Notice that UM MDi terminates at point Di and UAi AiBi terminates at Point Bi Therefore Eqs 420 and 421 represent the same vectors Since the coordinates of the different points for each loop are different we will analyze each loop separately These three loops can be solved independently of each other and although the process is the same for all three each one is unique x y z U M n o a A1 A2 A3 B1 B3 D1 D3 D2 d a l h P θ3 θ1 Figure 420 A typical 3DOF RSStype parallel robot Kinematics Analysis of Parallel Robots 155 Loop 1 The desired position of the moving platform is UM P PxPyPz T and MD1 d 0 0 T We can write UD1 UM MD1 Px Py Pz d 0 0 Px d Py Pz 422 Similarly UB1 UA1 A1B1 a 0 0 l cosθ1 0 l sinθ1 a lC1 0 lS1 423 Substituting Eqs 422 and 423 into Eq 420 we get B1D1 Px dalC1 i Py j Pz lS1 k where C1 is cos θ1 and S1 is sin θ1 Simplifying this equation by denoting Q1 Px da the length of B1D1 is B1D1 2 h2 Q1lC1 2 Py 2 Pz lS1 2 Q2 1 l2 C1 22Q1lC1 P2 y P2 z l2 S1 22PzlS1 Q2 1 P2 y P2 z l22Q1lC12PzlS1 424 Rearranging Eq 424 and denoting G1 h2 Q2 1 P2 y P2 z l2 2l we get Pz sinθ1 Q1 cosθ1 G1 425 Eq 425 can now be used to calculate θ1 Please refer to Appendix A for a variety of methods to solve this equation It should be mentioned that all methods render multiple solutions and since we do not independ ently have values for the sine and cosine of the angle we cannot easily determine in which quadrant the cor rect answer falls The fact that most industrial actuators have a limited range of motion will limit the number of acceptable answers In addition if we start from the reset position where all actuating angles are zero and continue monitoring the angles as the robot moves we should be able to determine in which quadrant the correct answers fall Loop 2 The analysis of loop 2 is very similar to loop 1 except that the vectors in this loop are all rotated 120 about the zaxis and we must take this into account Note that the desired position vector UM P PxPyPz T is the same as in loop 1 For each of the remaining vectors we premultiply the vector by a rotation matrix Rot z 120 We write MD2 Rot z 120 d 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 d 0 0 0 5d 0 866d 0 Introduction to Robotics 156 UA2 Rot z 120 a 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 a 0 0 0 5a 0 866a 0 A2B2 Rot z 120 lC2 0 lS2 0 5 0 866 0 0 866 0 5 0 0 0 1 lC2 0 lS2 0 5lC2 0 866lC2 lS2 Following the same process as in loop 1 and substituting these vectors into Eqs 420 and 421 we can write B2D2 Px0 5d 0 5a 0 5lC2 i Py0 866d 0 866a 0 866lC2 j Pz lS2 k 426 We simplify Eq 426 by denoting Q21 Px0 5d 0 5a Q22 Py0 866d 0 866a to get B2D2 Q21 0 5lC2 i Q22 0 866lC2 j Pz lS2 k The length of the second outer arm h is found from this equation as B2D2 2 h2 Q21 0 5lC2 2 Q22 0 866lC2 2 Pz lS2 2 Q2 21 0 25l2 C2 2 Q21lC2 Q2 22 0 75l2 C2 2 1 732Q22lC2 P2 z l2 S2 22PzlS2 Q2 21 Q2 22 P2 z l2 Q21lC2 1 732Q22lC22PzlS2 427 Rearranging Eq 427 and denoting G21 h2 Q2 21 Q2 22 P2 z l2 l G22 Q21 1 732Q22 G23 2Pz we get G23 sinθ2 G22 cosθ2 G21 428 Please refer to Appendix A for a variety of methods to solve this equation Notice that all parameters except θ2 are known Loop 3 The loop 3 analysis is similar to that for loop 2 except that the loop rotation matrix is Rotz 120 Note that the desired position vector UM P PxPyPz T remains the same We get MD3 Rot z120 d 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 d 0 0 0 5d 0 866d 0 Kinematics Analysis of Parallel Robots 157 UA3 Rot z120 a 0 0 0 5 0 866 0 0 866 0 5 0 0 0 1 a 0 0 0 5a 0 866a 0 A3B3 Rot z120 lC3 0 lS3 0 5 0 866 0 0 866 0 5 0 0 0 1 lC3 0 lS3 0 5lC3 0 866lC3 lS3 Following the same process as in loops 1 and 2 and substituting these vectors into Eqs 420 and 421 we can write B3D3 Px0 5d 0 5a 0 5lC3 i Py 0 866d0 866a0 866lC3 j Pz lS3 k 429 We can simplify Eq 429 by denoting Q31 Px0 5d 0 5a Q32 Py 0 866d0 866a to get B3D3 Q31 0 5lC3 i Q320 866lC3 j Pz lS3 k The length of the third outer arm h can be found from this equation as B3D3 2 h2 Q31 0 5lC3 2 Q320 866lC3 2 Pz lS3 2 Q2 31 0 25l2 C3 2 Q31lC3 Q2 32 0 75l2 C3 2 1 732Q32lC3 P2 z l2 S3 22PzlS3 Q2 31 Q2 32 P2 z l2 Q31lC31 732Q32lC32PzlS3 430 Rearranging Eq 430 and denoting G31 h2 Q2 31 Q2 32 P2 z l2 l G32 Q311 732Q32 G33 2Pz we get G33 sinθ3 G32 cosθ3 G31 431 Please refer to Appendix A for a variety of methods to solve this equation Notice that all parameters except θ3 are known Although the analyses of the three loops are similar but different a simple program can calculate the actuat ing arm angles of the three loops For each new location as the robot moves continuously from the previous point to the new desired location it is possible to compare the two calculated θ values with the previous values and decide what quadrant makes sense Introduction to Robotics 158 There are other possible ways to analyze these robots The present analysis is simple and easy to implement Example 45 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at P 0012 T in Calculate the necessary angles of the actuating arms Solution A quick look at the values shows that we should expect to get the three angles at 0 indicating this is the reset position Substituting these values into equations for Q and G for each loop we find Loop 1 Loop 2 Loop 3 Q1 5 Q21 25 Q31 25 Q22 433 Q32 433 G1 5 G21 10 G31 10 G22 10 G32 10 G23 24 G33 24 Loop 1 12 sinθ15 cosθ1 5 θ1 0 134 76 Loop 2 24 sinθ2 10 cosθ2 10 θ2 0 134 76 Loop 3 24 sinθ3 10 cosθ3 10 θ3 0 134 76 Figure 421 shows the results In reality the second answer may not be valid because the actuators range of motion may not allow this value although both sets of results work However if we assume that the robot is at its reset position when all actuating angles are zero as the robot moves to other locations we can continue to monitor the results to make sure the values of actuating angles are chan ging continuously not jumping around a7 l4 h15 d2 Pz12 a7 l4 h15 Pz12 d2 13476 Figure 421 The resulting actuating angles for θ1 for Example 45 Kinematics Analysis of Parallel Robots 159 Example 46 For the same robot as in Example 45 find the actuating angles for P 1 52 59812 T in Solution Note that the given values of Px and Py indicate a position along the direction of loop 3 see Figure 420 So we should expect to have similar actuation angles for loops 1 and 2 as shown in Figure 422 Sub stituting the given values into the equations for Q and G results in the following Loop 1 Loop 2 Loop 3 Q1 65 Q21 1 Q31 1 Q22 6928 Q32 1732 G1 2 G21 4 G31 1525 G22 13 G32 4 G23 24 G33 24 Loop 1 12 sinθ16 5 cosθ1 2 θ1 20 16 143 13 Loop 2 24 sinθ2 13 cosθ2 4 θ2 20 16 143 13 Loop 3 24 sinθ3 4 cosθ3 15 25 θ3 29 35 131 73 Note how the first two equations are the same As mentioned before the robots actuators may not allow the second answers 454 Kinematic Analysis of a 4Axis RSSType Parallel Robot For a 4DOF industrialtype parallel robot we apply the same approach as in Section 453 These robots are 4RSS type with a fixed platform a moving platform four actuating arms with a revolute joint and four sets of double outer arms with spherical joints at the two ends In this case the moving platform a7 l4 h15 d2 Pz12 a7 l4 h15 Pz12 d2 Px3 Px3 Figure 422 The resulting actuating angles for θ3 for Example 46 Introduction to Robotics 160 stays parallel to the fixed platform but it can rotate about the zaxis Therefore the user specifies the values of Px Py Pz as well as a rotation of α about the zaxis Figure 423 shows a typical industrial robot and a schematic representation of it These robots are mostly used for pickandplace and assembly operations and are usually mounted as shown We assign a Universe reference frame attached to the fixed platform as shown Note that the xaxis is pointed toward the first actuating joint A1 The zaxis is pointed downward to facilitate the specification of height Obviously other arrangements can also work In this arrangement we measure the height downward relative to the fixed platform Similarly a moving reference frame Mnoa is attached to the moving platform with similar directions except that this frame translates and rotates with the moving platform Angles θi rep resent the actuation angles and are the only variables that we need to calculate to run the robot We assume that θ 0 when the arm is horizontal Notice the direction of rotation We assume symmetry there fore lengths a distance of each actuating joint from the origin of the Universe frame d the same on the moving platform l length of each actuating arm and h length of each outer arm are the same although their coordinates differ For each of the four loops we can write UM MDi UAi AiBi BiDi for i 1234 432 As before the angle between each actuating arm and outer arm varies as the robot moves but we do not need to calculate the angle and do not want to involve it in our calculations only θi is needed for each arm Similar to the 3DOF case we express vectors BiDi using the coordinates of their two end points by BiDi DixBix i DiyBiy j Diz Biz k 433 Rearranging Eq 432 we get BiDi UM MDi UAi AiBi for i 1234 434 We now analyze each loop to derive the equations needed to calculate all four actuating angles x y z θ4 θ1 α U M n o a A1 A2 A3 B1 B4 D1 D4 d a l h P A4 Figure 423 A 4DOF RSStype parallel robot and its schematic Source Robot image provided by Omron Automation 2018 Omron All Rights Reserved Kinematics Analysis of Parallel Robots 161 Loop 1 The desired position of the moving platform is UM P PxPyPz T The position of point D is a function of the position of the moving frame as well as the rotation of the moving platform Therefore MD1 Rot aα d 0 0 Cα Sα 0 Sα Cα 0 0 0 1 d 0 0 dCα dSα 0 UD1 UM MD1 Px Py Pz dCα dSα 0 Px dCα Py dSα Pz 435 Similarly UB1 UA1 A1B1 a 0 0 l cosθ1 0 l sinθ1 a lC1 0 lS1 436 Substituting Eqs 435 and 436 into Eq 433 we get B1D1 Px dCαalC1 i Py dSα j Pz lS1 k where C1 is cos θ1 S1 is sin θ1 Sα is sin α and Cα is cos α Simplifying this equation by denoting Q11 Px dCαa and Q12 Py dSα the length of B1D1 is found from B1D1 2 h2 Q11lC1 2 Q12 2 Pz lS1 2 Q2 11 l2 C1 22Q11lC1 Q12 2 P2 z l2 S1 22PzlS1 Q2 11 Q2 12 P2 z l22Q11lC12PzlS1 437 Rearranging Eq 437 and denoting G11 Q2 11 Q2 12 P2 z l2h2 2l we get Pz sinθ1 Q11 cosθ1 G11 438 Equation 438 can now be used to calculate θ1 Please refer to Appendix A for a variety of methods to solve this equation As before we need to determine which of the two solutions for each angle should be used The fact that most industrial actuators have a limited range of motion will limit the acceptable answers In addition if we start from the reset position where all actuating angles are zero and continue monitoring the angles as the robot moves we should be able to determine in which quadrant the correct answer falls It is important to mention here that unlike in serial robots individual joints of parallel robots may not be moved without moving the rest In a serial robot we may choose to move only one or many joints simul taneously However in a parallel robot all joints move together simultaneously Therefore all loops must be solved and all unknown joint parameters calculated simultaneously to move the robot Introduction to Robotics 162 Loop 2 Similar to the analysis for loop 1 we write the loop equation as follows MD2 Rot aα 0 d 0 Cα Sα 0 Sα Cα 0 0 0 1 0 d 0 dSα dCα 0 UD2 UM MD2 Px Py Pz dSα dCα 0 Px dSα PydCα Pz 439 Similarly UB2 UA2 A2B2 0 a 0 0 l cosθ2 l sinθ2 0 alC2 lS2 440 Substituting Eqs 439 and 440 into Eq 433 we get B2D2 Px dSα i PydCα a lC2 j Pz lS2 k where C2 is cos θ2 S2 is sin θ2 Sα is sin α and Cα is cos α Simplifying this equation by denoting Q21 Px dSα and Q22 PydCα a the length of B2D2 is found from B2D2 2 h2 Q21 2 Q22 lC2 2 Pz lS2 2 Q2 21 Q22 2 l2 C2 2 2Q22lC2 P2 z l2 S2 22PzlS2 Q2 21 Q2 22 P2 z l2 2Q22lC22PzlS2 441 Rearranging Eq 441 and denoting G21 Q2 21 Q2 22 P2 z l2h2 2l we get Pz sinθ2Q22 cosθ2 G21 442 Equation 442 can now be used to calculate θ2 Please refer to Appendix A for a variety of methods to solve this equation Loop 3 The analysis of loop 3 is similar to that of loops 1 and 2 as follows MD3 Rot aα d 0 0 Cα Sα 0 Sα Cα 0 0 0 1 d 0 0 dCα dSα 0 Kinematics Analysis of Parallel Robots 163 UD3 UM MD3 Px Py Pz dCα dSα 0 PxdCα PydSα Pz 443 Similarly UB3 UA3 A3B3 a 0 0 l cosθ3 0 l sinθ3 alC3 0 lS3 444 Substituting Eqs 443 and 444 into Eq 433 we get B3D3 PxdCα a lC3 i PydSα j Pz lS3 k Simplifying this equation by denoting Q31 PxdCα a and Q32 PydSα the length of B3D3 is B3D3 2 h2 Q31 lC3 2 Q32 2 Pz lS3 2 Q2 31 l2 C3 2 2Q31lC3 Q32 2 P2 z l2 S3 22PzlS3 Q2 31 Q2 32 P2 z l2 2Q31lC32PzlS3 445 Rearranging Eq 445 and denoting G31 Q2 31 Q2 32 P2 z l2h2 2l we get Pz sinθ3Q31 cosθ3 G31 446 Equation 446 can now be used to calculate θ3 Loop 4 The analysis of loop 4 is as follows MD4 Rot aα 0 d 0 Cα Sα 0 Sα Cα 0 0 0 1 0 d 0 dSα dCα 0 UD4 UM MD4 Px Py Pz dSα dCα 0 PxdSα Py dCα Pz 447 Similarly UB4 UA4 A4B4 0 a 0 0 l cosθ4 l sinθ4 0 a lC4 lS4 448 Introduction to Robotics 164 Substituting Eqs 447 and 448 into Eq 433 we get B4D4 PxdSα i Py dCαalC4 j Pz lS4 k Simplifying this equation by denoting Q41 PxdSα and Q42 Py dCαa the length of B4D4 is B4D4 2 h2 Q41 2 Q42lC4 2 Pz lS4 2 Q2 41 Q42 2 l2 C4 22Q42lC4 P2 z l2 S4 22PzlS4 Q2 41 Q2 42 P2 z l22Q42lC42PzlS4 449 Rearranging Eq 449 and denoting G41 Q2 41 Q2 42 P2 z l2h2 2l we get Pz sinθ4 Q42 cosθ4 G41 450 Equation 450 can now be used to calculate θ4 Example 47 A 4DOF industrial parallel robot with a 6 in l 3 in d 4 in and h 13 in is to be at P 0012 in and α 0 Calculate the necessary angles of the actuating arms Solution A quick look at the values shows that we should expect to get all four angles at 0 indicating this is the reset position as shown in Figure 424 Substituting these values into equations for Q and G for each loop we find a6 l3 h13 d4 Pz12 0 a6 h13 d4 Pz12 161 l3 Figure 424 The resulting actuating angles for θ1 for Example 47 Kinematics Analysis of Parallel Robots 165 Loop 1 Loop 2 Loop 3 Loop 4 Q11 2 Q21 0 Q31 2 Q41 0 Q12 0 Q22 2 Q32 0 Q42 2 G11 2 G21 2 G31 2 G41 2 Loop 1 12 sinθ12 cosθ1 2 θ1 0 161 Loop 2 12 sinθ22 cosθ2 2 θ2 0 161 Loop 3 12 sinθ32 cosθ3 2 θ3 0 161 Loop 4 12 sinθ42 cosθ4 2 θ4 0 161 Example 48 Repeat Example 47 but let Pz 10 in and the platform rotate to α 10 and α 10 Solution We find the following result for α 10 Loop 1 Loop 2 Loop 3 Loop 4 Q11 206 Q21 069 Q31 206 Q41 069 Q12 069 Q22 206 Q32 069 Q42 206 G11 921 G21 921 G31 921 G41 921 All four loop equations will be the same 10 sinθi2 06 cosθi 9 21 θi 52 8 103 9 which is expected all four actuators should move the same angle to simply rotate the moving platform without translating it We also find the following for α 10 Loop 1 Loop 2 Loop 3 Loop 4 Q11 206 Q21 069 Q31 206 Q41 069 Q12 069 Q22 206 Q32 069 Q42 206 G11 921 G21 921 G31 921 G41 921 All four loop equations will be the same 10 sinθi2 06 cosθi 9 21 θi 52 8 103 9 As you see the results are the same This is because if all four actuators move the same amount from the same position it is not possible to determine in which direction the moving platform may turn Introduction to Robotics 166 Example 49 For the robot from Example 47 let the moving platform be at P 3010 in and α 0 Calculate the necessary angles of the actuating arms Solution Substituting these values into equations for Q and G for each loop we find the following Loop 1 Loop 2 Loop 3 Loop 4 Q11 1 Q21 3 Q31 5 Q41 3 Q12 3 Q22 5 Q32 3 Q42 1 G11 833 G21 433 G31 433 G41 833 Loop 1 10 sinθ1cosθ1 8 33 θ1 61 7 130 Loop 2 10 sinθ25 cosθ2 4 33 θ2 3 76 131 Loop 3 10 sinθ35 cosθ3 4 33 θ3 3 76 131 Loop 4 10 sinθ4cosθ4 8 33 θ4 61 7 130 which is also expected due to symmetry 455 Kinematic Analysis of a 3Axis PSSType Parallel Robot The 3DOF robot in Figure 425 consists of three prismatic actuators plus outer arms connected to the actua tors and the moving platform via spherical joints This machine can be used the same as other 3DOF robots as well as for rapid prototyping Since prismatic actuators are generally much slower than rotary actuators they are more appropriate for slower tasks such as rapid prototyping Note that with the chosen coordinate system the height is measured downward from the fixed base To measure from a tabletop subtract the height from the distance between the fixed platform and the tabletop x y z U M n o a A1 A2 A3 B1 B3 D1 D3 D2 d a l h P Figure 425 A 3DOF PSStype parallel robot Kinematics Analysis of Parallel Robots 167 The solution for this robot is very similar to the solutions of RSStype robots except that since the actuators are prismatic the solution is in fact even simpler For each of the loops we can write UM MDi UAi AiBi BiDi for i 123 451 We express vectors BiDi using the coordinates of their two end points by BiDi DixBix i DiyBiy j Diz Biz k 452 Rearranging Eq 451 we get BiDi UM MDi UAi AiBi for i 123 453 We now analyze loop 1 to derive the equations needed to calculate the length of the prismatic actuator Remember that we assume at reset the length of the actuator is known we adjust the length based on the reset value Loop 1 The desired position of the moving platform is UM P PxPyPz T and MD1 d00 T We can write UD1 UM MD1 Px Py Pz d 0 0 Px d Py Pz 454 Similarly UB1 UA1 A1B1 a 0 0 0 0 l1 a 0 l1 455 Substituting Eqs 454 and 455 into Eq 453 we get B1D1 Px da i Py j Pz l1 k Simplifying this equation by denoting Q1 Px da the length of B1D1 is B1D1 2 h2 Q1 2 Py 2 Pz l1 2 Q2 1 P2 y P2 z l1 22Pzl1 456 The length of the prismatic actuator is l1 22Pzl1 Q2 1 P2 y P2 z h2 0 457 All values except l1 are known The simple quadratic equation can be solved to calculate the length of the prismatic joint Loops 2 and 3 The analyses of loops 2 and 3 are very similar to that of loop 1 except that appropriate coordinates of points Ai and Di should be incorporated This analysis is left for the reader to complete Introduction to Robotics 168 Example 410 For a 3DOF PSStype parallel robot with a 8 in d 3 in and h 14 in find the following a The minimum Pz that can be specified for the robot b The length of the first prismatic joint for P 0018 in c The length of the first prismatic joint for P 2018 in Solution Substituting the given values into Eq 457 we get a Pz min 13 in b l1 236l 153 0 l1 4 92 and 31 07 The second result indicates the length of the prismatic joint needed if it were to move down until point B was below D Obviously this is beyond the design capability of the robot and not practical c l1 236l1 137 0 l1 4 325 and 31 675 in 46 Other Parallel Robot Configurations Other configurations are also possible for parallel robots For example Figure 426a shows a 4DOF parallel robot with two arms that move in a plane similar to a SCARA robot The advantages of the robot are its high speed and low inertia Figure 426b shows a PSStype robot with beltdriven inclined linear actuators These alternatives show that it is possible to design new configurations with specific characteristics that give the robot its unique value You may want to perform a similar analysis to derive the equations of motion for these configurations as well 47 Design Projects In addition to or as an alternative to the serial robot design projects mentioned in Chapter 2 you may choose to design a parallel robot There are many different possibilities but a 66 Stewarttype parallel robot may be a very good choice because it is so easy to make You can construct this robot with 6 linear actuators a b Figure 426 Alternative designs for parallel robots a Yaskawa specialty directdrive highspeed picking robot b Macron Dynamics TriBot beltdriven robot Source Reproduced with the permission of Yaskawa Electric and from Macron Dynamics Inc Kinematics Analysis of Parallel Robots 169 12 spherical joints and 2 plates The linear actuators and the spherical joints can be readily found on the internet Plates can be constructed out of wood or metal panels Magnetic spherical joints are simple and inexpensive and can be glued or attached to the end of linear actuators and the edges of the platforms As we continue you may apply what we learn to these robots as well 48 Summary In this chapter we analyzed a number of different parallel robots There are many other possibilities For other types of parallel robots a similar approach may be taken to derive the kinematic equations of motion The techniques used in this chapter were selected to represent different ways the solution may be developed Fortunately in the case of parallel robots the inverse kinematic equations are straightforward In Chapter 5 we will study differential motions of robots which leads us to velocity analysis and control References 1 Tsai LungWen Robot Analysis John Wiley and Sons 1999 2 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots Volume I Nominal Functioning and Geometric Accuracy ASME Press 2018 3 Lynch KM FC Park Modern Robotics Mechanics Planning and Control Cambridge University Press 2017 4 Simaan Nabil Analysis and Synthesis of Parallel Robots for Medical Applications research thesis The Technion Israel Institute of Technology 1999 5 Tsai LW F Tahmasebi Synthesis and Analysis of a New Class of SixDegreesofFreedom Parallel Manipulators Journal of Robotic Systems vol 10 no 5 pp 561580 1993 6 BenHorin R M Shoham Construction of a SixDegreesofFreedom Parallel Manipulator with Three Planarly Actuated Links Proceedings of the 1996 ASME Design Engineering Technical Conference and Computers in Engineering Conference August 1996 Problems 41 Figure P41 shows a planar robot with its associated dimensions and reference frame Calculate the length of each prismatic actuator for Px Py θ x y 4 12 30 P 15 2 at 71 68 Figure P41 Introduction to Robotics 170 42 Repeat Problem 41 for Px 7 Py 10 θ 45 43 Referring to Figure 414 from Example 42 the fixed platform is a triangle of 10 in in length the mov ing platform is 3 in long and the linkage arms are all 4 in long We want to position and orient the platform at Px 5 Py 2 887 θ 30 Calculate the angle of each active arm Graphically verify that your solution is correct 44 Refer to Figure 414 from Example 42 except that the reference frame is located at the geometric center of the fixed platform The fixed platform is a triangle of 10 in in length the moving platform is 3 in long and the linkage arms are all 5 in long We want to position and orient the platform at Px 2 Py 1 θ 0 Calculate the angle of each active arm Graphically verify that your solution is correct 45 Refer to Figure 414 from Example 42 except that the reference frame is located at the geometric center of the fixed platform The fixed platform is a triangle of 10 in in length Assume the moving platform is a point where all three linkages are connected coincidentally The linkage arms are all 5 in long We want to position and orient the platform at Px 3 Py 2 θ 0 Calculate the angle of each active arm Graphically verify that your solution is correct 46 A 66 StewartGoughtype platform has the following characteristics a 3 in b 3 in Calculate the length of each prismatic actuator for placing the center of the moving platform at a θ 0 ϕ 0 ψ 0 and Px 3Py 0Pz 10 in b θ 0 ϕ 0 ψ 0 and Px 3Py 5Pz 10 in 47 A 66 StewartGoughtype platform has the following characteristics a 12 in b 5 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 90 ϕ 0 ψ 0 and Px 2Py 0Pz 10 in 48 A 66 StewartGoughtype platform has the following characteristics a 15 in b 6 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 90 and Px 3Py 2Pz 12 in 49 Explain how you would solve for the inverse kinematic equation of a 66 type StewartGough platform if the joints were not separated at equal angles or the distances between the center of each platform and the joints were not the same 410 A 63 StewartGoughtype platform has the following characteristics a 3 in b 3 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 0 and Px 0Py 0Pz 10 in Verify your answer graphically 411 A small 63 StewartGoughtype positioning device has the following characteristics a 1 in b 1 in Calculate the length of each prismatic actuator for placing the center of the moving platform at θ 90 ϕ 0 ψ 0 and Px 0Py 0Pz 3 in 412 A 63 StewartGoughtype positioning device has the following dimensions a 4 in b 4 in Calcu late the length of each prismatic actuator for placing the center of the moving platform at θ 0 ϕ 0 ψ 90 and Px 0Py 0Pz 6 in 413 For the positioning system of Problem 414 calculate the length of each prismatic actuator for placing the center of the moving platform at θ 45 ϕ 0 ψ 45 and Px 2Py 1Pz 6 in Kinematics Analysis of Parallel Robots 171 414 Explain how you would solve for the inverse kinematic equation of a 63 type StewartGough platform if the joints were not separated at equal angles or the distances between the center of each platform and the joints were not the same 415 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 0 Py 0 and Pz 18142 in Calculate the necessary angles of the actuating arms Verify your solution graphically 416 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 0 Py 0 and Pz 10142 in Calculate the necessary angles of the actuating arms 417 A 3DOF industrial parallel robot with a 7 in l 4 in d 2 in and h 15 in is to be at Px 3 Py 0 and Pz 12 in Calculate the necessary angles of the actuating arms 418 A 3DOF industrial parallel robot with a 10 in l 6 in d 2 in and h 20 in is to be at Px 2 Py 3 and Pz 19 in Calculate the necessary angles of the actuating arms 419 A 3DOF industrial parallel robot with a 10 in l 6 in d 2 in and h 20 in is to be at Px 3 Py 3 and Pz 20 in Calculate the necessary angles of the actuating arms 420 Explain how you would solve for the inverse kinematic equation of a 3DOF parallel robot if the joints were not separated at equal angles the distances between the center of each platform and the joints were not the same or the outer arms were not the same length 421 A 4DOF industrial parallel robot with a 6 in l 3 in d 4 in and h 13 in is to be at Px 3 Py 2 Pz 11 in and α 0 Calculate the necessary angles of the actuating arms 422 A 4DOF industrial parallel robot with a 7 in l 4 in d 4 in and h 13 in is to be at Px 15 Py 25 Pz 11 in and α 15 Calculate the necessary angles of the actuating arms 423 A 4DOF industrial parallel robot with a 8 in l 4 in d 3 in and h 14 in is to be at Px 4 Py 2 Pz 11 in and α 20 Calculate the necessary angles of the actuating arms 424 A 4DOF industrial parallel robot with a 7 in l 4 in d 3 in and h 15 in is to be at Px 4 Py 4 Pz 13 in and α 0 Calculate the necessary angles of the actuating arms 425 A small 4DOF industrial parallel robot with a 3 in l 1 in d 1 in and h 5 in is to be at Px 05 Py 07 Pz 4 in and α 12 Calculate the necessary angles of the actuating arms 426 Explain how you would solve for the inverse kinematic equation of a 4DOF parallel robot if the joints were not separated at equal angles the distances between the center of each platform and the joints were not the same or the outer arms were not the same length 427 For a 3DOF PSStype parallel robot with a 7 in d 2 in and h 12 in find the following a The length of the first prismatic joint for P 0015 in b The length of the first prismatic joint for P 3015 in 428 Derive the inverse kinematic equation for loop 2 of the PSStype parallel robot 429 Derive the inverse kinematic equation for loop 3 of the PSStype parallel robot Introduction to Robotics 172 5 Differential Motions and Velocities 51 Introduction Differential motions are small movements denoted by an expression such as Δs or ds When divided by a differential time Δt or dt we find the average velocity vave ΔsΔt or instantaneous velocity v dsdt By studying differential motions we are practically studying velocity relationships In this chapter we learn about differential motions of frames relative to a fixed frame differential motions of robot joints relative to a fixed frame Jacobians and robot velocity relationships We study differential motions based on the DenavitHartenberg DH representation as well as screwbased mechanics We start with serial robots based on the DH representation and then based on screw mechanics This chapter contains a fair number of velocity relationships that you may have seen in a dynamics course If you do not remember the material well a review of it can be helpful 52 Differential Relationships First lets see what the differential relationships are To do this we will consider a simple 2DOF mechanism as shown in Figure 51 where each link can rotate independently The rotation of the first link θ1 is meas ured relative to the reference frame whereas the rotation of the second link θ2 is measured relative to the first link as we might see in a DH representation where the movements of each link of a robot are measured relative to a current frame attached to the previous link a VA VBA VB x y b x y l1 l2 o A θ2 θ1 B Figure 51 a 2DOF planar mechanism b velocity diagram 173 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed The velocity of point B can be calculated as follows vB vA vBA l1θ1 tol1 l2 θ1 θ2 tol2 l1θ1 sinθ1i l1θ1 cosθ1jl2 θ1 θ2 sin θ1 θ2 i l2 θ1 θ2 cos θ1 θ2 j 51 Writing Eq 51 in matrix form yields the following vBx vBy l1 sinθ1l2 sin θ1 θ2 l2 sin θ1 θ2 l1 cosθ1 l2 cos θ1 θ2 l2 cos θ1 θ2 θ1 θ2 52 The lefthand side of Eq 52 represents the x and y components of the velocity of point B If the elements of the righthand side of the equation are multiplied by the corresponding angular velocities of the two links the velocity of point B can be found Next instead of deriving the components of the velocity directly from the velocity relationship we try to find the same by differentiating the equations that describe the position of point B as follows xB l1 cosθ1 l2 cos θ1 θ2 yB l1 sinθ1 l2 sin θ1 θ2 53 Differentiating Eq 53 with respect to the two variables θ1 and θ2 yields dxB l1 sinθ1dθ1l2 sin θ1 θ2 dθ1 dθ2 dyB l1 cosθ1dθ1 l2 cos θ1 θ2 dθ1 dθ2 54 and in matrix form dxB dyB l1 sinθ1l2 sin θ1 θ2 l2 sin θ1 θ2 l1 cosθ1 l2 cos θ1 θ2 l2 cos θ1 θ2 dθ1 dθ2 Differential Jacobian Differential motion of B motion of joints 55 Notice the similarities between Eqs 52 and 55 Although the two equations are similar in content and form the difference is that Eq 52 is the velocity relationship whereas Eq 55 is the differential motion relationship If both sides of Eq 55 are divided by dt since dxBdt isvBx and dθ1dt isθ1 etc they represent the same relationship Similarly in a robot with many degrees of freedom the joint differential motions or velocities can be related to the differential motion or velocity of the hand using the same technique 53 The Jacobian The Jacobian is a representation of the geometry of the elements of a mechanism in time In a robot it allows the conversion of differential motions or velocities of individual joints to differential motions or velo cities of points of interest eg the end effector It also relates the individual joint motions to overall mech anism motions The Jacobian is timerelated since the values of joint angles vary in time the magnitude of the elements of the Jacobian vary in time as well As shown in Figure 52 for a simple 2DOF mechanism if joint1 of the robot moves an angle of θ depend ing on the starting location and configuration of the mechanism the magnitude and direction of the resulting motion of point B at its end will be very different This dependence on the geometry of the mechanism is expressed by the Jacobian Therefore the Jacobian is a representation of the geometry and the interrelation ship between different parts of the mechanism and where they are at any given time Clearly as time goes on and the relative positions of the different parts of the mechanism change the Jacobian will also change Introduction to Robotics 174 As noted in Section 52 the Jacobian was formed from the position equations which were differentiated with respect to θ1 and θ2 Therefore the Jacobian can be calculated by taking the derivatives of each position equation with respect to all variables Suppose we have a set of equations yi in terms of a set of variables xj as yi fi x1x2x3xj 56 The differential change in yi as a result of a differential change in xj will be δy1 f1 x1 δx1 f1 x2 δx2 f1 xj δxj δy2 f2 x1 δx1 f2 x2 δx2 f2 xj δxj δyi fi x1 δx1 fi x2 δx2 fi xj δxj 57 Equation 57 can be written in matrix form representing the differential relationship between individual variables and the functions The matrix encompassing this relationship is the Jacobian as shown in Eq 58 Therefore the Jacobian can be calculated by taking the derivative of each equation with respect to all vari ables We apply the same principle for the calculation of the Jacobian of a robot δy1 δy2 δyi f1 x1 f1 x2 f1 xj f2 x1 fi x1 fi xj δx1 δx2 δxj or δyi fi xj δxj 58 o A B A B o A B θ1 θ1 θ1 o Resulting motion Resulting motion Resulting motion Figure 52 Resulting motions of the robot are dependent on the geometry of the robot Differential Motions and Velocities 175 Differentiating the position equations of a robot relates its joint differential motions to the differential motion of the hand frame dx dy dz δx δy δz Robot Jacobian dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 or D J Dθ 59 where dx dy dz in D represent the differential motions of the hand along the x y and zaxes δx δy δz in D represent the differential rotations of the hand around the x y and zaxes and Dθ represents the dif ferential motions of the joints As mentioned earlier if these two matrices are divided by dt they represent velocities instead of differential motions In this chapter we work with the differential motions rather than velocities knowing that in all relationships by simply dividing the differential motions by dt we get the velocities Example 51 The Jacobian of a robot at a particular time is given Calculate the linear and angular differential motions of the robots hand frame for the given joint differential motions J 20 0 0 0 0 0 7 0 1 0 0 0 0 15 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Dθ 0 0 1 0 0 1 0 05 0 03 Solution Substituting these matrices into Eq 59 we get D J Dθ 20 0 0 0 0 0 7 0 1 0 0 0 0 15 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 1 0 05 0 03 0 0 1 5 0 15 0 1 0 03 dx dy dz δx δy δz 54 Differential versus LargeScale Motions In our discussion of transformations so far we only considered rotations and translations that occurred indi vidually in a sequence not simultaneously For example we would consider a rotation of θ about an axis then a translation along an axis etc But what if transformations happen continually and simultaneously To understand the difference between the two lets consider the following scenario As shown in Figure 53a imagine that a mobile robot starts at the origin moves a distance of l along a straight line then rotates θ and ends up at point A Now imagine that the robot first rotates θ and then moves in a straight line as shown in Figure 53b ending up at point B Obviously although the final orientations are the same the robot follows a different path and ends up in a different location In both cases the Introduction to Robotics 176 transformations are sequential Now imagine that the robot rotates and translates the same amounts as before simultaneously as shown in Figure 53c Depending on the timing of both motions and depending on how fast each motion is the robot follows a different path and ends up in a different place The difference relates to the small motions that the robot makes relative to time and therefore is the basis for differential motion analysis The path and the final state of the robot are functions of differential motions or velocities and their sequence with respect to time The same analysis applies to manipulator robots depending on whether motions occur sequentially or simultaneously To plan and control the motions of the robot we need to involve its differential motions 55 Differential Motions of a Frame versus a Robot Suppose that a frame moves a differential amount relative to the reference frame We can either look at the differential motions of the frame without regard to what causes the motions or we can include the mech anism that causes the motion In the first case we will study the motions of the frame and the changes in the representation of the frame Figure 54a In the second case we analyze the differential motions of the mech anism that causes the motions and how it relates to the motions of the frame Figure 54b As you can see in Figure 54c the differential motions of the hand frame of the robot are caused by the differential motions in each of the joints of the robot As the joints of the robot move a differential amount the hand moves a dif ferential amount consequently moving the frame attached to it a differential amount In this way we relate the motions of the robot to the motions of the frame In reality this means the following suppose you have a robot welding two pieces together For best results the robot should move at a constant speed This means the differential motions of the hand frame must be defined to represent a constant speed in a particular direction This relates to the differential motion of a frame on the piece However the motion is caused by the robot it could actually be caused by something else we are using a robot so we must relate it to the robots motions Therefore we have to calculate the speeds of each and every joint at any instant such that the total motion caused by the robot will be equal to a b c l l A θ B θ θ l C Figure 53 Differential motions versus nondifferential motions y x z Robot y x z n o a n o a n o a n o a y x z Joint differential motions Hand differential motions Figure 54 a Differential motions of a frame b differential motions of the robot joints and the endplate c differential motions of a frame caused by the differential motions of a robot Differential Motions and Velocities 177 the desired speed of the frame In this section we will first study the differential motions of a frame Then we will study the differential motions of a robot mechanism Finally we will relate the two together 56 Differential Motions of a Frame Differential motions of a frame can be divided into the following Differential translations Differential rotations Differential transformations combinations of translations and rotations 561 Differential Translations A differential translation is the translation of a frame at differential values Therefore it can be represented by Transdxdydz This means the frame has moved a differential amount along the x y and zaxes Example 52 A frame B has translated a differential amount of Trans002 004 003 units Find its new location and orientation B 0 819 0 0 574 3 0 1 0 7 0 574 0 0 819 8 0 0 0 1 Solution Since the differential motion is only a translation the orientation of the frame should not be affected The new location of the frame is B 1 0 0 0 02 0 1 0 0 04 0 0 1 0 03 0 0 0 1 0 819 0 0 574 3 0 1 0 7 0 574 0 0 819 8 0 0 0 1 0 819 0 0 574 3 02 0 1 0 7 04 0 574 0 0 819 8 03 0 0 0 1 562 Differential Rotations about Reference Axes A differential rotation is a small rotation of the frame It is generally represented by Rotq dθ which means the frame has rotated an angle dθ about an axis q Specifically differential rotations about the x y and zaxes are defined by δx δy δz Since the rotations are small amounts we can use the following approximations sinδx δx in radians cosδx 1 The rotation matrices representing differential rotations about the x y and zaxes are Rot xδx 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 Rot y δy 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 Rot z δz 1 δz 0 0 δz 1 0 0 0 0 1 0 0 0 0 1 510 Introduction to Robotics 178 Similarly we can also define differential rotations about the current axes as Rot nδn 1 0 0 0 0 1 δn 0 0 δn 1 0 0 0 0 1 Rot o δo 1 0 δo 0 0 1 0 0 δo 0 1 0 0 0 0 1 Rot a δa 1 δa 0 0 δa 1 0 0 0 0 1 0 0 0 0 1 511 Notice that these matrices defy the rule we had established previously about the magnitude of unit vec tors For example 12 δx 2 1 However as you may remember a differential value is assumed to be very small In mathematics higherorder differentials are considered negligible and are usually neglected If we do neglect the higherorder differentials such as δx2 the magnitudes of the vectors remain acceptable As we have already seen if the order of multiplication of matrices changes the result will change as well Therefore in matrix multiplication maintaining the order of matrices is very important If we multiply two differential motions in different orders we expectedly get two different results as shown here Rot xδx Rot yδy 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 0 δy 0 δxδy 1 δx 0 δy δx 1 0 0 0 0 1 Rot yδy Rot xδx 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 δxδy δy 0 0 1 δx 0 δy δx 1 0 0 0 0 1 However if as before we set higherorder differentials such as δxδy to zero the results are exactly the same Consequently for differential motions the order of multiplication is no longer important and Rot xδx Rot yδy Rot yδy Rot xδx The same is true for any combinations of rotations about any axes You may remember from your dynamics course that largeangle rotations about different axes are not commutative and therefore cannot be added in different orders For example as we have already seen if you rotate an object 90 about the xaxis followed by a 90 rotation about the zaxis the result will be different if you reverse the order However velocities are commutative and can be added as vectors therefore Ω ωxi ωyj ωzk regardless of the order This is true because as we saw if we neglect the higherorder differentials the order of multiplication is unimportant Since velocities are in fact differential motions divided by time the same is true for velocities 563 Differential Rotation about a General Axis q Based on what we learned since the order of multiplication for differential rotations is not important we can multiply differential rotations in any order As a result we can assume that a differential rotation about a general axis q is composed of three differential rotations about the three axes in any order or dθ q δx i δy j δz k Figure 55 Differential Motions and Velocities 179 Consequently a differential motion about any general axis q can be expressed as Rot qdθ Rot xδx Rot yδy Rot zδz 1 0 0 0 0 1 δx 0 0 δx 1 0 0 0 0 1 1 0 δy 0 0 1 0 0 δy 0 1 0 0 0 0 1 1 δz 0 0 δz 1 0 0 0 0 1 0 0 0 0 1 1 δz δy 0 δxδy δz δxδyδz 1 δx 0 δy δxδz δx δyδz 1 0 0 0 0 1 512 If we neglect all higherorder differentials we get Rot qdθ Rot xδx Rot yδy Rot zδz 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 513 Example 53 Find the total differential transformation caused by small rotations about the three axes of δx 0 03 δy 0 04 δz 0 05 radians Solution Substituting the given rotations in Eq 513 we get Rot qdθ 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 1 0 05 0 04 0 0 05 1 0 03 0 0 04 0 03 1 0 0 0 0 1 q x z y δz δy δx dθ Figure 55 Differential rotations about a general axis q Introduction to Robotics 180 Note that the lengths of the three directional unit vectors are 1002 1002 and 1001 respectively If we assume that 005 radians about 2 9 is small differential these values are acceptably close to 1 Oth erwise we should use smaller values for differential angles smaller intervals 564 Differential Transformations of a Frame The differential transformation of a frame is a combination of differential translations and rotations in any order If we denote the original frame as T and assume that dT is the change in the frame T as a result of a differential transformation then T dT Trans dxdydz Rot qdθ T or dT Trans dxdydz Rot qdθ I T 514 where I is a unit matrix Equation 514 can be written as dT Δ T where Δ Trans dxdydz Rot qdθ I 515 Δ or simply Δ is called the differential operator It is the product of differential translations and rotations minus a unit matrix Multiplying a frame by the differential operator Δ yields the change in the frame The differential operator is found by multiplying the matrices and subtracting the unit matrix as follows Δ Trans dxdydz Rot qdθ I 1 0 0 dx 0 1 0 dy 0 0 1 dz 0 0 0 1 1 δz δy 0 δz 1 δx 0 δy δx 1 0 0 0 0 1 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 516 As you see the differential operator is not a transformation matrix or a frame It does not follow the required format either it is only an operator and it yields the changes in a frame Example 54 Write the differential operator matrix for the following differential transformations dx 0 05 dy 0 03 dz 0 01 units and δx 0 02 δy 0 04 δz 0 06 radians Solution Substituting the given values into Eq 516 we get Δ 0 0 06 0 04 0 05 0 06 0 0 02 0 03 0 04 0 02 0 0 01 0 0 0 0 Differential Motions and Velocities 181 Example 55 Find the effect of a differential rotation of 001 radians about the yaxis followed by a differential translation of 003 0040 on the given frame B B 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 Solution As we saw before the change in the frame can be found by premultiplying the frame with the differ ential operator Substituting the given information and multiplying the matrices we will get dB Δ B 0 0 0 01 0 03 0 0 0 0 04 0 01 0 0 0 0 0 0 0 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 01 0 0 06 0 0 0 0 04 0 0 0 01 0 08 0 0 0 0 57 Interpretation of the Differential Change The matrix dT in Eqs 514 and 515 represents the changes in a frame as a result of differential motions The elements of this matrix are dT dnx dox dax dpx dny doy day dpy dnz doz daz dpz 0 0 0 0 517 The dB matrix in Example 55 represents the change in the frame B as shown in Eq 517 Therefore each element of the matrix represents the change in the corresponding element of the frame For example this means the frame moved a differential amount of 006 units along the xaxis 004 along the yaxis and a dif ferential amount of 008 along the zaxis It also rotated such that there was no change in its nvector there was a change of 001 in the ox component of the ovector and there was a change of 001 in the az com ponent of the avector The new location and orientation of the frame after the differential motions can be found by adding the change to the frame Tnew dT Told 518 Example 56 Find the location and the orientation of frame B from Example 55 after the move Solution The new location and orientation of the frame can be found by adding the changes to the original values The result is Bnew Boriginal dB 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 01 0 0 06 0 0 0 0 04 0 0 0 01 0 08 0 0 0 0 0 0 01 1 8 06 1 0 0 2 04 0 1 0 01 2 92 0 0 0 1 Introduction to Robotics 182 58 Differential Changes between Frames The differential operator Δ in Eq 515 represents a differential operator relative to the fixed reference frame and it is technically UΔ However it is possible to define another differential operator this time relative to the current frame itself TΔ that will enable us to calculate the same changes in the frame Since the differential operator relative to the frame is relative to a current frame to find the changes in the frame we must postmultiply the frame by TΔ as we did in Chapter 2 The result will be the same since both operations represent the same changes in the frame Then dT Δ T T TΔ T 1 Δ T T 1 T TΔ TΔ T 1 Δ T 519 Therefore Eq 519 can be used to calculate the differential operator relative to the frame TΔ We can multiply the matrices in Eq 519 and simplify the result as follows Assuming that the frame T is represented by an n o a p matrix we get T 1 nx ny nz p n ox oy oz p o ax ay az p a 0 0 0 1 and Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 T 1 Δ T TΔ 0 Tδz Tδy Tdx Tδz 0 Tδx Tdy Tδy Tδx 0 Tdz 0 0 0 0 520 As you see TΔ is made to look exactly like the Δ matrix but all elements are relative to the current frame where these elements are found from the previous multiplication of matrices and are summarized as follows Tδx δ n Tδy δ o Tδz δ a Tdx n δ p d Tdy o δ p d Tdz a δ p d 521 See Paul 1 for the derivation of the above equations Example 57 Find BΔ for Example 55 Solution We have the following vectors from the given information We substitute these values into Eq 521 to calculate vectors Bd and Bδ Differential Motions and Velocities 183 n 010 T o 001 T a 100 T p 823 T δ 00 010 T d 0 030 040 T δ p i j k 0 0 01 0 8 2 3 0 030 0 08 δ p d 0 030 0 08 0 03 0 04 0 0 060 04 0 08 Bdx n δ p d 0 0 06 1 0 04 0 0 08 0 04 Bdy o δ p d 0 0 06 0 0 04 1 0 08 0 08 Bdz a δ p d 1 0 06 0 0 04 0 0 08 0 06 Bδx δ n 0 0 0 01 1 0 0 0 01 Bδy δ o 0 0 0 01 0 0 1 0 Bδz δ a 0 1 0 01 0 0 0 0 Bd 0 04 0 080 06 and Bδ 0 0100 Substituting into Eq 520 yields BΔ 0 0 0 0 04 0 0 0 01 0 08 0 0 01 0 0 06 0 0 0 0 As you see these values for BΔ are not the same as Δ However postmultiplying the B matrix by BΔ will yield the same result dB as before Example 58 Calculate BΔ from Example 57 directly from the differential operator Solution Using Eq 519 we can calculate BΔ directly as BΔ B1 Δ B 0 1 0 2 0 0 1 3 1 0 0 8 0 0 0 1 0 0 0 01 0 03 0 0 0 0 04 0 01 0 0 0 0 0 0 0 0 0 1 8 1 0 0 2 0 1 0 3 0 0 0 1 0 0 0 0 04 0 0 0 01 0 08 0 0 01 0 0 06 0 0 0 0 which of course is the same result as in Example 57 Introduction to Robotics 184 59 Differential Motions of a Robot and Its Hand Frame In the previous section we saw the changes made to a frame as a result of differential motions This only relates to the frame changes not how they were accomplished In this section we relate the changes to the mechanism in this case the robot that moves the frame We will learn how the robots movements are translated into the frame changes at the hand We choose the hand frame of a robot as the frame of interest As the robot moves dT describes the changes in the components of the n o a and p vectors of the hand frame The change is a function of the robots design its instantaneous configuration and its instantaneous movements For example a simple 6axis revolute robot and the Stanford arm from Chapter 2 would require very different joint velocities for similar hand velocities since their configurations are different However for either robot whether the arm is completely extended or not whether it is pointed up or down and so on would translate into very different joint velocities for the same hand velocity As discussed before the Jacobian of the robot creates this link between the joint movements and the hand movement as dx dy dz δx δy δz Robot Jacobian dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 or D J Dθ 522 Notice how the elements of matrix D are the same information as in Δ relating the robot with the frame 510 Calculation of the Jacobian Each element in the Jacobian is the derivative of a corresponding kinematic equation with respect to one of the variables Referring to Eq 59 the first element in D is dx This means the first kinematic equa tion must represent movements along the xaxis which of course would be px In other words px expresses the motion of the hand frame along the xaxis consequently its derivative will be dx The same will be true for dy and dz Considering the n o a p matrix we may pick the corresponding ele ments of px py and pz and differentiate them to get dx dy and dz As an example consider the simple revolute arm from Example 225 The last column of the forward kin ematic equation of the robot is px py pz 1 C1 C234a4 C23a3 C2a2 S1 C234a4 C23a3 C2a2 S234a4 S23a3 S2a2 1 523 Taking the derivative of px yields px C1 C234a4 C23a3 C2a2 dpx px θ1 dθ1 px θ2 dθ2 px θ6 dθ6 dpx S1 C234a4 C23a3 C2a2 dθ1 C1 S234a4S23a3S2a2 dθ2 C1 S234a4S23a3 dθ3 C1 S234a4 dθ4 Differential Motions and Velocities 185 From this we can write the first row of the Jacobian as px θ1 J11 S1 C234a4 C23a3 C2a2 px θ2 J12 C1 S234a4S23a3S2a2 px θ3 J13 C1 S234a4S23a3 px θ4 J14 C1 S234a4 px θ5 J15 0 px θ6 J16 0 524 The same can be done for the next two rows However since there is no unique equation that describes the rotations about the axes we only have the components of the orientation vectors about the three axes there is no single equation available for differential rotations about the three axes namely δx δy and δz Therefore we have to calculate these differently In reality it is actually a lot simpler to calculate the Jacobian relative to T6 the last frame than it is to calculate it relative to the first frame As a result we instead use the following approach Paul 1 has shown that we can write the velocity equation relative to the last frame as T6D T6J Dθ 5 25 This means for the same joint differential motions premultiplied with the Jacobian relative to the last frame we get the hand differential motions relative to the last frame Paul 1 has also shown that we can calculate the Jacobian with respect to the last frame using the formulae in Eqs 526528 The differential motion relationship of Eq 525 can be written as T6dx T 6dy T 6dz T6δx T 6δy T 6δz T 6J11 T6J12 T6J16 T 6J21 T6J22 T6J26 T 6J31 T6J36 T 6J41 T6J46 T 6J51 T6J56 T 6J61 T6J66 dθ1 dθ2 dθ6 We use any A1A2An with corresponding n o a p vectors to derive the Jacobian If joint i under consideration is a revolute joint then T 6J1i nxpy nypx T6J2i oxpy oypx T6J3i axpy aypx T 6J4i nz J5i oz J6i az 5 26 If joint i under consideration is a prismatic joint then T6J1i nz T6J2i oz T6J3i az T6J4i 0 T 6J5i 0 T6J6i 0 5 27 Introduction to Robotics 186 For Eqs 526 and 527 for column i use i 1T 6 meaning For column 1 use oT 6 A1A2A3A4A5A6 For column 2 use 1T6 A2A3A4A5A6 For column 3 use 2T6 A3A4A5A6 For column 4 use 3T6 A4A5A6 For column 5 use 4T6 A5A6 For column 6 use 5T6 A6 5 28 Example 59 Using Eq 523 find the elements of the second row of the Jacobian for the simple revolute robot from Example 225 Solution For the second row of the Jacobian we differentiate py as follows py S1 C234a4 C23a3 C2a2 dpy py θ1 dθ1 py θ2 dθ2 py θ6 dθ6 dpy C1 C234a4 C23a3 C2a2 dθ1 S1 S234a4 dθ2 dθ3 dθ4 S23a3 dθ2 dθ3 S2a2 dθ2 Rearranging the terms yields py θ1 dθ1 J21dθ1 C1 C234a4 C23a3 C2a2 dθ1 py θ2 dθ2 J22dθ2 S1 S234a4S23a3S2a2 dθ2 py θ3 dθ3 J23dθ3 S1 S234a4S23a3 dθ3 py θ4 dθ4 J24dθ4 S1 S234a4 dθ4 py θ5 dθ5 J25dθ5 0 py θ6 dθ6 J26dθ6 0 Example 510 Find the T 6J11 and T6J41 elements of the Jacobian for the simple revolute robot Solution To calculate two elements of the first column of the Jacobian we need to use the A1A2A6 matrix From Example 225 we get Differential Motions and Velocities 187 RTH A1A2A3A4A5A6 nx ox ax 0 ny oy ay 0 nz oz az 0 0 0 0 1 C1 C234C5C6S234S6 S1S5C6 C1 C234C5C6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5C6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5C6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 Using the corresponding values of n o a and p and Eq 526 for revolute joints we get T 6J11 nxpy nypx C1 C234C5C6 S234S6 S1S5C6 S1 C234a4 C23a3 C2a2 S1 C234C5C6 S234S6 C1S5C6 C1 C234a4 C23a3 C2a2 S5C6 C234a4 C23a3 C2a2 T 6J41 nz S234C5C6 C234S6 5 29 As you see the results in Eqs 524 and 529 are different for the J11 elements This is because one is relative to the reference frame and the other is relative to the current or T6 frame 511 How to Relate the Jacobian and the Differential Operator Now that wehave seen the Jacobians and the differential operators separatelyweneedto relate the two together Suppose a robots joints are moved a differential amount Using Eq 59 and knowing the Jacobian we can calculate the D matrix that contains the differential motions of the hand dx dy dz δx δy δz These can be substituted in Eq 516 to form the differential operator Next Eq 515 can be used to calculate dT from which we calculate the new position and orientation of the robots hand Therefore the differential motions of the robots joints are ultimately related to the hand frame of the robot Alternately Eq 525 and the Jacobian can be used to calculate the T 6D matrix which contains the differential motions of the hand relative to the current frame T6dx T6dy T 6dz T 6δx T6δy T6δz These can be substituted in Eq 520 to form the differential operator T6Δ Next Eq 519 can be used to calculate dT the same as before Referring to Section 54 we saw that as the planar mobile robot simultaneously translates and rotates its intermediate and final positions should be calculated Similarly when a robot continuously moves depending on its instantaneous joint velocities the hand frames intermediate and final positions should be determined Introduction to Robotics 188 We can summarize the following procedure to continuously update the location and orientation of the final frame as the robot joints continue to move 1 Use D J Dθ to calculate the differential motions of the hand 2 Substitute dx dy dz δx δy δz into Δ and find dT Δ T 3 Calculate the new location and orientation of the hand frame Tnew Told dT 4 Update the Jacobian 5 Go to 1 A similar procedure can be written relative to the hand frame Example 511 The hand frame of a 5DOF robot its instantaneous numerical Jacobian and a set of differential motions are given The robot has a 2RP2R configuration Find the new location of the hand after the differential motion T6 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 J 3 0 0 0 0 2 0 1 0 0 0 4 0 0 0 0 1 0 1 0 1 0 0 0 1 dθ1 dθ2 ds3 dθ4 dθ5 0 1 0 1 0 05 0 1 0 Solution It is assumed that the robot can only rotate about the x and yaxes since it has only 5 DOF Using Eq 522 we calculate the D matrix which is then substituted into Eq 516 as follows D dx dy dz δx δy J Dθ 3 0 0 0 0 2 0 1 0 0 0 4 0 0 0 0 1 0 1 0 1 0 0 0 1 0 1 0 1 0 05 0 1 0 0 3 0 15 0 4 0 0 1 Δ 0 0 0 1 0 3 0 0 0 0 15 0 1 0 0 0 4 0 0 0 0 From Eq 515 we get dT6 Δ T6 0 0 0 1 0 3 0 0 0 0 15 0 1 0 0 0 4 0 0 0 0 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 0 0 1 0 0 1 0 0 0 0 15 0 1 0 0 0 1 0 0 0 0 Differential Motions and Velocities 189 The new location of the frame after the differential motion is T6 dT6 T6ORIGINAL 0 0 1 0 0 1 0 0 0 0 15 0 1 0 0 0 1 0 0 0 0 1 0 0 5 0 0 1 3 0 1 0 2 0 0 0 1 1 0 1 0 5 1 0 0 1 2 85 0 1 1 0 2 1 0 0 0 1 Example 512 The differential motions applied to a frame T1 described as D dx δy δz T and the resulting T2 positions and orientations of the end of a 3DOF robot are given The corresponding Jacobian is also given a Find the original frame T1 before the differential motions were applied to it b Find TΔ Is it possible to achieve the same resulting change in T1 by performing the differential motions relative to the frame D 0 01 0 02 0 03 T2 0 03 1 0 02 4 97 1 0 03 0 8 15 0 0 02 1 9 9 0 0 0 1 J 5 10 0 3 0 0 0 1 1 Solution Using Eqs 515 and 520 we get dT T2T1 Δ T1 T2 Δ I T1 and T1 Δ I 1 T2 Substituting the values from the D matrix into Δ adding I to it and then inverting it we get Δ 0 0 03 0 02 0 01 0 03 0 0 0 0 02 0 0 0 0 0 0 0 and Δ I 1 0 999 0 03 0 02 0 01 0 03 0 999 0 001 0 0003 0 02 0 001 1 0 002 0 0 0 1 and T1 0 1 0 5 1 0 0 8 0 0 1 10 0 0 0 1 approximately Introduction to Robotics 190 Then TΔ T 1 1 Δ T1 0 0 03 0 0 15 0 03 0 0 02 0 03 0 0 02 0 0 1 0 0 0 0 Since these differential motions relate to δx δz dx dy and dz requiring 5 DOF it is impossible to achieve the same results by performing the differential motions relative to the frame 512 The Inverse Jacobian In reality knowing the joint differential motions and using this information to find the differential motions of the hand frame has limited applications Instead we want to specify a differential motion rate velocity at the end frame which requires that we determine the instantaneous differential motion rate of each joint For example if a robot is laying glue on a plate it is necessary for it not only to follow a particular path on a flat plane but also to go at a constant speed Otherwise the glue will not be uniform and the operation will be useless In this case similar to the case with inverse kinematic equations where we have to divide the path into very small sections and calculate joint values at all times to make sure the robot follows a desired path we have to calculate joint velocities continuously in order to ensure that the robots hand maintains a desired velocity For this we need to calculate the inverse of the Jacobian and use it in the following equation D J Dθ J 1 D J 1 J Dθ Dθ J 1 D 530 and similarly T 6J 1 T 6D T6J 1 T6J Dθ Dθ T6J 1 T6D 5 31 This means that knowing the inverse of the Jacobian we can calculate how fast each joint must move so that the robots hand will yield a desired differential motion or velocity As we discussed earlier with the robot moving and its configuration changing the actual magnitudes of all elements of the Jacobian of a robot change continuously As a result although the symbolic equations describing the Jacobian remain the same their numerical values change Con sequently it is necessary to calculate the Jacobians numerical values continuously This means to calculate enough joint velocities per second to have accurate velocities the process must be very efficient and quick otherwise the motion will be inaccurate and useless Inverting the Jacobian may be done in two ways both are very difficult computationally intensive and time consuming considering that the Jacobian may be as large as 6 6 The first way is to find the symbolic inverse of the Jacobian and then substitute the values into it to compute the velocities The second technique is to substitute the numbers in the Jacobian and then invert the numerical matrix through techniques such as Gaussian elimination Although these are both possible they usually are not done Instead we may use the inverse kinematic equations to calculate the joint velocities Consider Eq 264 repeated here which yields the value of θ1 for the simple revolute robot pxS1pyC1 0 θ1 tan1 py px and θ1 θ1 180 2 64 Differential Motions and Velocities 191 We can differentiate the relationship to find dθ1 which is the differential value of θ1 as pxS1 pyC1 dpxS1 pxC1dθ1 dpyC1pyS1dθ1 dθ1 pxC1 pyS1 dpxS1 dpyC1 dθ1 dpxS1 dpyC1 pxC1 pyS1 532 Similarly from Eq 270 repeated here we get S234 C1ax S1ay C234az C234 dθ2 dθ3 dθ4 C1ax S1ay S234 axS1dθ1 C1dax ayC1dθ1 S1day S234 dθ2 dθ3 dθ4 az C234daz dθ2 dθ3 dθ4 S234 axS1dθ1C1daxayC1dθ1S1day C234daz C234 C1ax S1ay S234az 533 Equation 533 gives the combination of three differential motions in terms of known values but remem ber that we know dax day daz from the dT matrix and all the joint angles Next we differentiate Eq 266 to find a relationship for dθ3 as follows 2a2a3C3 pxC1 pyS1C234a4 2 pz S234a4 2a2 2a2 3 2a2a3S3dθ3 2 pxC1 pyS1C234a4 C1dpxpxS1dθ1 S1dpy pyC1dθ1 a4S234 dθ2 dθ3 dθ4 2 pz S234a4 dpz a4C234 dθ2 dθ3 dθ4 534 Although Eq 534 is long all elements in it are already known and dθ3 can be calculated Next differentiating Eq 272 we get S2 C3a3 a2 2 S2 3a2 3 C3a3 a2 pz S234a4 S3a3 pxC1 pyS1C234a4 C2dθ2 C3a3 a2 2 S2 3a2 3 S2 2 C3a3 a2 a3S3dθ3 2a2 3S3C3dθ3 a3S3dθ3 pz S234a4 C3a3 a2 dpz a4C234 dθ2 dθ3 dθ4 a3C3dθ3 pxC1 pyS1C234a4 S3a3 dpxC1pxS1dθ1 dpyS1 pyC1dθ1 S234a4 dθ2 dθ3 dθ4 535 which yields dθ2 since all other elements are known This will also enable us to calculate dθ4 from Eq 533 Next we differentiate C5 from Eq 275 to get C5 C1ay S1ax S5dθ5 S1aydθ1C1day C1axdθ1 S1dax 536 which results in dθ5 Lastly we differentiate the 21 elements of Eq 277 to calculate dθ6 as S6 S234 C1nx S1ny C234nz C6dθ6 C234 C1nx S1ny dθ2 dθ3 dθ4 S234 S1nxdθ1 C1dnx C1nydθ1 S1dny S234nz dθ2 dθ3 dθ4 C234dnz 537 Introduction to Robotics 192 As you see there are six equations that result in six differential joint values from which velocities can be calculated The robot controller works with these six equations enabling it to quickly calculate velocities and run the robot joints accordingly Example 513 For the robot from Example 512 find the values of the joint differential motions for the three joints we will call them ds1 dθ2 dθ3 of the robot that caused the given frame change Solution From Eq 530 we get Dθ J 1 D 0 0 333 0 0 1 0 167 0 0 1 0 167 1 0 01 0 02 0 03 0 0067 0 0023 0 0323 Example 514 A camera is attached to the hand frame TH of a robot as given The corresponding inverse Jacobian of the robot at this location is also shown The robot makes a differential motion described as D 0 05 0 0 1 0 0 1 0 03 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the hand frame c Find the new location of the camera after the differential motion d Find how much the differential motions should have been instead if measured relative to frame TH to move the robot to the same new location as in part c TH 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Solution Substituting the values into the corresponding equations we get a Dθ J 1 D 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 0 05 0 0 1 0 0 1 0 03 0 05 0 2 0 0 1 0 0 08 From this we can tell that joints 1 2 4 and 6 need to move as shown Differential Motions and Velocities 193 b The change in the hand frame is dT Δ T 0 0 03 0 1 0 05 0 03 0 0 0 0 1 0 0 0 1 0 0 0 0 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 c The new location of the camera is Tnew Told dT 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 0 03 1 0 1 3 79 1 0 03 0 2 09 0 0 1 1 7 6 0 0 0 1 d TΔ T 1 Δ T T 1 dT TΔ 0 1 0 2 1 0 0 3 0 0 1 8 0 0 0 1 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 0 0 03 0 0 09 0 03 0 0 1 0 79 0 0 1 0 0 4 0 0 0 0 and therefore the differential motions relative to the frame will be TD 0 09 0 79 0 4 0 1 0 0 03 T Example 515 A spherical robot with joint values of β 0 γ 90 and r 5 units has moved a dif ferential amount D 0 1 0 0 1 0 05 0 0 1 T Differentiating elements of the Tsph matrix has yielded the following equations for the joint differential motions dβ d az sinβ dγ d oy sinγ dr d pz r sinβ dβ cosβ where daz represents a change in az etc a Write the differential operator matrix representing the differential motions b Find the initial position and orientation of the robot before the differential motion c Find the values of dβ dγ dr d Identify the elements of Tsph that could have been used to derive the equations given Solution a We substitute the differential motion values given into Δ to get Δ 0 0 1 0 0 1 0 1 0 0 05 0 0 0 05 0 0 1 0 0 0 0 b Substituting the given joint values into Eq 236 we get the initial position and orientation of the robot Introduction to Robotics 194 Tsph CβCγ Sγ SβCγ rSβCγ CβSγ Cγ SβSγ rSβSγ Sβ 0 Cβ rCβ 0 0 0 1 0 1 0 0 1 0 0 0 0 0 1 5 0 0 0 1 c We find the changes in the n o a p values from dT dT Δ T 0 1 0 0 0 1 0 0 1 0 05 0 25 0 05 0 0 0 1 0 0 0 0 and therefore d az 0 d oy 0 1 d pz 0 1 From preceding equations given we get dβ 00 undefined but basically zero dγ 0 11 0 1 and dr 0 1 5 0 0 1 0 1 d Elements 31 and 12 and 22 and 33 and 34 can be used for this purpose Example 516 The articulated robot arm from Example 226 is in the following configuration Cal culate the angular velocity of the first joint for the given values such that the hand frame will have the following linear and angular velocities dxdt 1 insec dydt 2 insec δxdt 0 1 radsec θ1 0 θ2 90 θ3 0 θ4 90 θ5 0 θ6 45 a2 15 a3 15 a4 5 The parameters of the robot are shown in Table 51 The robot is shown in Figure 56 Solution First we substitute these values into Eq 259 repeated here to obtain the final position and orien tation of the robot Please notice that the actual position and orientation of the robot depend on what is Table 51 Parameters for the robot from Example 226 θ d a α 1 θ1 0 0 90 2 θ2 0 a2 0 3 θ3 0 a3 0 4 θ4 0 a4 90 5 θ5 0 0 90 6 θ6 0 0 0 Differential Motions and Velocities 195 considered to be the reset rest position of the robot or from where an angle is measured Assuming that the reset position of this robot is along the xaxis then RTH A1A2A3A4A5A6 C1 C234C5C6S234S6 S1S5C6 C1 C234C5C6S234C6 S1S5S6 C1 C234S5 S1C5 C1 C234a4 C23a3 C2a2 S1 C234C5C6S234S6 C1S5C6 S1 C234C5C6S234C6 C1S5S6 S1 C234S5 C1C5 S1 C234a4 C23a3 C2a2 S234C5C6 C234S6 S234C5C6 C234C6 S234S5 S234a4 S23a3 S2a2 0 0 0 1 RTH nx ox ax px ny oy ay py nz oz az pz 0 0 0 1 0 707 0 707 0 5 0 0 1 0 0 707 0 707 0 30 0 0 0 1 Substituting the desired differential motion values into Eqs 515 and 516 we get Δ 0 δz δy dx δz 0 δx dy δy δx 0 dz 0 0 0 0 0 0 0 1 0 0 0 1 2 0 0 1 0 0 0 0 0 0 dT Δ T 0 0 0 1 0 0707 0 0707 0 5 0 0 0 1 0 0 0 0 0 z y x 1 2 3 z0 x0 z1 x1 z2 x2 z3 x4 x3 z4 z5 x5 z6 x6 a2 a3 a4 4 Figure 56 Reference frames for the simple 6DOF articulate robot Introduction to Robotics 196 Substituting the values from the dT and T matrices into Eq 532 we get dθ1 dt dpxS1 dpyC1 pxC1 pyS1 1 0 5 1 5 1 0 0 1 radsec Please note that the number given for θ5 causes a degenerate condition for the robot and as a result other angular velocities cannot be calculated for this configuration 513 Calculation of the Jacobian with ScrewBased Mechanics In the previous sections we derived the Jacobian of serial robots based on the DenavitHartenberg represen tation In this section we study how the Jacobian may be derived based on screw mechanics It should be mentioned here that the concept and use of Jacobians as discussed so far is general and applies the same way regardless of whether the Jacobian is derived with screwbased mechanics or the DH representation As was discussed in Section 53 the Jacobian is a representation of the instantaneous geometry of the robot elements Therefore we should expect that the Jacobian is related to the configuration of the joints and links which are in fact represented by the joint screw axes Consequently with the screw axes representing the direc tions and locations of the joints as shown in Figure 38 repeated each column of the Jacobian represents the instantaneous direction and location of the screw axes as they move in space due to the joint motions As a result we need to relate the instantaneous locations and directions of the screw axes relative to a reference frame as the robot joints move This is generally done by considering the rotation and translation matrices between the reference frame and the screw axes Therefore you may realize that once again we refer back to the transformation matrices that describe the motion of each joint as described by the nAn 1 matrices Denoting the Jacobian of the robot as J we can write ω v J Dθ 538 x y z S1 S2 ˆs2 ˆs1 Fixed base ˆs3 ˆs4 S3 S4 Figure 38 Repeated here Differential Motions and Velocities 197 where ω is the vector of angular velocities of the end effector with respect to the reference frame v is the vector of linear velocities of the end effector with respect to the reference frame and Dθ is the angular or linear velocities of the joints Notice the difference between our definition of matrix D from Eq 59 and from Eq 538 Each column of the screwbased Jacobian can be expressed as Jj sj OSj sj tjsj Jj 0 sj 539 For revolute joints For prismatic joints where ŝj is the instantaneous screw axis at each joint and ŝjx ŝjy ŝjz constitute elements J1j J2j J3j of the Jac obian OSj is the position vector of the instantaneous screw axis at each joint and tj is the pitch which is zero for purely revolute joints The three components of OSj sj tjsj constitute elements J4j J5j J6j of the Jaco bian This means for each joint we must determine the instantaneous screw axis and its position through the use of transformation matrices The reference frame against which we measure the location of the screw axes is arbitrary If we place the reference frame at the base of the robot as we have done so far the screw axis of each joint is affected by all the transformations of the joints before it For example in this case ŝ6 would be affected by θ1 θ2 θ3 θ4 θ5 We saw the same issue in Section 510 It turns out that if we base our measurements relative to a reference frame attached to an intermediate joint the third or fourth the calculations of the instantaneous screw axes and their locations will be easier 2 3 this is because in each direction the screw axes are only affected by some of the joint variables and therefore we have less coupling of the variables and transformation matrices This means that from the selected intermediate reference frame going forward is related to the forward transfor mation matrices while going back to the base involves the inverse of the transformation matrices In the presence of coinciding frames we may select the point of coincidence as the location of the reference frame Therefore to derive the Jacobian of a robot we first place a reference frame at a joint of our choosing from which we represent all screw axes 1 4 5 6 We then derive all the instantaneous screw axes and their loca tions relative to this intermediate reference frame To simplify the explanation of the process that we use to derive the Jacobian we first consider the following As we saw in Chapter 2 a transformation T consists of a rotation portion and a translation portion as n 1Tn nx ox ax Px ny oy ay Py nz oz az Pz 0 0 0 1 n 1Rn n 1Pn 0 1 5 40 where n represents a joint number and n 1Rn and n 1Pn represent the rotation and translation portions of the transformation matrix The reason we make this distinction is that the instantaneous orientations of the screw axes are in fact only affected by the rotation portion of each transformation not by its translation We therefore can use the simpler 3 3 subset of the transformation matrix n1Rn in our derivations It is actually possible to find each column of the Jacobian directly by multiplying the appropriate transfor mation matrices between the selected reference frame and the corresponding joint and multiplying the direc tion and location of the screw axis by the transformation However this requires multiplying a number of intermediate rotation matrices about all axes Instead the following is a systematic way of formulating the Jacobian using the familiar nAn 1 matrices we already have which makes it quicker and simpler We use the following equations to calculate the Jacobian Notice that each screw axis is found by pre multiplying it by the R portion of appropriate A matrices The vectors representing the screw axes are found by adding the vectors representing successive position vectors to each other Introduction to Robotics 198 Assuming that the intermediate reference frame is chosen to coincide with joint n remember that this coincides with zn1 of the DH representation and the screw axis ŝn we write 1 For the screw axis coincident with the intermediate reference frame with i n si 001 T and OSi 000 T 541 If a revolute joint calculate OSi si 2 For screw axes beyond joint n where i n 1n 2 si n1Ri1 0 0 1 T ri1 ai1 di1Sαi1 di1Cαi1 T OSi OSi1 n1Ri1 ri1 542 If a revolute joint calculate OSi si 3 For screw axes before joint n where i n1n2 si n 1Ri 1 0 0 1 T ri ai di Sαi diCαi T OSi OSi 1 n 1Ri ri 5 43 If a revolute joint calculate OSi si Substituting these values into Eq 539 yields the Jacobian To illustrate this we apply the method to a generic 6DOF articulated arm as shown in Figure 57 Screw axes are shown We choose to locate the intermediate reference frame zn xn aligned with z4 ŝ5 axis We assume the A matrices based on the DH representation and the para meters table for the robot are derived as follows We use the R portion of the A matrices Table 24 Repeated here θ d a α 01 θ1 0 0 90 12 θ2 0 a2 0 23 θ3 0 a3 0 34 θ4 0 a4 90 45 θ5 0 0 90 56 θ6 0 0 0 a2 xn zn xU zU ˆs3 ˆs1 ˆs5 ˆs4 ˆs2 ˆs6 a3 a4 Figure 57 A generic 6DOF articulated arm Differential Motions and Velocities 199 A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 S2 0 C2a2 S2 C2 0 S2a2 0 0 1 0 0 0 0 1 A3 C3 S3 0 C3a3 S3 C3 0 S3a3 0 0 1 0 0 0 0 1 A4 C4 0 S4 C4a4 S4 0 C4 S4a4 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 Joint 5 i 5 n 5 Since i and n are equal we use Eq 541 s5 001 T and OS5 000 T Since this is a revolute joint OS5 s5 i j k 0 0 0 0 0 1 0 0 0 Joint 6 i 6 n 5 We use Eq 542 s6 4R5 0 0 1 C5 0 S5 S5 0 C5 0 0 1 0 0 1 S5 C5 0 r5 0 0 0 T see parameters table OS6 OS5 4R5r5 0 0 0 C5 0 S5 S5 0 C5 0 0 1 0 0 0 0 0 0 Since this is a revolute joint OS6 s6 i j k 0 0 0 S5 C5 0 0 0 0 Joint 4 i 4 n 5 We use Eq 543 s4 4R3 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 0 0 1 0 1 0 r4 a4 d4Sα4 d4Cα4 T a4 0 0 OS4 OS5 4R4 r4 0 0 0 1 0 0 0 1 0 0 0 1 a4 0 0 a4 0 0 Introduction to Robotics 200 Since this is a revolute joint OS4 s4 i j k a4 0 0 0 1 0 0 0 a4 Joint 3 i 3 n 5 We use Eq 543 s3 4R2 0 0 1 T 4R3 3R2 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 0 0 1 0 1 0 r3 a3 d3Sα3 d3Cα3 T a3 0 0 OS3 OS4 4R3 r3 a4 0 0 C4 S4 0 0 0 1 S4 C4 0 a3 0 0 a3C4a4 0 a3S4 Since this is a revolute joint OS3 s3 i j k a3C4a4 0 a3S4 0 1 0 a3S4 0 a3C4 a4 Joint 2 i 2 n 5 We use Eq 543 s2 4R1 0 0 1 T 4R3 3R2 2R1 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 C2 S2 0 S2 C2 0 0 0 1 0 0 1 0 1 0 r2 a2 d2Sα2 d2Cα2 T a2 0 0 OS2 OS3 4R2 r2 a3C4 a4 0 a3S4 C34 S34 0 0 0 1 S34 C34 0 a2 0 0 a2C34 a3C4 a4 0 a2S34 a3S4 Since this is a revolute joint OS2 s2 i j k a2C34a3C4a4 0 a2S34 a3S4 0 1 0 a2S34 a3S4 0 a2C34 a3C4 a4 Differential Motions and Velocities 201 Joint 1 i 1 n 5 We use Eq 543 s1 4R0 0 0 1 T 4R3 3R2 2R1 1R0 0 0 1 T C4 S4 0 0 0 1 S4 C4 0 C3 S3 0 S3 C3 0 0 0 1 C2 S2 0 S2 C2 0 0 0 1 C1 S1 0 0 0 1 S1 C1 0 0 0 1 S234 0 C234 r1 a1 d1Sα1 d1Cα1 T 0 0 0 OS1 OS2 4R1 r1 a2C34 a3C4 a4 0 a2S34 a3S4 C234 S234 0 0 0 1 S234 C234 0 0 0 0 a2C34 a3C4 a4 0 a2S34 a3S4 Since this is a revolute joint OS1 s1 i j k a2C34a3C4a4 0 a2S34 a3S4 S234 0 C234 0 a2C2 a3C23 a4C234 0 We substitute these values into Eq 539 with all revolute joints 5j S234 0 0 0 0 S5 0 1 1 1 0 C5 C234 0 0 0 1 0 0 a2S34 a3S4 a3S4 0 0 0 a2C2 a3C23 a4C234 0 0 0 0 0 0 a2C34 a3C4 a4 a3C4 a4 a4 0 0 544 Notice how the Jacobian represents the effect of each joint on the rest of the system beyond itself Multi plying this Jacobian with the joint angular velocities yields the angular and linear velocities of the hand frame with respect to the intermediate reference frame as 5ωx S234θ1 S5θ6 5ωy θ2 θ3 θ4 C5θ6 5ωz C234θ1 θ5 5vx a2S34θ2 a3S4 θ2 θ3 5vy a2C2 a3C23 a4C234 θ1 5vz a2C34 a3C4 a4 θ2 a3C4 a4 θ3 a4θ5 5 45 Later we use these equations to derive the inverse velocity relationships Example 517 Derive the Jacobian of the Stanford arm from Examples 34 and 227 shown in Figure 310 repeated here with modified frames The A matrices and the parameters table are also repeated here A1 C1 0 S1 0 S1 0 C1 0 0 1 0 0 0 0 0 1 A2 C2 0 S2 0 S2 0 C2 0 0 1 0 d2 0 0 0 1 A3 1 0 0 0 0 1 0 0 0 0 1 d3 0 0 0 1 Introduction to Robotics 202 A4 C4 0 S4 0 S4 0 C4 0 0 1 0 0 0 0 0 1 A5 C5 0 S5 0 S5 0 C5 0 0 1 0 0 0 0 0 1 A6 C6 S6 0 0 S6 C6 0 0 0 0 1 0 0 0 0 1 Solution This time we place the intermediate reference frame on joint 4 such that the zaxis will be coincident with ŝ4 which is the same as z3 We systematically use Eqs 541543 on the joints as appropriate Joint 4 i 4 n 4 Since i and n are equal we use Eq 541 s4 001 T and OS4 000 T Since this is a revolute joint OS4 s4 i j k 0 0 0 0 0 1 0 0 0 z y ˆs6 ˆs5 ˆs4 ˆs2 ˆs1 x ˆs3 l2 d3 t Figure 310 repeated here with modified frames Table 26 The parameters table for the Stanford arm repeated θ d a α 01 θ1 0 0 90 12 θ2 d2 0 90 23 0 d3 0 0 34 θ4 0 0 90 45 θ5 0 0 90 56 θ6 0 0 0 Differential Motions and Velocities 203 Joint 5 i 5 n 4 Since this joint is forward of the reference frame we use Eq 542 s5 3R4 0 0 1 C4 0 S4 S4 0 C4 0 1 0 0 0 1 S4 C4 0 r4 0 0 0 T see parameters table OS5 OS4 3R4r4 0 0 0 C4 0 S4 S4 0 C4 0 1 0 0 0 0 0 0 0 Since this is a revolute joint OS5 s5 i j k 0 0 0 S4 C4 0 0 0 0 Joint 6 i 6 n 4 Since this is also forward of the reference frame we use Eq 542 s6 3R5 0 0 1 T C4C5 S4 C4S5 S4C5 C4 S4S5 S5 0 C5 0 0 1 C4S5 S4S5 C5 r5 0 0 0 T OS6 OS5 0 0 0 0 0 0 Since this is a revolute joint OS6 s6 i j k 0 0 0 C4S5 S4S5 C5 0 0 0 Joint 3 i 3 n 4 Since this is before Joint 4 we use Eq 543 s3 3R2 0 0 1 T 1 0 0 0 1 0 0 0 1 0 0 1 0 0 1 r3 0 0 d3 T OS3 OS4 3R3 r3 0 0 0 1 0 0 0 1 0 0 0 1 0 0 d3 0 0 d3 Introduction to Robotics 204 Since this is a prismatic joint we do not need to calculate the cross product Joint 2 i 2 n 4 We use Eq 543 s2 3R1 0 0 1 T 3R22R1 0 0 1 1 0 0 0 1 0 0 0 1 C2 S2 0 0 0 1 S2 C2 0 0 0 1 0 1 0 r2 0 d2 0 T OS2 OS3 3R2 r2 0 0 d3 1 0 0 0 1 0 0 0 1 0 d2 0 0 d2 d3 Since this is a revolute joint OS2 s2 i j k 0 d2 d3 0 1 0 d3 0 0 Joint 1 i 1 n 4 We use Eq 543 s1 3R0 0 0 1 T 3R22R11R0 0 0 1 1 0 0 0 1 0 0 0 1 C2 S2 0 0 0 1 S2 C2 0 C1 S1 0 0 0 1 S1 C1 0 0 0 1 S2 0 C2 r1 0 0 0 T OS1 OS2 3R1 r1 0 d2 d3 Since this is a revolute joint OS1 s1 i j k 0 d2 d3 S2 0 C2 d2C2 d3S2 d2S2 The Jacobian of the Stanford arm relative to the intermediate reference frame is 4J S2 0 0 0 S4 C4S5 0 1 0 0 C4 S4S5 C2 0 0 1 0 C5 d2C2 d3 0 0 0 0 d3S2 0 0 0 0 0 d2S2 0 1 0 0 0 Differential Motions and Velocities 205 514 The Inverse Jacobian for the ScrewBased Method As we have discussed previously in most cases what we need to do is calculate the joint velocities for a desired endplate velocity which requires the inverse of the Jacobian matrix Although we may attempt to invert the Jacobian it is not an easy task Instead we use the forward differentialmotion equations to derive a set of joint velocity relationships Referring to Eq 545 for the articulated 6axis robot from Section 513 we can manipulate the equations to derive direct relationships for each joint velocity as follows θ1 5vy a2C2 a3C23 a4C234 θ5 5ωz C234θ1 θ6 5ωxS234θ1 S5 θ234 5ωyC5θ6 θ2 θ3 θ23 5vzS345vxC34θ234a4S34 a3S3 θ2 5vxa3S4θ23 a2S34 θ3 θ23θ2 θ4 θ234θ23 515 Calculation of the Jacobians of Parallel Robots The basic concepts related to the Jacobian of a parallel robot are similar to our discussion so far the Jacobian is a representation of the instantaneous geometry of the robot affecting its velocity and the Jacobian multi plied by the joint velocities yields the velocities of the moving platform However we deal with multiple closed loops In this case the Jacobian may be derived using a number of different methods including force decomposition screw coordinates and vectorloop methods 3 7 8 We will only consider the vectorloop method In this method we write the vector loops as before and we differentiate each loop equation to find the differential motion equations from which we form the Jacobian In Section 53 we differentiated Eq 56 which described the motions of the end frame as a result of joint variables in order to derive the Jacobian Here we should realize that since we are dealing with closed loops each equation describing the input joint variables qj and the resulting motions of the moving platform yj is equal to zero or fi yjqj 0 546 Differentiating these equations we find fi yj y fi qj q or Jy y Jq q 547 As you see there are two Jacobians relating the inputs and outputs To make the nomenclatures similar we use y D and q Dθ to denote the vectors of the moving platform motions and the joint variables We combine the two Jacobians as follows Jq 1 Jy D Jq 1 Jq Dθ Dθ Jq 1 Jy D J D 548 Introduction to Robotics 206 We will derive the Jacobians of a planar parallel robot and a generic StewartGough platform to see how this works 5151 The Jacobian of a Planar 3RRR Parallel Robot Figure 58 shows a 3RRR planar robot For each of the three loops we write Pi ci ai bi 549 We differentiate each loop vector equation in order to form the Jacobian Remember that the derivative of a vector includes the change in its magnitude as well as the change in its direction which is perpendicular to the direction of the vector and it is a function of how fast the vector rotates Therefore we can say d dtP P ω P Using this notation we can differentiate Eq 549 to get Pi θ k ci αi k ai αi βi k bi 550 Note the following a The derivative of vector P only has a magnitude which is the velocity of the center of the platform because the rotation of the platform does not affect the velocity of its center b The derivatives of vectors ā b and c only come from the rotation of the platform because the lengths are constant c Since the robot is planar all rotations are about the vertical k axis The direction of the velocity is perpendicular to the vector as expressed by the cross product x y A1 A3 A2 C1 C3 C2 B1 β1 β2 β3 α2 α3 θ α1 B3 B2 P n o a3 a2 a1 b1 b2 b3 O c3 c2 c1 Figure 58 A generic 3RRR planar parallel robot Differential Motions and Velocities 207 Since linkages BiCi are inactive we desire to eliminate angular velocities βi by taking the dot product of the vectors of Eq 550 by a vector that is perpendicular to these angular velocities namely bi Since a b c b c a c a b and denoting Pi Vo velocity of the center of the moving platform we get bi Vo bi θ k ci bi αi k ai bi Vo θk ci bi αik ai bi 551 Note that since this is a planar mechanism the zcomponents of all positions and velocities are zero We expand each part of Eq 551 by taking the dot and cross products to get bix biy biz Vox Voy 0 θk i j k cix ciy 0 bix biy 0 αik i j k aix aiy 0 bix biy 0 bixVox biyVoy θ biycixbixciy αi aixbiyaiybix for i 123 552 Equation 552 can be written in a matrix form as b1x b1y b1yc1xb1xc1y b2x b2y b2yc2xb2xc2y b3x b3y b3yc3xb3xc3y Vox Voy θ a1xb1ya1yb1x 0 0 0 a2xb2ya2yb2x 0 0 0 a3xb3ya3yb3x α1 α2 α3 553 Or as in Eq 547 Jy b1x b1y b1yc1xb1xc1y b2x b2y b2yc2xb2xc2y b3x b3y b3yc3xb3xc3y and Jq a1xb1ya1yb1x 0 0 0 a2xb2ya2yb2x 0 0 0 a3xb3ya3yb3x 554 Substituting instantaneous geometric values into the Jacobians and knowing the joint angular velocities allows us to calculate the linear and angular velocities of the platform or vice versa Singularity or degen eration conditions can also be inferred from these Jacobians Whenever the determinant of either Jacobian is zero the robot is in a singular or degenerate condition losing or gaining a degree of freedom For Jq this happens when any of the diagonal terms are equal to zero as a result of links AiBi and BiCi aligning or folding over each other rendering the determinant equal to zero At this instant the platform can make differential motions without the links moving or the links can move a differential amount without moving the platform For Jy the determinant is zero when links BiCi become coincident At that instant the platform can make a differential rotation with the links rotating freely 5152 The Jacobian of a Generic 66 StewartGough Parallel Robot Figure 59 shows a generic 66 StewartGough platform The joint velocities relate to the changes in the lengths of the six linkages The output is the linear velocities of the center of the platform and angular velo cities about the reference axes Similar to the planar robot case in Section 5151 we write six loop equations and differentiate them to form the Jacobian as follows Introduction to Robotics 208 P bi ai di for i 1 6 P ωb bi di ωdi di 555 Note the following P is the change in the length of P which is the same as the velocity of the center of the platform VP The rotations of the platform have no effect on the center of the platform ωb is the angular velocity of the platform Lengths bi are constant ai are fixed therefore they have no derivatives ωdi are the angular velocities of the arms Since the angular velocities of the arms ωdi are not controlled we desire to eliminate them by taking the dot product of Eq 555 with the unit vector along the arm di di VP di ωb bi di di di ωdi di Since a b c b c a c a b we get di VP ωb bi di di 556 Referring to Eq 547 we can form the Jacobian by expanding the terms of Eq 556 as d1x d1y d1z b1 d1 T d2x d2y d2z b2 d2 T d3x d3y d3z b3 d3 T d6x d6y d6z b6 d6 T VPx VPy VPz ωbx ωby ωbz I d1 d2 d3 d6 557 xo yo zo A1 A2 A3 A4 A5 A6 B1 B2 B3 B4 B5 B6 d1 P b1 a1 O P ˆd1 Figure 59 A generic 66 StewartGough parallel robot Differential Motions and Velocities 209 The Jacobian is a 6 6 matrix with all known values Therefore knowing the desired platform velocities the joint velocities can be calculated 516 Design Projects 5161 The 3DOF Robot This is a continuation of the design project we started in the previous chapters If you designed a 3DOF robot and if you developed its forward and inverse kinematic equations you can now continue with the project In this part of the project you may continue with the differential motion calculations of the robot Using the forward and inverse kinematic equations calculate the forward and inverse differential motions of your robot Since this is a 3DOF robot the calculations are relatively easy Remember that with 3 DOF you can only position the hand of the robot but you may not pick a desired orientation Similarly you can only calculate three differential motion equations that are relative to the three axes or dpx dpy and dpz From Eq 286 we can derive an expression for dθ1 as follows tan θ1 px py pxC1 pyS1 d px C1pxS1 d θ1 d py S1pyC1 d θ1 d θ1 pxS1 pyC1 d py S1d px C1 d θ1 d py S1 d px C1 pxS1pyC1 You may continue deriving equations for the other two joints With these equations if you eventually build your robot and if you use actuators that respond to velocity control commands such as a servomotor or a stepper motor you will be able to control the velocity of the robot relative to the three axes Since in this process you may have calculated the Jacobian of your robot as well you may use it to find whether there are any degenerate points in its workspace Do you expect to have any degenerate points We will continue with this project in the next chapters 5162 The 3DOF Mobile Robot Similarly if you designed a 3DOF mobile robot you may either differentiate its position and orientation equations and use them for controlling the robots velocity or differentiate the inverse equations directly to derive the same In either case these equations allow you to relate the joint differential motions with the differential motions of the robot 517 Summary In this chapter we first discussed the differential motions of a frame and the effects of these motions on the frame and its location and orientation Later we discussed the differential motions of a robot and how the differential motions of the robots joints are related to the differential motions of the robots hand We then related the two together Through this we can calculate how fast a robots hand moves in space if the joint velocities are known We also discussed inverse differential motion equations of a robot Using these equa tions we can determine how fast each joint of a robot must move in order to generate a desired hand velocity Together with the inverse kinematic equations of motion we can control both the motions and the velocity of a multiDOF robot in space We can also follow the location of the hand frame as it moves in space We also Introduction to Robotics 210 studied the derivation of the Jacobians based on screw mechanics as well as the Jacobians of parallel robots Although these were somewhat different in derivation the basic concepts were the same In the next chapter we will continue with the derivation of dynamic equations of motion Through this we can design and choose appropriate actuators that are capable of running the robot joints at desired velocities and accelerations References 1 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 2 Hunt K H Robot KinematicsA Compact Analytic Inverse Solution for Velocities ASME Journal of Mechanisms Transmissions and Automation in Design 1987 vol 109 no 1 pp 4249 3 Waldron KJ SL Wang SJ Bolin A Study of the Jacobian Matrix of Serial Manipulators ASME Journal of Mechanisms Transmissions and Automation in Design vol 107 no 2 pp 230238 4 Ribeiro L R Guenther D Matrins ScrewBased Relative Jacobian for Manipulators Cooperating in a Task ABCM Symposium Series in Mechatronics 2008 vol 3 pp 276285 5 Tonetto C C Rocha A Dias Kinematic Programming for Two Cooperating Robots Performing Tasks ABCM Symposium Series in Mechatronics 2014 vol 6 pp 578587 6 Wu A Z Shi Y Li M Wu Y Guan J Zhang H Wei Formal Kinematic Analysis of a General 6R Manipulator Using the Screw Theory Mathematical Problems in Engineering vol 2015 article ID 549797 7 Tsai LungWen Robot Analysis John Wiley and Sons 1999 8 Simaan Nabil Analysis and Synthesis of Parallel Robots for Medical Applications research thesis The Technion Israel Institute of Technology 1999 Problems 51 Suppose the location and orientation of a hand frame are expressed by the following matrix What is the effect of a differential rotation of 015 radians about the zaxis followed by a differential translation of 01 01 03 Find the new location of the hand RTH 0 0 1 2 1 0 0 7 0 1 0 5 0 0 0 1 52 As a result of applying a set of differential motions to frame T shown it has changed an amount dT as shown Find the magnitude of the differential changes made dx dy dz δx δy δz and the differential operator with respect to frame T T 1 0 0 5 0 0 1 3 0 1 0 8 0 0 0 1 dT 0 0 1 0 1 0 6 0 1 0 0 0 5 0 1 0 0 0 5 0 0 0 0 Differential Motions and Velocities 211 53 Suppose the following frame was subjected to a differential translation of d 1 0 0 5 units and a dif ferential rotation of δ 0 0 1 0 a What is the differential operator relative to the reference frame b What is the differential operator relative to the frame A A 0 0 1 10 1 0 0 5 0 1 0 0 0 0 0 1 54 The initial location and orientation of a robots hand are given by T1 and its new location and orien tation after a change are given by T2 a Find a transformation matrix Q that will accomplish this transform in the Universe frame b Assuming the change is small find a differential operator Δ that will do the same c By inspection find a differential translation and a differential rotation that constitute this operator T1 1 0 0 5 0 0 1 3 0 1 0 6 0 0 0 1 T2 1 0 0 1 4 8 0 1 0 1 3 5 0 1 0 6 2 0 0 0 1 55 Using the transformation matrix for a spherical robot a Differentiate proper elements of the matrix to develop a set of symbolic equations for the joint dif ferential motions of the robot and write the corresponding Jacobian Use the joint variables in r β γ order b For the robot the three components of the velocity of the hand frame are given here Find the cor responding three joint velocities at this instant x 0 05 unitssec y 0 1 unitssec z 0 05 units sec r 5 units β 45 γ 45 T Cβ Cγ Sγ Sβ Cγ rSβ Cγ Cβ Sγ Cγ Sβ Sγ rSβ Sγ Sβ 0 Cβ rCβ 0 0 0 1 56 The differential motions applied to a frame T1 described as D dxδyδz T and the resulting T2 posi tions and orientations of the end of a 3DOF robot are given The Jacobian is given too a Find the original frame T1 before the differential motions were applied to it b Find TΔ c Is it possible to achieve the same resulting change in T1 by performing the differential motions rel ative to the frame d Find the values of the joint differential motions for the three joints we will call them ds1 dθ2 dθ3 of the robot that caused the given frame change D 0 01 0 02 0 03 T2 0 03 1 0 02 4 97 1 0 03 0 8 15 0 0 02 1 9 9 0 0 0 1 J 5 10 0 3 0 0 0 1 1 Introduction to Robotics 212 57 A 3DOF robot is shown with joint variables l2 θ1 θ3 a Write three equations that describe its motions b Find the Jacobian of the robot in dpx dpy dα J dθ1 dl2 dθ3 c Find the inverse Jacobian of the robot 58 The hand frame of a robot and the corresponding Jacobian are given For the given differential changes of the joints compute the change in the hand frame its new location and the corresponding Δ T6 0 1 0 10 1 0 0 5 0 0 1 0 0 0 0 1 T 6J 8 0 0 0 0 0 3 0 1 0 0 0 0 10 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Dθ 0 0 1 0 1 0 2 0 2 0 59 Two consecutive frames describe the old T1 and new T2 positions and orientations of the end of a 3 DOF robot The corresponding Jacobian relative to T1 relating to T1dz T 1δx T 1δz is also given Find the values of the joint differential motions ds1 dθ2 dθ3 of the robot that caused the given frame change T 1 0 0 1 8 1 0 0 5 0 1 0 2 0 0 0 1 T2 0 0 01 1 8 1 1 0 05 0 5 0 05 1 0 01 2 0 0 0 1 T 1J 5 10 0 3 0 0 0 1 1 l1 l2 x y θ1 θ2 θ3 α Figure P57 Differential Motions and Velocities 213 510 Two consecutive frames describe the old T1 and new T2 positions and orientations of the end of a 3DOF robot The corresponding Jacobian relating to dz δx δz is also given Find the values of the joint differential motions ds1 dθ2 dθ3 of the robot that caused the given frame change T1 0 0 1 10 1 0 0 5 0 1 0 3 0 0 0 1 T2 0 05 0 1 9 75 1 0 1 0 05 5 2 0 1 1 0 3 7 0 0 0 1 J 5 10 0 3 0 0 0 1 1 511 A camera is attached to the hand frame T of a robot as given The corresponding inverse Jacobian of the robot at this location is also given The robot makes a differential motion as a result of which the change in the frame dT is recorded as given a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values associated with this move d Find how much the differential motions of the handframe TD should have been instead if meas ured relative to frame T to move the robot to the same new location as in part a T 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 0 03 0 0 1 0 79 0 0 03 0 0 09 0 0 1 0 0 4 0 0 0 0 512 A camera is attached to the hand frame T of a robot as given The corresponding inverse Jacobian of the robot relative to the frame at this location is also given The robot makes a differential motion as a result of which the change dT in the frame is recorded as given a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values Dθ associated with this move T 0 1 0 3 1 0 0 2 0 0 1 8 0 0 0 1 TJ 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 0 02 0 0 1 0 7 0 0 02 0 0 08 0 0 1 0 0 3 0 0 0 0 513 A camera is attached to the hand frame T6 of a robot as given The corresponding inverse Jacobian of the robot relative to the frame at this location is also given The robot makes a differential motion as a result of which the change dT in the frame is recorded as given You must show all your work a Find the new location of the camera after the differential motion b Find the differential operator c Find the joint differential motion values Dθ associated with this move Introduction to Robotics 214 T6 0 1 0 2 1 0 0 4 0 0 1 6 0 0 0 1 T 6J 1 1 0 0 0 0 0 2 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 dT 6 0 02 0 0 1 0 8 0 0 02 0 0 05 0 0 1 0 0 3 0 0 0 0 514 The Jacobian of a robot at a particular time is given Calculate the linear and angular differential motions of the robots hand frame for the given joint differential motions J 2 0 0 0 1 0 1 0 1 0 0 0 0 1 0 0 0 0 0 0 0 2 0 0 0 0 1 0 0 0 0 0 0 0 0 1 Dθ 0 0 1 0 1 0 0 0 02 515 The hand frame TH of a robot is given The corresponding inverse Jacobian of the robot at this location relative to this frame is also shown The robot makes a differential motion relative to this frame described as THD 0 05 0 0 1 0 0 1 0 1 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the frame c Find the new location of the frame after the differential motion d Find how much the differential motions given should have been if measured relative to the Universe to move the robot to the same new location as in part c T H 0 1 0 3 1 0 0 3 0 0 1 8 0 0 0 1 THJ 1 5 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 516 The hand frame T of a robot is given The corresponding inverse Jacobian of the robot at this location is also shown The robot makes a differential motion described as D 0 05 0 0 1 0 0 1 0 1 T a Find which joints must make a differential motion and by how much in order to create the indi cated differential motions b Find the change in the frame c Find the new location of the frame after the differential motion d Find how much the differential motions given should have been if measured relative to frame T to move the robot to the same new location as in part c Differential Motions and Velocities 215 T 0 1 0 3 1 0 0 3 0 0 1 8 0 0 0 1 J 1 5 0 0 0 0 0 2 0 1 0 0 0 0 0 2 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 517 Calculate the T6J21 element of the Jacobian for the revolute robot from Example 226 518 Calculate the T6J16 element of the Jacobian for the revolute robot from Example 226 519 Using Eq 234 differentiate proper elements of the matrix to develop a set of symbolic equations for the joint differential motions of a cylindrical robot and write the corresponding Jacobian 520 Using Eq 237 differentiate the proper elements of the matrix to develop a set of symbolic equations for the joint differential motions of a spherical robot and write the corresponding Jacobian 521 For a cylindrical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 01 insec α 005 radsec l 02 insec r 15 in α 30 l 10 in 522 For a spherical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 2 insec β 005 radsec γ 01 radsec r 20 in β 60 γ 30 523 For a spherical robot the three joint velocities are given for a corresponding location Find the three components of the velocity of the hand frame r 1 unitsec β 1 radsec γ 1 radsec r 5 units β 45 γ 45 524 For a cylindrical robot the three components of the velocity of the hand frame are given for a cor responding location Find the required three joint velocities that will generate the given hand frame velocity x 1insec y 3insec z 5insec α 45 r 20in l 25 in 525 For a spherical robot the three components of the velocity of the hand frame are given for a corre sponding location Find the required three joint velocities that will generate the given hand frame velocity x 5insec y 9 insec z 6insec β 60 r 20in γ 30 Introduction to Robotics 216 526 Calculate the Jacobian of the 3DOF robot shown The intermediate reference frame is placed at joint 2 527 For the robot from Problem 526 derive the direct joint velocity relationships 528 Derive the Jacobian of the 3RPR robot shown x l1 l2 l3 ˆs3 ˆs1 ˆs2 y θ1 θ2 θ3 z Figure P526 b a c1 c3 c2 n o θ x y A1 P A2 A3 O3 O2 O d3 d1 d2 c1 c2 c3 Figure P528 Differential Motions and Velocities 217 1 6 Dynamic and Force Analysis 61 Introduction In previous chapters we studied the kinematics of position and differential motions of robots In this chapter we look at the dynamics of serial robots as it relates to accelerations loads masses and inertias We also study the static force relationships of serial robots As you may remember from your dynamics course in order to be able to accelerate a mass we need to exert a force on it Similarly to cause an angular acceleration in a rotating body a torque must be exerted on it Figure 61 as F m a and T I α 61 To accelerate a robots links it is necessary to have actuators capable of exerting large enough forces and torques on the links and joints to move them at a desired acceleration and velocity Otherwise the links may not be moving as fast as necessary and consequently the robot may not maintain its desired positional accu racy To calculate how strong each actuator must be it is necessary to determine the dynamic relationships that govern the motions of the robot These relationships are the forcemassacceleration and the torque inertiaangularacceleration equations Based on these equations and considering the external loads on the robot the designer can calculate the largest loads to which the actuators may be subjected thereby designing the actuators that can deliver the necessary forces and torques In general the dynamic equations may be used to find the equations of motion of mechanisms This means that by knowing the forces and torques we can predict how a mechanism will move However in our case we have already found the equations of motion besides in all but the simplest cases solving the dynamic equa tions of multiaxis 3D robots is very complicated and involved Instead we use these equations to find what forces and torques may be needed to induce desired accelerations in the robots joints and links These equa tions are also used to analyze the effects of different inertial loads on the robot and depending on the desired accelerations whether certain loads are important As an example consider a robot in space Although objects are weightless in space they do have inertia As a result the weight of an object that a robot handles T F Σ Σ α m a I Figure 61 Forcemassacceleration and torqueinertiaangularacceleration relationships for a rigid body 219 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed in space may be trivial but its inertia is not As long as the movements are very slow a light robot may be able to move very large loads in space with little effort This is why the very slender robots used in the Space Shut tle program were able to handle very large satellites The dynamic equations allow the designer to investigate the relationship between different elements of the robot and design its components appropriately In general techniques such as Newtonian mechanics can be used to find the dynamic equations for robots However due to the fact that robots are 3D and multiDOF mechanisms with distributed masses it is very difficult to use Newtonian mechanics Instead we opt to use other techniques such as Lagrangian mechanics which is based on energy terms only and therefore in many cases is easier to use Although Newtonian mechanics and other techniques can be used for this derivation most references are based on Lagrangian mechanics In this chapter we briefly study Lagrangian mechanics with some examples and then we see how it can be used to solve for robot equations Since this is an introductory book these equations will not be completely derived only the results will be demonstrated and discussed Interested readers are encouraged to refer to other references for more detail 1 2 3 4 5 6 7 62 Lagrangian Mechanics A Short Overview Lagrangian mechanics is based on the differentiation of the systems energy terms with respect to the systems variables and time as follows For simple cases it may take longer to use this technique than Newtonian mechanics However as the complexity of the system increases the Lagrangian method becomes relatively simpler to use Lagrangian mechanics is based on the following two generalized equations one for linear motions and one for rotational motions First we define a Lagrangian as L K P 62 where L is the Lagrangian K is the kinetic energy of the system and P is the potential energy of the sys tem Then Fi t L xi L xi 63 Ti t L θi L θi 64 where Fi is the summation of all external forces Ti is the summation of all external torques and θi and xi are system variables As a result in order to get the equations of motion we need to derive the systems energy equations and differentiate the Lagrangian according to Eqs 63 and 64 The following five examples demonstrate the application of Lagrangian mechanics in deriving equations of motion Notice how the com plexity of the terms increases as the number of DOF and variables increases Example 61 Derive the forceacceleration relationship for the 1DOF system shown in Figure 62 using both Lagrangian mechanics as well as Newtonian mechanics Assume the wheels have negligible inertia k x F m Figure 62 Schematic of a simple cartspring system Introduction to Robotics 220 Solution The xaxis denotes the motion of the cart and is the only variable in this system Since this is a 1DOF system there is only one equation describing the motion Because the motion is linear we use only Eq 63 as follows K 1 2mv2 1 2mx2 and P 1 2kx2 L K P 1 2mx2 1 2kx2 The derivatives of the Lagrangian are L x mx and d dt mx mx and L x kx Therefore the equation of motion for the cart will be F mx kx To solve the problem with Newtonian mechanics we draw the freebody diagram of the cart Figure 63 and solve for forces as follows F ma F kx max F max kx which is exactly the same result For this simple system it appears that Newtonian mechanics is simpler Example 62 Derive the equations of motion for the 2DOF system shown in Figure 64 x kx mg R F ma Figure 63 Freebody diagram for the cartspring system θ k m1 m2 x l T F Figure 64 Schematic of a cartpendulum system Dynamic and Force Analysis 221 Solution In this problem there are 2 DOF two coordinates x and θ and two equations of motion one for the linear motion of the system and one for the rotation of the pendulum The kinetic energy of the system comprises the kinetic energies of the cart and the pendulum Notice that the velocity of the pendulum is the summation of the velocity of the cart and of the pendulum relative to the cart or vp vc vpc x i lθ cosθ i lθ sinθ j x lθ cosθ i lθ sinθ j and v2 p x lθcosθ 2 lθsinθ 2 We find K Kcart Kpendulum Kcart 1 2m1x2 Kpendulum 1 2m2 x lθcosθ 2 lθsinθ 2 K 1 2 m1 m2 x2 1 2m2 l2θ 2 2lθx cosθ Likewise the potential energy is the summation of the potential energy in the spring and in the pen dulum or P 1 2kx2 m2gl 1cosθ Notice that the zeropotentialenergy line datum is chosen at θ 0 The Lagrangian is L K P 1 2 m1 m2 x2 1 2m2 l2θ 2 2lθx cosθ 1 2kx2m2gl 1cosθ The derivatives and the equations of motion related to the linear motion are L x m1 m2 x m2lθ cosθ d dt L x m1 m2 x m2lθ cosθm2lθ 2 sinθ L x kx F m1 m2 x m2lθ cosθm2lθ 2 sinθ kx and for the rotational motion they are L θ m2l2θ m2lx cosθ d dt L θ m2l2θ m2lx cosθm2lxθ sinθ L θ m2glsinθm2lθx sinθ T m2l2θ m2lx cosθ m2gl sinθ Introduction to Robotics 222 If we write the two equations of motion in matrix form we get F m1 m2 x m2lθ cosθm2lθ 2 sinθ kx T m2l2θ m2lx cosθ m2glsinθ F T m1 m2 m2l cosθ m2l cosθ m2l2 x θ 0 m2l sinθ 0 0 x2 θ 2 kx m2gl sinθ 65 Example 63 Derive the equations of motion for the 2DOF system shown in Figure 65 Solution Notice that this example is somewhat more similar to a robot except that the mass of each link is assumed to be concentrated at the end of each link and there are only 2 DOF However in this example we will see many more acceleration terms as we would expect to see with robots including centripetal and Coriolis accelerations We follow the same format as before First we calculate the kinetic and potential energies of the sys tem as follows K K1 K2 where K1 1 2m1l1 2θ1 2 To calculate the kinetic energy of the mass at B first we write the position equation for m2 at B and subsequently we differentiate it for the velocity xB l1 sinθ1 l2 sin θ1 θ2 l1S1 l2S12 yB l1C1l2C12 xB l1C1θ1 l2C12 θ1 θ2 yB l1S1θ1 l2S12 θ1 θ2 θ1 θ2 x y l1 l2 m1 m2 o A B T1 T2 Figure 65 A twolink mechanism with concentrated masses Dynamic and Force Analysis 223 Since v2 x2 y2 we get v2 B l1 2θ1 2 S2 1 C2 1 l2 2 θ1 2 θ2 2 2θ1θ2 S2 12 C2 12 2l1l2 C1C12 S1S12 θ1 2 θ1θ2 l1 2θ1 2 l2 2 θ1 2 θ2 2 2θ1θ2 2l1l2C2 θ1 2 θ1θ2 The kinetic energy for the mass at B is K2 1 2m2l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 The total kinetic energy is K 1 2 m1 m2 l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 With the datum zero potential energy at point o the potential energy of the system can be written as P1 m1gl1C1 P2 m2gl1C1m2gl2C12 P P1 P2 m1 m2 gl1C1m2gl2C12 The Lagrangian for the system is L K P 1 2 m1 m2 l1 2θ1 2 1 2m2l2 2 θ1 2 θ2 2 2θ1θ2 m2l1l2C2 θ1 2 θ1θ2 m1 m2 gl1C1 m2gl2C12 The derivatives of the Lagrangian are L θ1 m1 m2 l1 2θ1 m2l2 2 θ1 θ2 2m2l1l2C2θ1 m2l1l2C2θ2 d dt L θ1 m1 m2 l1 2 m2l2 2 2m2l1l2C2 θ1 m2l2 2 m2l1l2C2 θ2 2m2l1l2S2θ1θ2m2l1l2S2θ2 2 L θ1 m1 m2 gl1S1m2gl2S12 From Eq 64 the first equation of motion is T1 m1 m2 l1 2 m2l2 2 2m2l1l2C2 θ1 m2l2 2 m2l1l2C2 θ2 2m2l1l2S2θ1θ2m2l1l2S2θ2 2 m1 m2 gl1S1 m2gl2S12 Introduction to Robotics 224 Similarly L θ2 m2l2 2 θ1 θ2 m2l1l2C2θ1 d dt L θ2 m2l2 2 θ1 θ2 m2l1l2C2θ1m2l1l2S2θ1θ2 L θ2 m2l1l2S2 θ1 2 θ1θ2 m2gl2S12 T2 m2l2 2 m2l1l2C2 θ1 m2l2 2θ2 m2l1l2S2θ1 2 m2gl2S12 Writing these two equations in matrix form we get T1 T2 m1 m2 l1 2 m2l2 2 2m2l1l2C2 m2l2 2 m2l1l2C2 m2l2 2 m2l1l2C2 m2l2 2 θ1 θ2 0 m2l1l2S2 m2l1l2S2 0 θ1 2 θ 2 2 m2l1l2S2 m2l1l2S2 0 0 θ1θ2 θ2θ1 m1 m2 gl1S1 m2gl2S12 m2gl2S12 66 First note how much more complicated and involved these equations of motion are compared to Example 62 Also note that in Eq 66 the θ terms are related to the angular accelerations of the links the θ 2 terms are centripetal accelerations and the θ1θ2 terms are Coriolis accelerations It should be mentioned here that the Coriolis acceleration was originally derived for cases where a linear motion occurs within a rotating frame consequently the direction of the linear velocity changes and creates the Coriolis term In this case although both velocities are angular nevertheless there is a motion within a rotating frame that causes the θiθj terms In this book as is also customary in avionics we refer to these terms as Coriolis acceleration In this example the first link acts as a rotating frame for link 2 and therefore Coriolis acceleration is present whereas in Example 62 the cart is not rotating and therefore there is no Coriolis acceleration Based on this we should expect to have multiple Cor iolis acceleration terms for a multiaxis 3D manipulator arm because each link acts as a rotating frame for the links succeeding it Example 64 Using the Lagrangian method derive the equations of motion for the 2DOF robot arm shown in Figure 66 The center of mass for each link is at the center of the link The moments of inertia are I1 and I2 Solution The solution of this example robot arm is in fact similar to the solution of Example 63 However in addition to a change in the coordinate frames the two links have distributed masses requiring the use of moments of inertia in the calculation of the kinetic energy We follow the same steps as before First we calculate the velocity of the center of mass of link 2 by differentiating its position xD l1C1 0 5l2C12 xD l1S1θ10 5l2S12 θ1 θ2 yD l1S1 0 5l2S12 yD l1C1θ1 0 5l2C12 θ1 θ2 Dynamic and Force Analysis 225 Therefore the total velocity of the center of mass of link 2 is v2 D x2 D y2 D θ2 1 l2 1 0 25l2 2 l1l2C2 θ2 2 0 25l2 2 θ1θ2 0 5l2 2 l1l2C2 67 The total kinetic energy of the system is the sum of the kinetic energies of links 1 and 2 Remembering that the kinetic energy for a link rotating about a fixed point for link 1 and about the center of mass for link 2 is given in Eq 68 we get K K1 K2 1 2IAθ2 1 1 2ID θ1 θ2 2 1 2m2v2 D 1 2 1 3m1l2 1 θ2 1 1 2 1 12m2l2 2 θ1 θ2 2 1 2m2v2 D 68 Substituting Eq 67 into Eq 68 and rearranging we get K θ 2 1 1 6m1l2 1 1 6m2l2 2 1 2m2l2 1 1 2m2l1l2C2 θ2 2 1 6m2l2 2 θ1θ2 1 3m2l2 2 1 2m2l1l2C2 69 The potential energy of the system is the sum of the potential energies of the two links P m1g l1 2 S1 m2g l1S1 l2 2 S12 610 The Lagrangian for the twolink robot arm is L K P θ 2 1 1 6m1l2 1 1 6m2l2 2 1 2m2l2 1 1 2m2l1l2C2 θ2 2 1 6m2l2 2 θ1θ2 1 3m2l2 2 1 2m2l1l2C2 m1g l1 2 S1m2g l1S1 l2 2 S12 Taking the derivatives of the Lagrangian and substituting the terms into Eq 64 yields the following two equations of motion A B m1 m2 l1 I1 l2 I2 x0 y0 y1 x1 C D θ2 θ1 T1 T2 Figure 66 A 2DOF robot arm Introduction to Robotics 226 T1 1 3m1l2 1 m2l2 1 1 3m2l2 2 m2l1l2C2 θ1 1 3m2l2 2 1 2m2l1l2C2 θ2 m2l1l2S2 θ1θ2 1 2m2l1l2S2 θ 2 2 1 2m1 m2 gl1C1 1 2m2gl2C12 611 T2 1 3m2l2 2 1 2m2l1l2C2 θ1 1 3m2l2 2 θ2 1 2m2l1l2S2 θ2 1 1 2m2gl2C12 612 Equations 611 and 612 can be written in matrix form as T1 T2 1 3m1l2 1 m2l2 1 1 3m2l2 2 m2l1l2C2 1 3m2l2 2 1 2m2l1l2C2 1 3m2l2 2 1 2m2l1l2C2 1 3m2l2 2 θ1 θ2 0 1 2m2l1l2S2 1 2m2l1l2S2 0 θ 2 1 θ 2 2 m2l1l2S2 0 0 0 θ1θ2 θ2θ1 1 2m1 m2 gl1C1 1 2m2gl2C12 1 2m2gl2C12 613 Example 65 Using the Lagrangian method derive the equations of motion for the 2DOF polar robot arm shown in Figure 67 The center of mass for each link is at the center of the link The moments of inertia are I1 and I2 Solution Note that in this case we have a prismatic joint We denote the distance from the base of the robot to the center of the outer arm as r which serves as one of the two variables The total length of the arm is r l22 As before we derive the Lagrangian and take the proper derivatives as follows θ1 A B m1 m2 l1 I1 l2 I2 x0 y0 C D r T1 F Figure 67 A 2DOF polar robot arm Dynamic and Force Analysis 227 K K1 K2 K1 1 2I1Aθ 2 1 2 1 3m1l1 2θ 2 1 6m1l1 2θ 2 xD rCθ xD rCθrθSθ yD rSθ yD rSθ rθCθ and v2 D r2 r2θ 2 K2 1 2I2Dθ 2 1 2m2v2 D 1 2 1 12m2l2 2θ 2 1 2m2 r2 r2θ 2 K 1 6m1l1 2 1 24m2l2 2 1 2m2r2 θ 2 1 2m2r2 P m1g l1 2 Sθ m2grSθ L 1 6m1l1 2 1 24m2l2 2 1 2m2r2 θ 2 1 2m2r2 m1g l1 2 m2gr Sθ d dt L θ 1 3m1l1 2 1 12m2l2 2 m2r2 θ 2m2rθ L θ m1g l1 2 m2gr Cθ T 1 3m1l1 2 1 12m2l2 2 m2r2 θ 2m2rrθ m1g l1 2 m2gr Cθ 614 d dt L r m2r L r m2rθ 2m2gSθ F m2r m2rθ 2 m2gSθ 615 Writing these two equations in matrix form we get T F 1 3m1l1 2 1 12m2l2 2 m2r2 0 0 m2 θ r 0 0 m2r 0 θ 2 r2 m2r m2r 0 0 rθ θr m1g l12 m2gr Cθ m2gSθ 616 Introduction to Robotics 228 63 Effective Moments of Inertia To simplify the writing of the equations of motion Eqs 65 66 613 or 616 can be rewritten in sym bolic form as follows Ti Tj Dii Dij Dji Djj θi θj Diii Dijj Djii Djjj θi 2 θ2 j Diij Diji Djij Djji θiθj θjθi Di Dj 617 In this equation which is written for a 2DOF system a coefficient in the form of Dii is known as the effective inertia at joint i such that an acceleration at joint i causes a torque at joint i equal to Diiθi A coefficient in the form Dij is known as the coupling inertia between joints i and j as an acceleration at joint i or j causes a torque at joint j or i equal to Dijθjor Djiθi Dijjθ2 j terms represent centripetal forces acting at joint i due to a velocity at joint j All terms with θiθj represent Coriolistype accelerations the influence of one rotating frame on another and when multiplied by corresponding inertias represent Coriolis forces The remaining terms in the form Di represent gravity forces at joint i 64 Dynamic Equations for MultipleDOF Robots As you see the dynamic equations for a 2DOF system are much more complicated than a 1DOF system Similarly these equations for a multipleDOF spatial robot are very long and complicated but can be found by calculating the kinetic and potential energies of the links defining the Lagrangian and differentiating the Lagrangian equation with respect to the joint variables The following is a summary of this procedure For more information see 1 2 3 4 5 6 7 641 Kinetic Energy As you may remember from your dynamics course 8 the kinetic energy of a rigid body in 3D motion Figure 68a is K 1 2mvG 2 1 2ω hG 618 where hG is the angular momentum of the body about G The kinetic energy of a rigid body in plane motion Figure 68b simplifies to K 1 2mvG 2 1 2Iω2 619 ω G hG ω G vG a b Figure 68 A rigid body in 3D motion and in plane motion Dynamic and Force Analysis 229 Therefore we need to derive expressions for the velocity of a point on a rigid body eg the center of mass G as well as the moments of inertia The velocity of a point on a robots link can be defined by differentiating the position equation of the point which in our notation is expressed by a frame relative to the robots base RTP Here we use the DH trans formation matrices Ai to find the velocity terms for points along the robots links In Chapter 2 we defined the transformation between the hand frame and the base frame of the robot in terms of the A matrices as RTH RT 1 1T2 2T3n1Tn A1A2A3An 2 55 For a 6axis robot this equation can be written as 0T 6 0T1 1T2 2T 35T6 A1A2A3A6 620 Referring to Eq 253 the derivative of an Ai matrix for a revolute joint with respect to its joint variable θi is Ai θi d θi Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 Sθi CθiCαi CθiSαi aiSθi Cθi SθiCαi SθiSαi aiCθi 0 0 0 0 0 0 0 0 621 This matrix can be broken into a constant matrix Qi and the Ai matrix such that Sθi CθiCαi CθiSαi aiSθi Cθi SθiCαi SθiSαi aiCθi 0 0 0 0 0 0 0 0 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 622 or Ai θi QiAi 623 Similarly the derivative of an Ai matrix for a prismatic joint with respect to its joint variable di is Ai di di Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 624 which as before can be broken into a constant matrix Qi and the Ai matrix such that 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 Cθi SθiCαi SθiSαi aiCθi Sθi CθiCαi CθiSαi aiSθi 0 Sαi Cαi di 0 0 0 1 625 or Ai θi QiAi 626 Introduction to Robotics 230 In both Eqs 623 and 626 the Qi matrices are always constant as shown and can be summarized as Qi revolute 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 Qi prismatic 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 627 Using qi to represent the joint variables θ1 θ2 for revolute joints and d1 d2 for prismatic joints and extending the same differentiation principle to the 0Ti matrix of Eq 620 with multiple joint variables θi and di differentiated with respect to only one variable qj results in Uij 0Ti qj A1A2 Aj Ai qj A1A2 QjAj Ai j i 628 Note that since 0Ti is differentiated only with respect to one variable qj there is only one Qj Higherorder derivatives can similarly be formulated from Uijk Uijqk 629 Lets see how this method works before we continue with this subject Example 66 Find the expression for the derivative of the transformation of the fifth link of the Stan ford arm relative to the base frame with respect to the second and third joint variables Solution The Stanford arm is a spherical robot where the second joint is revolute and the third joint is prismatic Therefore 0T5 A1A2A3A4A5 U52 0T5 θ2 A1Q2A2A3A4A5 U53 0T5 d3 A1A2Q3A3A4A5 where Q2 and Q3 are as defined in Eq 627 Example 67 Find an expression for U635 of the Stanford arm Solution 0T6 A1A2A3A4A5A6 U63 0T6 d3 A1A2Q3A3A4A5A6 U635 U63 q5 A1A2Q3A3A4A5A6 q5 A1A2Q3A3A4Q5A5A6 Dynamic and Force Analysis 231 We now continue with the derivation of the velocity term for a point on a link of a robot We denote ri to represent a point on any link i of the robot relative to frame i Notice that this length is measured relative to frame i as it becomes an important issue soon The position of the point can be expressed by premultiplying the vector with the transformation matrix representing its frame or pi RT iri 0Tiri 630 The velocity of the point is a function of the velocities of all the joints q1q2q6 Therefore differentiating Eq 630 with respect to all the joint variables qj yields the velocity of the point as vi d dt 0Tiri i j 1 0Ti qj dqj dt ri i j 1 Uij dqi dt ri 631 The kinetic energy of an element of mass dmi on a link is dKi 1 2 v2 i dmi 1 2 x2 i y2 i z2 i dmi 632 The velocity term can be formalized from the following vivT i xi yi zi xi yi zi xi 2 xiyi xizi yixi yi 2 yizi zixi ziyi zi 2 and Trace vivT i Trace xi 2 xiyi xizi yixi yi 2 yizi zixi ziyi zi 2 xi 2 yi 2 zi 2 633 Combining Eqs 631633 yields the following equation for the kinetic energy of the element dKi 1 2 Trace i p 1 Uip dqp dt ri i r 1 Uir dqr dt ri T dmi 634 where p and r represent the different joint numbers This allows us to add the contributions made to the final velocity of a point on any link i from other joints movements Integrating this equation and rearranging it yields the total kinetic energy as Ki dKi 1 2 Trace i p 1 i r 1 Uip riri T dmi Uir Tqpqr 635 Writing ri in terms of its coordinates relative to its frame we can derive the following terms ri xi yi zi 1 rT i xi yi zi 1 rirT i xi2 xiyi xizi xi xiyi yi2 yizi yi xizi yizi zi2 zi xi yi zi 1 Introduction to Robotics 232 Therefore riri T dmi xi yi zi 1 xi yi zi 1 dmi xi 2dmi xiyidmi xizidmi xidmi xiyidmi yi 2dmi yizidmi yidmi xizidmi yizidmi zi 2dmi zidmi xidmi yidmi zidmi dmi 636 Notice that the inertia tensor is usually a 3 3 tensor However as we have done throughout this book we use homogeneous matrices 4 4 or 4 1 to facilitate pre and postmultiplication Using a 4 1 position matrix in Eq 636 results in a 4 4 inertia matrix including first moments and the mass Therefore this is called a pseudo inertia matrix Through the following manipulations of Eq 636 it is possible to derive the pseudo inertia matrix as shown 2x2 x2 x2 y2y2 z2z2 x2 1 2 y2 z2 x2 z2 x2 y2 Ixx y2 z2 dm Iyy x2 z2 dm Izz x2 y2 dm Ixy xydm Ixz xzdm Iyz yzdm mx xdm my ydm mz zdm then x2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 Ixx Iyy Izz y2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 IxxIyy Izz z2dm 1 2 y2 z2 dm 1 2 x2 z2 dm 1 2 x2 y2 dm 1 2 Ixx IyyIzz Therefore Eq 636 can be written as Ji 1 2 Ixx Iyy Izz i Iixy Iixz mixi Iixy 1 2 IxxIyy Izz i Iiyz miyi Iixz Iiyz 1 2 Ixx IyyIzz i mizi mixi miyi mizi mi 637 Since this matrix is independent of joint angles and velocities it must be evaluated only once Substituting Eq 636 into Eq 635 results in the final form for kinetic energy of the robot manipulator as K 1 2 n i 1 i p 1 i r 1 Trace Uip Ji Uir T qpqr 638 Dynamic and Force Analysis 233 The kinetic energy of the actuators can also be added to this equation Assuming that each actuator has an inertia of Iiact the kinetic energy of the actuator will be 1 2Ii act qi 2 and the total kinetic energy of the robot is K 1 2 n i 1 i p 1 i r 1 Trace Uip Ji Uir T qpqr 1 2 n i 1 Ii act qi 2 639 642 Potential Energy The potential energy of the system is the sum of the potential energies of each link and can be written as P n i 1 Pi n i 1 mig T 0Tiri 640 where g T gx gy gz 0 is the gravity matrix and ri is the location of the center of mass of a link relative to the frame representing the link Obviously the potential energy must be a scalar quantity and therefore gT which is a 1 4 matrix when multiplied by the position vector 0Tiri which is a 4 1 matrix will yield a single scalar quantity Also notice that the values in the gravity matrix are dependent on the orientation of the reference frame 643 The Lagrangian The Lagrangian can be written as L K P 1 2 n i 1 i p 1 i r 1 Trace UipJiUir T qpqr 1 2 n i 1 Ii act qi 2 n i 1 mig T 0Tiri 641 644 Robots Equations of Motion The Lagrangian can now be differentiated in order to form the dynamic equations of motion Although this process is not shown the final equations of motion for a general multiaxis robot can be summarized as follows Ti n j 1 Dijqj Ii act qi n j 1 n k 1 Dijkqjqk Di 642 where Dij n p max ij Trace UpjJpU T pi 643 Dijk n p max ijk Trace UpjkJpU T pi 644 and Di n p i mpg TUpirp 645 Introduction to Robotics 234 In Eq 642 the first part is the angular accelerationinertia terms the second part is the actuator inertia term the third part is the Coriolis and centripetal terms and the last part is the gravity term This equation can be expanded for a 6axis revolute robot as follows Ti Di1θ1 Di2θ2 Di3θ3 Di4θ4 Di5θ5 Di6θ6 Ii act θi Di11θ 2 1 Di22θ 2 2 Di33θ 2 3 Di44θ 2 4 Di55θ 2 5 Di66θ 2 6 Di12θ1θ2 Di13θ1θ3 Di14θ1θ4 Di15θ1θ5 Di16θ1θ6 Di21θ2θ1 Di23θ2θ3 Di24θ2θ4 Di25θ2θ5 Di26θ2θ6 Di31θ3θ1 Di32θ3θ2 Di34θ3θ4 Di35θ3θ5 Di36θ3θ6 Di41θ4θ1 Di42θ4θ2 Di43θ4θ3 Di45θ4θ5 Di46θ4θ6 Di51θ5θ1 Di52θ5θ2 Di53θ5θ3 Di54θ5θ4 Di56θ5θ6 Di61θ6θ1 Di62θ6θ2 Di63θ6θ3 Di64θ6θ4 Di65θ6θ5 Di 646 Notice that in Eq 646 there are two terms with θ1θ2 and θ2θ1 The two coefficients are Di12 and Di21 To see what these terms look like lets calculate them for i 5 From Eq 644 for D512 we have i 5 j 1 k 2 n 6 p 5 and for D521 we have i 5 j 2 k 1 n 6 p 5 resulting in D512 Trace U512J5U T 55 Trace U612J6U T 65 D521 Trace U521J5U T 55 Trace U621J6U T 65 647 From Eq 628 we have U51 A1A2A3A4A5 θ1 Q1A1A2A3A4A5 U512 U 51 2 Q1A1A2A3A4A5 θ2 Q1A1Q2A2A3A4A5 U52 A1A2A3A4A5 θ2 A1Q2A2A3A4A5 U521 U 52 1 A1Q2A2A3A4A5 θ1 Q1A1Q2A2A3A4A5 648 U61 A1A2A3A4A5A6 θ1 Q1A1A2A3A4A5A6 U612 U 61 2 Q1A1A2A3A4A5A6 θ2 Q1A1Q2A2A3A4A5A6 U62 A1A2A3A4A5A6 θ2 A1Q2A2A3A4A5A6 U621 U 62 1 A1Q2A2A3A4A5A6 θ1 Q1A1Q2A2A3A4A5A6 Note that in these equations Q1 and Q2 are the same The indices are only used to clarify the relationship with the derivatives Substituting the result from Eq 648 into Eq 647 shows that D512 D521 Clearly the summation of the two similar terms yields the corresponding θ1θ2 acceleration terms This is true for all similar coefficients in Eq 646 Therefore we can simplify this equation for all joints as follows T1 D11θ1 D12θ2 D13θ3 D14θ4 D15θ5 D16θ6 I1 act θ1 D111θ 2 1 D122θ 2 2 D133θ 2 3 D144θ 2 4 D155θ 2 5 D166θ 2 6 2D112θ1θ2 2D113θ1θ3 2D114θ1θ4 2D115θ1θ5 2D116θ1θ6 2D123θ2θ3 2D124θ2θ4 2D125θ2θ5 2D126θ2θ6 2D134θ3θ4 2D135θ3θ5 2D136θ3θ6 2D145θ4θ5 2D146θ4θ6 2D156θ5θ6 D1 649 Dynamic and Force Analysis 235 T2 D21θ1 D22θ2 D23θ3 D24θ4 D25θ5 D26θ6 I2 act θ2 D211θ 2 1 D222θ 2 2 D233θ 2 3 D244θ 2 4 D255θ 2 5 D266θ 2 6 2D212θ1θ2 2D213θ1θ3 2D214θ1θ4 2D215θ1θ5 2D216θ1θ6 2D223θ2θ3 2D224θ2θ4 2D225θ2θ5 2D226θ2θ6 2D234θ3θ4 2D235θ3θ5 2D236θ3θ6 2D245θ4θ5 2D246θ4θ6 2D256θ5θ6 D2 650 T3 D31θ1 D32θ2 D33θ3 D34θ4 D35θ5 D36θ6 I3 act θ3 D311θ 2 1 D322θ 2 2 D333θ 2 3 D344θ 2 4 D355θ 2 5 D366θ 2 6 2D312θ1θ2 2D313θ1θ3 2D314θ1θ4 2D315θ1θ5 2D316θ1θ6 2D323θ2θ3 2D324θ2θ4 2D325θ2θ5 2D326θ2θ6 2D334θ3θ4 2D335θ3θ5 2D336θ3θ6 2D345θ4θ5 2D346θ4θ6 2D356θ5θ6 D3 651 T4 D41θ1 D42θ2 D43θ3 D44θ4 D45θ5 D46θ6 I4 act θ4 D411θ 2 1 D422θ 2 2 D433θ 2 3 D444θ 2 4 D455θ 2 5 D466θ 2 6 2D412θ1θ2 2D413θ1θ3 2D414θ1θ4 2D415θ1θ5 2D416θ1θ6 2D423θ2θ3 2D424θ2θ4 2D425θ2θ5 2D426θ2θ6 2D434θ3θ4 2D435θ3θ5 2D436θ3θ6 2D445θ4θ5 2D446θ4θ6 2D456θ5θ6 D4 652 T5 D51θ1 D52θ2 D53θ3 D54θ4 D55θ5 D56θ6 I5 act θ5 D511θ 2 1 D522θ 2 2 D533θ 2 3 D544θ 2 4 D555θ 2 5 D566θ 2 6 2D512θ1θ2 2D513θ1θ3 2D514θ1θ4 2D515θ1θ5 2D516θ1θ6 2D523θ2θ3 2D524θ2θ4 2D525θ2θ5 2D526θ2θ6 2D534θ3θ4 2D535θ3θ5 2D536θ3θ6 2D545θ4θ5 2D546θ4θ6 2D556θ5θ6 D5 653 T6 D61θ1 D62θ2 D63θ3 D64θ4 D65θ5 D66θ6 I6 act θ6 D611θ 2 1 D622θ 2 2 D633θ 2 3 D644θ 2 4 D655θ 2 5 D666θ 2 6 2D612θ1θ2 2D613θ1θ3 2D614θ1θ4 2D615θ1θ5 2D616θ1θ6 2D623θ2θ3 2D624θ2θ4 2D625θ2θ5 2D626θ2θ6 2D634θ3θ4 2D635θ3θ5 2D636θ3θ6 2D645θ4θ5 2D646θ4θ6 2D656θ5θ6 D6 654 Substituting the numerical values related to the robot in these equations yields the equations of motion for the robot These equations can also show how each term can affect the dynamics of the robot or whether a particular term is important or not For example in the absence of gravity such as in space the gravity terms may be neglected However inertia terms will be important On the other hand if a robot moves slowly many terms in these equations that relate to centripetal and Coriolis θjθk accelerations may be negligible In gen eral using these equations the robot can be properly designed and controlled Example 68 Using the previous equations derive the equations of motion for the 2DOF robot arm from Example 64 shown in Figure 69 The two links are assumed to be of equal length Solution To use the earlier equations of motion for a 2DOF robot we first write the A matrices for the two links and then we develop the Dij Dijk and Di terms for the robot Finally we substitute the results into Introduction to Robotics 236 Eqs 649 and 650 to get the final equations of motion The joint and link parameters of the robot are d1 0 d2 0 a1 a2 l α1 0 α2 0 A1 C1 S1 0 lC1 S1 C1 0 lS1 0 0 1 0 0 0 0 1 A2 C2 S2 0 lC2 S2 C2 0 lS2 0 0 1 0 0 0 0 1 0T2 A1A2 C12 S12 0 l C12 C1 S12 C12 0 l S12 S1 0 0 1 0 0 0 0 1 From Eq 627 Q revolute 0 1 0 0 1 0 0 0 0 0 0 0 0 0 0 0 From Eq 628 we have Uij 0 T i qj A1A2 Aj Ai qj A1A2 QjAj Ai Therefore U11 QA1 S1 C1 0 lS1 C1 S1 0 lC1 0 0 0 0 0 0 0 0 U111 QA1 θ1 QQA1 and U112 QA1 θ2 0 A θ1 θ2 B m1 m2 l I1 l I2 x0 y0 y1 x1 C D x2 y2 Figure 69 The 2DOF robot arm from Example 64 Dynamic and Force Analysis 237 U21 QA1A2 S12 C12 0 l S12 S1 C12 S12 0 l C12 C1 0 0 0 0 0 0 0 0 U211 QA1A2 θ1 QQA1A2 and U212 QA1A2 θ2 QA1QA2 U22 A1QA2 S12 C12 0 lS12 C12 S12 0 lC12 0 0 0 0 0 0 0 0 U221 A1QA2 θ1 QA1QA2 and U222 A1QA2 θ2 A1QQA2 U12 A1 θ2 0 From Eq 636 assuming that all products of inertia are zero we get J1 1 3m1l2 0 0 1 2m1l 0 0 0 0 0 0 0 0 1 2m1l 0 0 m1 J2 1 3m2l2 0 0 1 2m2l 0 0 0 0 0 0 0 0 1 2m2l 0 0 m2 Notice that since ri in Eq 636 is relative to its own frame the location of the center of mass relative to the frame is l2 As was mentioned earlier this is an important issue Measuring this length relative to frame 0 would involve components relative to x0 y0 and z0 whereas measuring it relative to frame 1 only requires a length in the x1 direction Consequently for terms requiring l there is a negative sign but for terms requiring l2 the term is positive From Eqs 649 and 650 for a 2DOF robot we get T1 D11θ1 D12θ2 D111θ2 1 D122θ2 2 2D112θ1θ2 D1 I1 act θ1 655 T2 D21θ1 D22θ2 D211θ2 1 D222θ2 2 2D212θ1θ2 D2 I2 act θ2 656 From Eqs 643645 we have D11 Trace U11J1U T 11 Trace U21J2U T 21 for i 1j 1p 12 D12 Trace U22J2U T 21 for i 1j 2p 2 D21 Trace U21J2U T 22 for i 2j 1p 2 D22 Trace U22J2U T 22 for i 2j 2p 2 D111 Trace U111J1U T 11 Trace U211J2U T 21 for i 1j 1k 1p 12 D122 Trace U222J2U T 21 for i 1j 2k 2p 2 D112 Trace U212J2U T 21 for i 1j 1k 2p 2 D211 Trace U211J2U T 22 for i 2j 1k 1p 2 D222 Trace U222J2U T 22 for i 2j 2k 2p 2 D212 Trace U212J2U T 22 for i 2j 1k 2p 2 D1 m1g TU11r1m2g TU21r2 for i 1p 12 D2 m1g TU12r1m2g TU22r2 for i 2p 12 Introduction to Robotics 238 Although forbiddingly long even for a 2DOF robot substituting all given matrices into these equations yields D11 1 3m1l2 4 3m2l2 m2l2C2 D12 D21 1 3m2l2 1 2m2l2C2 D22 1 3m2l2 D111 0 D112 D121 1 2m2l2S2 D122 1 2m2l2S2 D211 1 2m2l2S2 D212 0 D221 0 D222 0 and from Eq 645 for g T 0 g 0 0 because acceleration of gravity is in the minus direction of the yaxis and rT 1 rT 2 l2 0 0 1 because the center of mass of the bar is at l 2 we get D1 m1g TU11r1m2g TU21r2 m1 0 g 0 0 S1 C1 0 lS1 C1 S1 0 lC1 0 0 0 0 0 0 0 0 l 2 0 0 1 m2 0 g 0 0 S12 C12 0 l S12 S1 C12 S12 0 l C12 C1 0 0 0 0 0 0 0 0 l 2 0 0 1 and similarly for D2 we get D1 1 2m1glC1 1 2m2glC12 m2glC1 D2 1 2m2glC12 Substituting the results into Eqs 655 and 656 will result in the final equations of motion T1 1 3m1l2 4 3m2l2 m2l2C2 θ1 1 3m2l2 1 2m2l2C2 θ2 1 2m2l2S2 θ 2 2 m2l2S2 θ1θ2 1 2m1glC1 1 2m2glC12 m2glC1 I1 act θ1 T2 1 3m2l2 1 2m2l2C2 θ1 1 3m2l2 θ2 1 2m2l2S2 θ 2 1 1 2m2glC12 I2 act θ1 which except for the actuator inertia terms are the same as Eqs 611 and 612 65 Static Force Analysis of Robots Robots may be under either position control or force control Imagine a robot that is following a line say on the flat surface of a panel and is cutting a groove in the surface If the robot follows a prescribed path it is Dynamic and Force Analysis 239 under position control As long as the surface is flat and the robot is following the line on the flat surface the groove will be uniform However if the surface is not flat since the robot is following a given path it will either cut deeper into the surface or not cut deep enough Alternately suppose the robot were to measure the force it is exerting on the surface while cutting the groove If the force becomes too large or too small indicating that the tool is cutting too deep or not deep enough the robot could adjust the depth until it cuts uniformly In this case the robot is under force control Similarly suppose it is required that a robot tap a hole in a machine part The robot would need to exert a known axial force along the axis of the hole as well as rotate the tap by exerting a moment on it To be able to do this the controller would need to move the joints and rotate them at particular rates to create the desired forces and moments at the hand frame Collaborative robots need to assess the forces and torques they exert on their counterpart too whether another robot a part or a human If two robots are to work together to accomplish a task eg moving a large part together each one must sense and control the forces and torques that it exerts on the part When interacting with humans for example in shaking someones hand the robot must sense and control the exerted forces and torques by controlling its actuating forces or torques To relate the joint forces and torques to forces and moments generated at the hand frame of the robot 1 9 10 we define the following HF fx fy fz mx my mz T 657 where fx fy fz are the forces along the x y and zaxes of the hand frame and mx my mz are the moments about the x y and zaxes of the hand frame Similarly we define the following HD dx dy dz δx δy δz T 658 which are differential displacements and rotations about the x y and zaxes of the hand frame We also define similar entities for the joints as T T1 T2 T3 T4 T5 T6 T 659 which are the torques for revolute joints and forces for prismatic joints at each joint and Dθ dθ1 dθ2 dθ3 dθ4 dθ5 dθ6 T 660 which describe the differential movements at the joints either an angle for a revolute joint or a linear dis placement for a prismatic joint Using the method of virtual work 11 which indicates that the total virtual work at the joints must be the same as the total virtual work at the hand frame we get δW HF T HD T T Dθ 661 or that the forces and moments times the displacements at the hand frame are equal to the torques or forces times the displacements at the joints Notice that since work is a scalar we multiply HFT and TT a 1 6 matrix by the displacement matrices 6 1 matrices yielding a single scalar value Substituting the values we get the following for the lefthand side of Eq661 fx fy fz mx my mz dx dy dz δx δy δz fxdx fydy mzδz 662 Introduction to Robotics 240 However from Eq 525 we have T6D T6J Dθ or HD HJ Dθ Substituting this into Eq 661 results in HF T HJ Dθ T T Dθ HF T HJ T T 663 Referring to Appendix A this equation can be written as T HJ T HF 664 which indicates that the joint forces and moments can be determined from the desired set of forces and moments at the hand frame Since the Jacobian is already known from previous analysis for differential motions the controller can calculate the forces and moments at the joints and control the robot based on the desired values Force control of robots may also be accomplished through the use of sensors such as force and torque sen sors This includes robots that can feel the object they are handling and that can relay this information back to the controller or the master operator 12 We will discuss sensors in Chapter 10 We discussed collaborative robots in Chapter 1 and cooperative robots in Chapter 2 The previous discus sion can also be used in the control of these robots The robot can sense the resistive forces exerted on it by a human or another robot and either respond to it eg stop or adjust the forces and torques at the joints to not exceed preset values to avoid injuries to humans or damages to other robots parts or itself Example 69 The numerical value of the Jacobian of a sphericalRPY robot like the Stanford arm is given It is desired to apply a force of 1 lb along the zaxis of the hand frame as well as a moment of 20 lbin about the zaxis of the hand frame to drill a hole in a block Find the necessary joint forces and torques HJ 20 0 0 0 0 0 5 0 1 0 0 0 0 20 0 0 0 0 0 1 0 0 1 0 0 0 0 1 0 0 1 0 0 0 0 1 Solution Substituting the values given into Eq664 we get T HJ T HF T T1 T2 F3 T4 T5 T6 20 5 0 0 0 1 0 0 20 1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 1 0 0 0 0 0 0 0 1 0 0 1 0 0 20 20 20 0 0 0 20 Dynamic and Force Analysis 241 As you see for this instantaneous configuration of the robot and with its specific dimensions it is necessary to exert the indicated torques at the first second and sixth joints in order to create the desired force and torque at the hand frame There is no need for the third joint the prismatic joint to exert any force even though we want a force at the hand frame Can you visualize why Obviously as the configuration of the robot changes so does the Jacobian Therefore for continued exertion of the same force and moment at the hand frame as the robot moves the joint torques will have to change requiring continuous calculation of joint torques by the controller 66 Transformation of Forces and Moments between Coordinate Frames Suppose that a force and a moment are acting on an object both described relative to a reference frame The principle of virtual work can also be used to find an equivalent force and moment relative to another coordinate frame such that they will have the same effect on the object To do this we define F as forces and moments acting on the object and D as the displacements caused by these forces and moments also relative to the same reference frame as F T fxfyfzmxmymz 665 D T dxdydzδxδyδz 666 We also define BF to be the forces and moments acting on the object relative to a frame B and BD to be the displacements caused by these forces and moments also relative to frame B as BF T Bf xBf yBf zBmxBmyBmz 667 BD T BdxBdyBdzBδxBδyBδz 668 Since the total virtual work performed on the object in either frame must be the same then δW F T D BF T BD 669 Paul 1 has shown that displacements relative to the two frames are related to each other by the following relationship BD BJ D 670 Substituting Eq 670 into Eq 669 results in F T D BF T BJ D or F T BF T BJ 671 which can be rearranged to F BJ T BF 672 Paul 1 has also shown that instead of calculating the Jacobian with respect to frame B the forces and moments with respect to frame B can be directly found from the following equations Bf x n f Bf y o f Bf z a f Bmx n f P m Bmy o f P m Bmz a f P m 673 Introduction to Robotics 242 Using Eq 673 we can find equivalent forces and moments in different frames that have the same effect on an object Example 610 An object attached to a frame B is subjected to the forces and moments given relative to the reference frame Find the equivalent forces and moments in frame B F T 0 10 lb 0 0 0 20 lb in B 0 1 0 3 0 0 1 5 1 0 0 8 0 0 0 1 Solution From the information given we have f T 0100 mT 0020 PT 358 nT 001 oT 100 aT 010 f P i j k 0 10 0 3 5 8 i 80 j 0 k 30 f P m 80i10k From Eq 673 we get Bf x n f 0 Bf y o f 0 Bf z a f 10 Bf 0010 Bmx n f P m 10 Bmy o f P m 80 Bmz a f P m 0 Bm 10800 This means that a 10 lb force along the aaxis of frame B together with two moments of 10 lb in along the naxis and 80 lb in along the oaxis will have the same effect on the object as the original force and moment relative to the reference frame Does this match what you learned in your Statics course Figure 610 shows the two equivalent forcemoment systems x y z n o a fx mz Bfa Bmn Bmo Figure 610 Equivalent forcemoment systems in two different frames Dynamic and Force Analysis 243 67 Design Project You may want to continue with the analysis of your robot You will have to develop the dynamic equations of motion which enables you to calculate the power needed at each joint to move the robot at desired accel erations This information may be used for choosing the appropriate actuators as well as in controlling the robots motions Alternately since your robot will not be moving too fast you can calculate the toque needed at each joint by trying to find the worstcase situations for each joint For example try to model the robot with both links extended outward In this case the first actuator acting on the first joint experiences the largest load This estimate is not very accurate since we are eliminating all coupling inertia terms Coriolis accelerations and so on But as we discussed earlier under lowload conditions and with low velocities you can get a relatively acceptable estimate of the torques needed 68 Summary In this chapter we discussed the derivation of the dynamic equations of motion of robots These equations can be used to estimate the power needed at each joint to drive the robot with desired velocity and accel erations They can also be used to choose appropriate actuators for a robot Dynamic equations of multiDOF 3D mechanisms such as robots are complicated and at times very dif ficult to use As a result they are mostly used in simplified forms with simplifying assumptions As an exam ple we may determine the importance of a particular term and its contribution to the total torque or power needed by considering how large it is relative to other terms For instance we may determine the importance of Coriolis terms in these equations by knowing how large the velocity terms are Conversely the importance of gravity terms in space robots may be determined and if appropriate dropped from the equations of motion In the next chapter we discuss how a robots motions are controlled and planned in order to yield a desired trajectory References 1 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 2 Shahinpoor Mohsen A Robot Engineering Textbook Harper and Row Publishers NY 1987 3 Asada Haruhiko JJ E Slotine Robot Analysis and Control John Wiley and Sons NY 1986 4 Sciavicco Lorenzo B Siciliano Modeling and Control of Robot Manipulators McGrawHill NY 1996 5 Fu KS RC Gonzalez CSG Lee Robotics Control Sensing Vision and Intelligence McGrawHill 1987 6 Featherstone R The Calculation of Robot Dynamics Using ArticulatedBody Inertias The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 1330 7 Shahinpoor M Dynamics International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons NY 1988 pp 329347 8 Pytel Andrew J Kiusalaas Engineering Mechanics Dynamics 3rd edition Cengage Learning Inc 2010 9 Paul Richard CN Stevenson Kinematics of Robot Wrists The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3138 10 Whitney DE The Mathematics of Coordinated Control of Prosthetic Arms and Manipulators Transactions of ASME Journal of Dynamic Systems Measurement and Control 94G4 1972 pp 303309 11 Pytel Andrew J Kiusalaas Engineering Mechanics Statics 3rd edition Cengage Learning Inc 2010 12 Chicurel Marina Once More With Feeling Stanford Magazine MarchApril 2000 pp7073 Introduction to Robotics 244 Problems 61 Using Lagrangian mechanics derive the equations of motion for a cart with two tires under the cart as shown 62 Calculate the total kinetic energy of the link AB attached to a roller with negligible mass as shown 63 Derive the equations of motion for the 2link mechanism with distributed mass as shown 64 Write the equations that express U62 U35 U53 U623 and U534 for a 6axis cylindricalRPY robot in terms of the A and Q matrices 65 Using Eqs 649654 write the equations of motion for a 3DOF revolute robot and describe each term l I B C A m θ Vo x y Figure P62 k m F x r I r I Figure P61 x0 y0 m1 m2 x1 y1 l1 I1 l2 I2 O θ1 θ2 Figure P63 Dynamic and Force Analysis 245 66 Expand the D134 and D15 terms of Eq 649 in terms of their constituent matrices 67 An object is subjected to the following forces and moments relative to the reference frame Attached to the object is a frame which describes the orientation and the location of the object Find the equivalent forces and torques acting on the object relative to the current frame B 0 707 0 707 0 2 0 0 1 5 0 707 0 707 0 3 0 0 0 1 F T 100512200 N N m 68 In order to assemble two parts together one part must be pushed into the other with a force of 10 lb in the xaxis direction and 5 lb in the ydirection and be turned with a torque of 5 lb in along the xaxis direction The objects location relative to the base frame of a robot is described by RT0 Assuming that the two parts must be aligned together for this purpose find the necessary forces and moments that the robot must apply to the part relative to its hand frame RT0 0 0 707 0 707 4 1 0 0 6 0 0 707 0 707 3 0 0 0 1 Introduction to Robotics 246 7 Trajectory Planning 71 Introduction In the previous chapters we studied the kinematics and dynamics of serial and parallel robots This means that using the equations of motion of the robot we can determine where the robot will be if we have the joint variables or we can determine what the joint variables must be to place the robot at a desired position and orientation with a desired velocity Path and trajectory planning relates to the way a robot is moved from one location to another in a controlled manner In this chapter we study the sequence of movements that must be made to create a controlled motion between segments whether in a straight line or in sequential motions In practice precise motion requirements are intensive and require approximations It should be mentioned here that the principles and the analyses we will learn in this chapter also apply directly to cooperative robots mentioned in Chapter 2 These robots move in a coordinated manner with the motions of each related to the other when together they accomplish a task Therefore these principles are applied to both arms whether one is the master and the other is a slave or each is controlled independently 72 Path vs Trajectory A path is defined as the collection of a sequence of locations configurations a robot makes to go from one place to another without regard to the timing of these configurations A trajectory is the collection of the locations configurations with respect to time For example in Figure 71a the robot goes from point configuration A to point B to point C with equal intervals whereas in Figure 71b the intervals are not equal In this sequence the robot starts slower and accelerates to the middle then decelerates to stop at B etc Although the paths for both cases are exactly the same the trajectories are not because in case b the timing is different and therefore the robot is at different locations compared to case a at similar times In this chapter we are concerned with the trajectories instantaneous joint velocities and accelerations B C A B C A a b Figure 71 Sequential robot movements in a path versus trajectory 247 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed 73 JointSpace vs CartesianSpace Descriptions Consider a 6axis robot arm at a point A in space which is directed to move to another point B Using the inverse kinematic equations of the robot derived in Chapters 2 3 and 4 we may calculate the total joint displacements that the robot needs to make to get to the new location The joint values thus calculated can be used by the controller to drive the robot joints to their new values and consequently move the robot arm to its new position The description of the motion to be made by the robot with its joint values is called the jointspace description As we will see later in this case although the robot eventually reaches the desired position the motion between the two points is unpredictable Now assume that a straight line is drawn between points A and B and we intend to have the robot move from point A to point B in a straight line To do this it is necessary to divide the line into small portions as shown in Figure 72 and to move the robot through all intermediate points To accomplish this task at each intermediate location the robots inverse kinematic equations are solved a set of joint variables is calculated and the controller is directed to drive the robot to those values When all segments are completed the robot will be at point B as desired However in this case unlike the jointspace case discussed previously the resulting motion is known at all times The sequence of movements the robot makes is described in Cartesian space but is converted to jointspace values at each segment As is clear from this simple example the Car tesianspace description is much more computationally intensive than the jointspace description but yields a controlled and known path Both jointspace and Cartesianspace descriptions are very useful and are used in industry However each one has its own place Cartesianspace trajectories are very easy to visualize because humans operate in Cartesian space conse quently it is easy to imagine what the end effectors trajectory must be However Cartesianspace trajectories are computationally expensive and require a faster processing time for similar resolution than jointspace trajectories Additionally although it is easy to visualize the trajectory it is difficult to visually ensure that singularities will not occur For example consider the situation in Figure 73a If we are not careful we may specify a trajectory that requires the robot to run into itself or to reach a point outside of the work envel ope which of course is impossible and yields an unsatisfactory solution 1 2 This is true because it may be impossible to know whether the robot can actually reach a particular location and orientation before the motion is made Also as shown in Figure 73b the motion between two points may require an instantaneous change in the joint values we discussed why this may happen in Chapter 2 which is impossible to predict We may resolve some of these problems by specifying via points through which the robot must pass to avoid obstacles and other similar singularities x y z A B Figure 72 Sequential motions of a robot to follow a straight line Introduction to Robotics 248 74 Basics of Trajectory Planning To understand the basics of planning a trajectory in joint space and Cartesian space lets consider a simple 2 DOF robot mechanism As shown in Figure 74 we intend to move the robot from point A to point B The configuration of the robot at point A is shown with α 20 and β 30 Suppose it has been calculated that in order for the robot to be at point B it must be at α 40 and β 80 Also suppose that both joints of the robot can move at a maximum rate of 10 degreessec One way to move the robot from point A to B is to run both joints at their maximum angular velocities This means that after two seconds the lower link of the robot will have finished its motion while the upper link continues for another three seconds as shown in Figure 74 The trajectory of the end of the robot is also shown As indicated the path is irregular and the individual distances traveled by the robots end are not uniform Now suppose that the motions of both joints of the robot are normalized such that the joint with smaller motion moves proportionally slower and both joints start and stop their motion simultaneously as shown in Figure 75 In this case both joints move at different speeds but move continuously together α changes 4 degreessecond while β changes 10 degreessecond resulting in a different trajectory Notice that the seg ments of the movement are more similar to each other but the path is still irregular and different from x y z a b Figure 73 Cartesianspace trajectory problems a The trajectory specified in Cartesian coordinates may force the robot to run into itself b the trajectory may require a sudden change in the joint angles o x y 1 2 3 5 4 6 A α α B 20 30 40 40 40 40 30 40 50 60 70 80 0 1 2 3 4 5 Time sec β β Figure 74 Jointspace nonnormalized movements of a 2DOF robot Trajectory Planning 249 the previous case Both of these cases were planned in joint space as we were only concerned with the values of the joints not the location of the end of the mechanism Now suppose we want the robots hand to follow a known path between points A and B say in a straight line The simplest solution would be to draw a line between points A and B divide the line into say five equal segments and solve for necessary angles α and β at each point as shown in Figure 76 This is a simple inter polation between points A and B 3 4 5 Notice that in this case the path is a straight line but the joint angles are not uniformly changing Although the resulting motion is a straight and consequently known trajec tory it is necessary to solve for the joint values at each point Obviously many more points must be calculated for better accuracy with so few segments the robot will not exactly follow the straight lines at each segment In this case the trajectory is in Cartesian space but the joints are calculated and controlled in joint space In this case it is assumed that the robots actuators have enough power to provide the large torques nec essary to accelerate and decelerate the joints as needed For example notice that we are assuming the arm will be instantaneously accelerated to have the desired velocity right at the beginning of the motion in segment 1 If this is not true the robot will follow a trajectory different from our assumption it will be slightly behind as it accelerates to the desired speed Additionally note how the difference between some consecutive values is larger than the maximum specified joint velocity of 10sec eg between points 1 and 2 β changes 26 Obvi ously this is not attainable Also note how in this case joint 1 moves downward first before moving up To improve the situation we may divide the path differently by starting to move the arm in smaller seg ments and as we speed up going at a constant cruising rate and finally decelerating with smaller segments as we approach point B This is schematically shown in Figure 77 Of course we still need to solve the inverse kinematic equations of the robot at each point which is similar to the previous case However in this case x 1 2 3 4 5 6 A B 20 24 28 32 36 40 30 40 50 60 70 80 0 1 2 3 4 5 Time sec y α α β β Figure 75 Jointspace normalized movements of a robot with 2 DOF x 1 2 3 4 5 6 A B y 20 13 15 19 28 40 30 56 69 78 82 80 0 1 2 3 4 5 Time sec α α β β Figure 76 Cartesianspace movements of a 2DOF robot Introduction to Robotics 250 instead of dividing the straight line AB into equal segments we may divide it based on x 1 2at2 until we attain the cruising velocity of v at Similarly the end portion of the motion can be divided based on a decelerating regimen Another variation on this trajectory planning is to plan a path that is not straight but one that follows some desired path for example a quadratic equation To do this the coordinates of each segment are calculated based on the desired path and are used to calculate joint variables at each segment therefore the trajectory of the robot can be planned for any desired path So far we have only considered the movement of the robot between two points A and B However in other cases the robot may be going through many consecutive points including intermediate or via points The next level of trajectory planning is between multiple points and eventually for continuous movement Assume the robot is to go from point A to B and then to C as shown in Figure 78 One way to run the robot is to accelerate from point A toward point B cruise decelerate and stop at B start again at B and accelerate toward C cruise and decelerate to stop at C This stopandgo approach creates jerky motions with unnec essary stops An alternative way is to blend the two portions of the motion at point B such that the robot approaches B decelerates if necessary follows the blended path accelerates once again toward C and even tually stops at C This creates a much more graceful motion reduces the stress on the robot and requires less energy If the motion consists of more segments all intermediate segments can be blended together Notice how due to this blending of the segments the robot goes through a different point B Figure 78a and not B If it is necessary that the robot goes through point B exactly then a different point B must be specified such that after blending the robot still goes through point B Figure 78b Another alternative 2 is to specify two 1 2 6 7 A B x y 4 3 5 20 16 15 13 15 25 32 37 30 40 50 59 70 80 81 80 1 2 3 4 5 6 7 8 8 α α β β Figure 77 Trajectory planning with an accelerationdeceleration regimen A B C B y x B C B y x A a b Figure 78 Blending of different motion segments in a path Trajectory Planning 251 via points C and D before and after point B as shown in Figure 79 such that B falls on the straightline portion of the motion between the via points to ensure that the robot goes through B In the following sections we discuss different methods of trajectory planning in more detail Generally higherorder polynomials are used to match positions velocities and accelerations at each point between two segments When the path is planned the controller uses the path information coordinates in calculat ing joint variables from the inverse kinematic equations and runs the robot accordingly Ultimately if the path of the robot is very complicated and involved such that it cannot be easily expressed by an equation it may become necessary to physically move the robot by hand and record the motions at each joint The recorded joint values can be used later to run the robot This is commonly done to teach tasks such as spray painting of automobiles seam welding of complicated shapes and other similar tasks to a robot 75 JointSpace Trajectory Planning In this section we will see how the motions of a robot can be planned in joint space with controlled char acteristics The reason for planning a trajectory in joint space is that the robots motions clearly result from joint movements actuated by motors A motor should be able to provide the accelerations and velocities needed to control joint movements Consequently it makes sense to use the Cartesianspace information about the trajectory to plan the movements of each joint in a controlled manner A number of different schemes such as polynomials of different orders and linear functions with parabolic blends can be used for this purpose The following is a discussion of some of these schemes used in joint space trajectory planning Notice that these schemes specify joint values not Cartesian values We discuss Cartesian space later 751 ThirdOrder Polynomial Trajectory Planning In this application the initial location and orientation of the robot are known using the inverse kinematic equations the final joint angles for the desired position and orientation are found However the motions of each joint of the robot must be planned individually Therefore consider one of the joints which at the begin ning of the motion segment at time ti is at θi we want the joint to move to a new value of θf at time tf One way to do this is to use a polynomial to plan the trajectory such that the initial and final boundary conditions match what we already know namely that θi and θf are known and the velocities at the beginning and the end of the motion segment are also known or are zero These four pieces of information allow us to solve for four unknowns or a thirdorder polynomial in the form of θ t c0 c1t c2t2 c3t3 71 B C B B C E D y y x x A A Figure 79 An alternative scheme for ensuring that the robot goes through a specified point during blending of motion segments Two via points C and D are picked such that B falls on the straightline section of the segment ensuring that the robot passes through B Introduction to Robotics 252 where the initial and final conditions are or are assumed to be θ ti θi θ tf θf θ ti 0 θ tf 0 72 Taking the first derivative of the polynomial from Eq 71 we get θ t c1 2c2t 3c3t2 73 Substituting the initial and final conditions into Eqs 71 and 73 yields θ ti c0 θi θ tf c0 c1tf c2tf 2 c3tf 3 θ ti c1 0 θ tf c1 2c2tf 3c3tf 2 0 74 which can also be written in matrix form as θi θi θf θf 1 0 0 0 0 1 0 0 1 tf tf 2 tf 3 0 1 2tf 3tf 2 c0 c1 c2 c3 75 By solving these four equations simultaneously we can find the constants This allows us to calculate the joint position at any interval of time which can be used by the controller to drive the joint to the specified position The same process must be used for each joint individually but they are all driven together from start to finish Obviously if the initial and final velocities are not zero the given values can be used in these equa tions Therefore applying this thirdorder polynomial to each joint motion creates a motion profile that can be used to drive each joint If more than two points are specified such that the robot will go through the points successively the final velocities and positions at the conclusion of each segment can be used as the initial values for the next seg ments Similar thirdorder polynomials can be used to plan each section However although positions and velocities are continuous accelerations are not which may cause problems Example 71 We intend to have the first joint of a 6axis robot go from an initial angle of 30 to a final angle of 75 in 5 seconds Using a thirdorder polynomial calculate the joint angle at 1 2 3 and 4 seconds Solution Substituting the boundary conditions into Eq 74 we get θ ti c0 30 θ tf c0 c1 5 c2 52 c3 53 75 θ ti c1 0 θ tf c1 2c2 5 3c3 52 0 c0 30 c1 0 c2 5 4 c3 0 72 Trajectory Planning 253 This results in the following cubic polynomial equation for position as well as the velocity and accel eration equations for joint 1 θ t 30 5 4t20 72t3 θ t 10 8t2 16t2 θ t 10 84 32t Substituting the desired time intervals into the equation of motion results in θ 1 34 68 θ 2 45 84 θ 3 59 16 θ 4 70 32 The joint angles velocities and accelerations are shown in Figure 710 Notice that in this case the acceleration needed at the beginning of the motion is 108sec2 as well as 108sec2 deceleration at the conclusion of the motion Example 72 Suppose the robot arm from Example 71 is to continue to the next point where the joint is to reach 105 in another 3 seconds Draw the position velocity and acceleration curves for the motion Solution At the conclusion of the first segment we know the position and velocity of the joint Using these values as initial conditions for the next segment we get θ t c0 c1t c2t2 c3t3 θ t c1 2c2t 3c3t2 θ t 2c2 6c3t where at ti 0 θi 75 θi 0 at tf 3 θf 105 θf 0 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 710 Joint positions velocities and accelerations for Example 71 Introduction to Robotics 254 from which we find c0 75 c1 0 c2 10 c3 2 222 θ t 75 10t22 222t3 θ t 20t6 666t2 θ t 20 13 332t Figure 711 shows the positions velocities and accelerations for the entire motion The boundary conditions are as specified However notice that although the velocity curve is continuous the slope of the velocity curve changes from negative to positive at the intermediate point creating an instan taneous change in acceleration jerk Whether the robot is capable of creating such accelerations or not is a question that must be answered depending on the robots capabilities To ensure that the robots accelerations will not exceed its capabilities acceleration limits may be used to calculate the necessary time to reach the target In that case for θi 0 and θf 0 the maximum acceleration is 4 θ max 6 θf θi tf ti 2 from which the timetotarget can be calculated You should also notice that the velocity at the intermediate point does not have to be zero In that case the concluding velocity at the intermediate point will be the same as the initial velocity of the next segment These values must be used in calculating the coefficients of the thirdorder polynomial 752 FifthOrder Polynomial Trajectory Planning In the previous section we encountered accelerations that may be impossible to achieve during motion trajectories therefore we may need to specify maximum accelerations as well Specifying the initial and 30 0 30 60 90 120 0 1 2 3 4 5 6 7 8 Seconds Position Velocity Acceleration Figure 711 Joint positions velocities and accelerations for Example 72 Trajectory Planning 255 ending positions velocities and accelerations of a segment yields six pieces of information enabling us to use a fifthorder polynomial to plan a trajectory as follows θ t c0 c1t c2t2 c3t3 c4t4 c5t5 76 θ t c1 2c2t 3c3t2 4c4t3 5c5t4 77 θ t 2c2 6c3t 12c4t2 20c5t3 78 These equations allow us to calculate the coefficients of a fifthorder polynomial with position velocity and acceleration boundary conditions Example 73 Repeat Example 71 but assume maximum initial acceleration and final deceleration are 5sec2 Solution From Example 71 and the given accelerations we have θi 30 θi 0 sec θi 5 sec2 θf 75 θf 0 sec θf 5 sec2 Using Eqs 7678 with the given initial and final boundary conditions we get c0 30 c1 0 c2 2 5 c3 1 6 c4 0 58 c5 0 0464 This results in the following motion equations θ t 30 2 5t2 1 6t30 58t4 0 0464t5 θ t 5t 4 8t22 32t3 0 232t4 θ t 5 9 6t6 96t2 0 928t3 Figure712showsthepositionvelocityandaccelerationgraphsforthejointThemaximumaccelerationis 87sec2 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 712 Joint positions velocities and accelerations for Example 73 Introduction to Robotics 256 753 Linear Segments with Parabolic Blends A simple alternative for jointspace trajectory planning is to run the joints at constant speed between the initial and final locations as we discussed in Section 74 This is equivalent to a firstorder polynomial where the velocity is constant and acceleration is zero However this also means that at the beginning and at the end of the motion segment accelerations must be infinite in order to create instantaneous velocities at the bound aries To prevent this the linear segment can be blended with parabolic sections at the beginning and at the end of the motion segment creating a continuous position and velocity as shown in Figure 713 Assuming that the initial and the final positions are θi and θf at times ti 0 and tf and that the parabolic segments are symmet rically blended with the linear section at blending times tb and tf tb we can write θ t c0 c1t 1 2c2t2 θ t c1 c2t θ t c2 79 Obviously in this scenario acceleration is constant for the parabolic sections yielding a continuous veloc ity at the common points called knot points A and B Substituting the boundary conditions into the par abolic equation segment yields θ t 0 θi c0 θ t 0 0 c1 θ t c2 c0 θi c1 0 c2 θ This results in parabolic segments in the form θ t θi 1 2c2t2 710 θ t c2t 711 θ t c2 712 Clearly for the linear segment the velocity is constant and can be chosen based on the physical capabilities of the actuators Substituting zero initial velocity a constant known joint velocity ω in the linear portion and Time Position 0 tb t tftb tf A B θf θi θ θi Figure 713 Scheme for linear segments with parabolic blends Trajectory Planning 257 zero final velocity in Eq711 we find the joint positions and velocities for points A and B and the final point as follows θA θi 1 2c2t2 b θA c2tb ω θB θA ω tf tb tb θA ω tf 2tb θB θA ω θf θB θAθi θf 0 713 The necessary blending time tb can be found from Eq 713 c2 ω tb θf θi c2t2 b ω tf 2tb θf θi ω tb t2 b ω tf 2tb 714 From Eq 714 we calculate the blending time as tb θiθf ωtf ω 715 Obviously tb cannot be bigger than half of the total time tf which results in a parabolic speedup and a parabolic slowdown with no linear segment A corresponding maximum velocity of ωmax 2 θf θi tf can be found from Eq 715 It should be mentioned here that if for any segment the initial time is not zero but ta to simplify the mathematics we can always shift the time axis by ta to make the initial time zero The final parabolic segment is symmetrical with the initial parabola but with a negative acceleration and therefore it can be expressed as follows θ t θf 1 2c2 tf t 2 where c2 ω tb θ t θf ω 2tb tf t 2 θ t ω tb tf t θ t ω tb 716 Example 74 Joint 1 of the 6axis robot from Example 71 is to go from an initial angle of θi 30 to the final angle of θf 70 in 5 seconds with a cruising velocity of ω1 10 sec Find the necessary time for blending and plot the joint positions velocities and accelerations Introduction to Robotics 258 Solution From Eqs 710712 715 and 716 we get tc θiθf ω1tf ω1 3070 10 5 10 1 sec For θ θi to θA θ 30 5t2 θ 10t θ 10 For θ θAto θB θ θA 10 t1 θ 10 θ 0 For θ θBto θf θ 705 5t 2 θ 10 5t θ 10 Figure 714 shows the position velocity and acceleration graphs for this joint 754 Linear Segments with Parabolic Blends and Via Points Suppose there is more than one motion segment such that at the conclusion of the first segment the robot will continue to move on to the next point either another via point or the destination As we discussed earlier we would like to blend the motion segments together to prevent stopandgo motions In this case too we know where the robot is at time t0 and using the inverse kinematic equations of the robot we can calculate the joint angles at via points and at the end of the motion To blend the motion segments together we use the boundary conditions of each point to calculate the coefficients of the parabolic segments As an example at the beginning of the motion we know the velocity and position of the joint At the conclusion of the first segment the position and velocity must be continuous This will be the boundary condition for the via point and consequently a new segment can be calculated The process continues until all segments are calculated and the destination is reached Obviously for each motion segment a new tb must be calculated based on the given joint velocity We should also check to make sure that maximum allowable accelerations are not exceeded 20 0 20 40 60 80 0 1 2 3 4 5 Seconds Position Velocity Acceleration Figure 714 Position velocity and acceleration graphs for joint 1 from Example 74 Trajectory Planning 259 755 HigherOrder Trajectories When in addition to the initial and final destination points other via points including liftoff and setdown points are specified we may match the positions velocities and accelerations of the two segments at each point to plan one continuous trajectory Incorporating the initial and final boundary conditions together with this information enables us to use higherorder polynomials in the form θ t c0 c1t c2t2 cn1tn1 cntn 717 such that the trajectory passes through all specified points However solving a highorder polynomial for each joint requires extensive calculations Instead it is possible to use combinations of lowerorder polyno mials for different segments of the trajectory and blend them together to satisfy all required boundary con ditions 6 including a 434 trajectory a 353 trajectory and a 5cubic trajectory to replace a seventhorder polynomial For example for a 434 trajectory a fourthorder polynomial is used to plan a trajectory between the initial point and the first via point eg liftoff a thirdorder polynomial is used to plan a tra jectory between two via points eg lift off to setdown and another fourthorder polynomial is used to plan the trajectory between the last via point eg setdown and the final destination Similarly a 353 trajectory may be planned between the initial and the first via point between the successive via points and between the last via point and the final destination Note that we must solve for four coefficients for a thirdorder polynomial five coefficients for a fourth order polynomial and six coefficients for a fifthorder polynomial Both 434 and 353 trajectories require solving for a total of 14 coefficients For the 434 trajectory the 14 unknown coefficients are in the form θ t 1 a0 a1t a2t2 a3t3 a4t4 θ t 2 b0 b1t b2t2 b3t3 θ t 3 c0 c1t c2t2 c3t3 c4t4 718 However there are also 14 boundary and blending conditions available that can be used to solve for all unknown coefficients and to plan the trajectory 1 Initial position of θ1 is known 2 Initial velocity may be specified 3 Initial acceleration may be specified 4 Position of the first via point θ2 is known and is the same as the final position of the first fourth order segment 5 The first via points position is the same as the initial position of the thirdorder segment for continuity 6 Continuous velocity must be maintained at the via point 7 Continuous acceleration must be maintained at the via point 8 Position of a second and other via point θn is specified and is the same as the final position of the thirdorder segment 9 Position of the second and other via point is the same as the initial position of the next segment for continuity 10 Continuous velocity must be maintained at the next via point 11 Continuous acceleration must be maintained at the next via point 12 Position of destination θf is specified 13 Velocity of the destination is specified 14 Acceleration of the destination is specified A similar set of requirements may be specified for the 353 trajectory We denote time t as the global normalized variable for the whole motion and τj as specific local time variables for each segment j We also assume the local initial starting time τji for each segment is zero and the local final ending time τjf for each segment is specified This means that all segments start at a local time zero and end at a specified given local Introduction to Robotics 260 time where the next segment starts at its local time τji 0 Based on this the 434 segments and their deri vatives can be written as follows 1 The first fourthorder segment at local time τ1 0 yields the initial known position of θ1 θ1 a0 719 2 The starting velocity at τ1 0 for the first segment is known Therefore θ1 a1 720 3 The starting acceleration at τ1 0 for the first segment is known Thus θ1 2a2 721 4 The position of the first via point θ2 at the conclusion of the first segment at local time τ1f is known Consequently θ2 a0 a1 τ1f a2 τ1f 2 a3 τ1f 3 a4 τ1f 4 722 5 The position of the first via point must be the same as the initial position of the thirdorder pol ynomial at time τ2 0 Thus θ2 b0 723 6 Continuous velocity must be maintained at the via point Therefore a1 2a2 τ1f 3a3 τ1f 2 4a4 τ1f 3 b1 724 7 Continuous acceleration must be maintained at the via point Thus 2a2 6a3 τ1f 12a4 τ1f 2 2b2 725 8 The position of a second via point θ3 at the conclusion of the thirdorder segment at time τ2f is specified Consequently θ3 b0 b1 τ2f b2 τ2f 2 b3 τ2f 3 726 9 For continuity the position of the via point θ3 must be the same as the initial position of the next segment at τ3 0 Thus θ3 c0 727 10 Continuous velocity must be maintained at the via point Thus b1 2b2 τ2f 3b3 τ2f 2 c1 728 11 Continuous acceleration must be maintained at the via point Therefore 2b2 6b3 τ2f 2c2 729 12 The position of destination at the conclusion of the last segment τ3f is specified as θf Thus θ4 c0 c1 τ3f c2 τ3f 2 c3 τ3f 3 c4 τ3f 4 730 Trajectory Planning 261 13 Velocity of the destination at the conclusion of the last segment at time τ3f is specified Consequently θ4 c1 2c2 τ3f 3c3 τ3f 2 4c4 τ3f 3 731 14 Acceleration of the destination at the conclusion of the last segment at time τ3f is specified Therefore θ4 2c2 6c3 τ3f 12c4 τ3f 2 732 Equations 719732 can be rewritten in matrix form as θ1 θ1 θ1 θ2 θ2 0 0 θ3 θ3 0 0 θ4 θ4 θ4 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ1f τ1f 2 τ1f 3 τ1f 4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 1 2τ1f 3τ1f 2 4τ1f 3 0 1 0 0 0 0 0 0 0 0 0 2 6τ1f 12τ1f 2 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ2f τ2f 2 τ2f 3 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 1 2τ2f 3τ2f 2 0 1 0 0 0 0 0 0 0 0 0 0 2 6τ2f 0 0 2 0 0 0 0 0 0 0 0 0 0 0 1 τ3f τ3f 2 τ3f 3 τ3f 4 0 0 0 0 0 0 0 0 0 0 1 2τ3f 3τ3f 2 4τ3f 3 0 0 0 0 0 0 0 0 0 0 0 2 6τ3f 12τ3f 2 a0 a1 a2 a3 a4 b0 b1 b2 b3 c0 c1 c2 c3 c4 733 or θ M C and C M 1 θ 734 The unknown coefficients can be found from Eq 734 by calculating M 1 Therefore the equations of motion for the three segments are known and the joint can be driven accordingly The same must be done for all other joints A similar approach may be taken to calculate the coefficients for the other combinations such as the 353 trajectory or the 5cubic trajectory 6 Example 75 A robot is to be driven from an initial position through two via points before it reaches its final destination using a 434 trajectory The positions velocities and time duration for the three segments for one of the joints are given Determine the trajectory equations and plot the position velocity and acceleration graphs for the joint θ1 30 θ1 0 θ1 0 τ1i 0 τ1f 2 θ2 50 τ2i 0 τ2f 4 θ3 90 τ3i 0 τ3f 2 θ4 70 θ4 0 θ4 0 Introduction to Robotics 262 Solution We can calculate the unknown coefficients of the three segments by substituting the given values directly into the matrices of Eq 733 or into Eqs 719732 and solving the resulting set of equa tions This results in a0 30 b0 50 c0 90 a1 0 b1 20 477 c1 13 81 a2 0 b2 0 714 c2 9 286 a3 4 881 b3 0 833 c3 9 643 a4 1 191 c4 2 024 The three segments are θ t 1 30 4 881t31 191t4 0 t 2 θ t 2 50 20 477t 0 714t20 833t3 0 t 4 θ t 3 9013 81t9 286t2 9 643t32 024t4 0 t 2 Figure 715 shows the angular position velocity and acceleration graphs of this joint for the given motion based on the 434 trajectory 756 Other Trajectories Many other schemes may also be used to plan trajectories This includes bangbang trajectories square and trapezoidal acceleration profile trajectories sine function trajectories other polynomials and other functions to plan a trajectory For more information about these and other possibilities please refer to the references at the end of this chapter 76 CartesianSpace Trajectories As discussed through simple examples in Section 74 Cartesianspace trajectories relate to the motions of a robot relative to the Cartesian reference frame as expressed by the position and orientation of the robots 20 0 20 40 60 80 100 0 1 2 3 4 5 6 7 8 Seconds Position Velocity Acceleration Figure 715 The position velocity and acceleration curves for the motion of the joint in Example 75 based on a 434 trajectory Trajectory Planning 263 hand In addition to simple straightline trajectories many other schemes may be deployed to drive the robot in its path between different points In fact all of the schemes used for jointspace trajectory planning also can be used for Cartesianspace trajectories The basic difference is that for Cartesian space the joint values must be repeatedly calculated through the inverse kinematic equations of the robot This means that unlike the jointspace schemes in which the generated values relate directly to joint values in Cartesianspace planning the calculated values from the functions are positions and orientations of the hand and they must still be converted to joint values through the inverse kinematic equations This can be simplified into a computer loop as follows 1 Increment the time by t t Δt 2 Calculate the position and orientation of the hand based on the selected function for the trajectory 3 Calculate the joint values for the position and orientation through the inverse kinematic equations of the robot 4 Send the joint information to the controller 5 Go to the beginning of the loop Straightline motions between points are the most practical trajectories for industrial applications How ever blending the motions for multiple destinations such as via points is also very common To accomplish a straightline trajectory the transformation between the initial and final positions and orientations must be calculated and divided into small segments The total transformation R between the initial configuration Ti and final configuration Tf can be calculated as follows Tf TiR T 1 i Tf T 1 i TiR R T 1 i Tf 735 At least three different alternatives may be used to convert this transformation into small segments 1 Since we want to have a smooth straightline transformation between the initial and final locations we want a large number of very small segments This in reality creates a large number of differential motions 3 Using the equations developed for differential motions in Chapter 3 we can relate the position and orientation of the hand frame at each new segment to the differential motions the Jacobian and joint velocities by D JDθ and Dθ J 1D dT Δ T Tnew Told dT This technique requires extensive calculations and only works if the inverse Jacobian exists 2 The transformation between the initial and final locations R can be decomposed into a trans lation and two rotations The translation involves moving the origin of the frame from the initial position to the final position The first rotation is to align the hand frame to the desired orientation and the second rotation is to rotate the hand frame about its own axis to the final orientation 2 3 6 All three transformations are executed simultaneously 3 The transformation between the initial and final locations can be decomposed into a translation and one rotation about an axis q The translation involves moving the origin of the frame from the initial position to the final position The rotation is to align the hand frame to the final desired orientation 2 3 6 Both transformations are executed simultaneously Figure 716 Introduction to Robotics 264 For more information about Cartesianspace trajectory planning refer to references 710 at the end of this chapter The robot programming language used with OmronAdept robots is called V Two common commands for moving the robot from one point P1 to another point P2 are MOVE P2 and MOVES P2 The MOVE command instructs the controller to simultaneously move all robot joints to go to point P2 This motion is in joint space and the path of the robot is the result of the corresponding joint movements The MOVES command for move in straight line instructs the controller to move in a straight line in Cartesian space by dividing the motion into many small segments Additionally the robot may be moved with a teach pendant in the Joint coordinate where only one joint moves at a time in World coordinate where the end effector moves along the reference frame axes or in Tool coordinate where the end effector moves along the axes of a frame attached to the end effector In the last two modes all joints move simultaneously to accomplish the requested motion Similarly the commands CPOFF and CPON allow the user to turn off or on a Continuous Path feature where either the consecutive motions are blended together into a continuous path or each segment is exe cuted individually by stopping at the end of the segment and starting again with the next segment Figure 717 shows the result of turning the continuous path on or off for two similar cases x y z o n a o n a o n a q Figure 716 Transformation between initial and final locations in Cartesianspace trajectory planning The motion can be decomposed into a translation and a rotation about an axis q Starting point Without blending With blending Starting point Without blending With blending Figure 717 With the continuous path on or off the resulting motion differs depending on the start point Trajectory Planning 265 Example 76 A 2DOF planar robot is to follow a straight line between the start point 310 and the end point 814 of the motion segment Find the joint variables for the robot if the path is divided into 10 sections Each link is 9 inches long Solution The straight line between the start and the end points in Cartesian space can be described by m y14 x8 1410 83 0 8 or y 0 8x 7 6 The coordinates of the intermediate points can be found by simply dividing the differences between the x and the y values of the start and end points The angles for the two joints are then found for each intermediate point The results are shown in Table 71 and Figure 718 Table 71 The coordinates and joint angles for Example 76 x y θ1 θ2 1 3 10 188 109 2 35 104 19 1040 3 4 108 195 1004 4 45 112 202 958 5 5 116 213 909 6 55 12 225 857 7 6 124 241 801 8 65 128 26 742 9 7 132 282 678 10 75 136 308 607 11 8 14 339 528 0 20 40 60 80 100 120 1 6 11 Trajectory segment number Degrees Joint 1 Joint 2 Figure 718 The joint positions for the robot in Example 76 Introduction to Robotics 266 Example 77 A 3DOF robot designed for lab experimentation at Cal Poly has two links each 9 inches long As shown in Figure 719 the coordinate frames of the joints are such that when all angles are zero the arm is pointed upward The inverse kinematic equations of the robot are also given We want to move the robot from point 9610 to point 358 along a straight line Find the angles of the three joints for each intermediate point and plot the results θ1 tan1 PxPy θ3 cos1 PyC1 2 Pz 8 2162 162 θ2 cos1 C1 Pz 8 1 C3 PyS3 18 1 C3 C1 Solution In this exercise we divide the distance between the start and end points into 10 segments although in reality it is divided into many more sections The coordinates of each intermediate point are found by dividing the distance between the initial and end points into 10 equal parts The inverse kinematic equations are used to calculate the joint angles for each intermediate point as shown in Table 72 The joint angles are shown in Figure 720 77 Continuous Trajectory Recording In some operations such as spray painting and deburring the motions required to accomplish a task may be either too complicated or too intricate to be generated by straight lines or other higherorder polynomials Instead it is possible to teach the robot how to move record the motions and later replay the motions and execute them To do this imagine that a robot can be moved by an operator in the same fashion required to accomplish a task in real time This can be done either by releasing the joint brakes and physically moving the robot or by moving the joints of a robot model that is similar to the real one but is much lighter and can be moved easily In either case the joint values are continuously sampled in time and are recorded throughout the motion Later by playing back the sampled data and driving the robot joints accordingly the robot is 8 2 9 2 9 y z x xU yU zU z0 x0 x1 z1 z2 x2 z3 z4 x3 x4 Figure 719 Robot from Example 77 and its coordinate frames Trajectory Planning 267 forced to follow the same trajectory that was recorded and perform the task as planned can you tell whether the system records the path or the trajectory Obviously this technique is simple and requires little programming or calculations However all motions must be accurately performed sampled and recorded for accurate playback Additionally every time a part of the motion needs to be changed the robot must be programmed again This is particularly difficult for large heavy robots especially if they are larger than a human operator 78 Design Project You may continue with either design project you started in the previous chapters Here you may run your robot based on any or all of the methods we discussed in this chapter Of course this is only possible if you Table 72 The hand frame coordinates and joint angles for the robot in Example 77 Px Py Pz θ1 θ2 θ3 9 6 10 563 272 1047 84 59 98 549 254 1092 78 58 96 534 238 1136 72 57 94 516 224 1179 66 56 92 497 212 1219 6 55 9 475 201 1258 54 54 88 45 193 1295 48 53 86 422 187 133 42 52 84 389 184 1363 36 51 82 352 185 1394 3 5 8 31 189 1422 0 20 40 60 80 100 120 140 160 1 2 3 4 5 6 7 8 9 10 11 Intermediate point number Degrees Joint 3 Joint 1 Joint 2 Figure 720 Joint angles for Example 77 Introduction to Robotics 268 make the robot and you can control the joints as needed In Chapter 9 we discuss actuators which enable you to select appropriate actuators for your robot and run it In that case you may start with simpler trajectories and continue with more sophisticated ones As an example you may first run your robot in a simple pointto point mode Next divide the path between the two or more destination points into a small number of seg ments and then continue with increasingly more segments until an acceptable straightline motion is achieved You may also try jointspace trajectoryplanning methods such as linear segments with parabolic blends or 434 polynomials As you continue with this you will realize that trajectory planning is a very interesting part of creating a robot It is in trajectory planning that you may create a robot that is more than just a mechanism that moves in space 79 Summary In this chapter we learned how a robot is actually moved in a predictable manner Without an appropriately planned trajectory the robots motions are not predictable It may collide with other objects go through undesirable points or be inaccurate Trajectories may be planned in joint space in Cartesian space or both Trajectories in each space may be planned through a number of different methods Many of these methods may actually be used for both the Cartesian space and the joint space However although Cartesianspace trajectories are more realistic and can be visualized more easily they are more difficult to calculate and plan Obviously a specific path such as a straightline motion must be planned in Cartesian space to be straight But if the robot is not to follow a specific path jointspace trajectories are easier to calculate and generate In the next chapter we will discuss how a robot may be controlled References 1 Brady M JM Hollerbach TL Johnson T LozanoPerez MT Mason editors Robot Motion Planning and Control MIT Press Cambridge Mass 1982 2 Craig John J Introduction to Robotics Mechanics and Control 4th ed Pearson Education 2017 3 Eman KF SooHun Lee JC Cesarone Trajectories in International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons New York 1988 pp 17961810 4 Patel RV Z Lin Trajectory Planning in International Encyclopedia of Robotics Applications and Automation Richard C Dorf editor John Wiley and Sons New York 1988 pp 18101820 5 Selig JM Introductory Robotics Prentice Hall 1992 6 Fu K S RC Gonzales CSG Lee Robotics Control Sensing Vision and Intelligence McGrawHill New York 1987 7 Paul Richard P Robot Manipulators Mathematics Programming and Control The MIT Press 1981 8 Tsai LungWen Robot Analysis John Wiley and Sons 1999 9 Portman Vladimir Mechanics of Accuracy in Engineering Design of Machines and Robots volume 1 ASME Press 2018 10 Derby Stephen Simulating Motion Elements of GeneralPurpose Robot Arms The International Journal of Robotics Research vol 2 no 1 spring 1983 pp 312 Problems 71 The 2DOF planar robot shown in Figure P71 with 10inch arms starts at θ1 20 and θ2 20 with a destination at θ1 50 and θ2 80 The maximum angular velocity of each joint is θ 10sec Derive the equations of motion of the robot and calculate and plot the locations of the end of the robot for each second if both joints move at their maximum speed Trajectory Planning 269 72 Repeat Problem 71 but assume the joint movements are normalized to start and stop at the same time 73 It is desired to have the first joint of a 6axis robot go from an initial angle of 30 to a final angle of 70 in 3 seconds Calculate the coefficients for a thirdorder polynomial jointspace trajectory Determine the joint angles velocities and accelerations at one two and three seconds It is assumed that the robot starts from rest and stops at its destination 74 It is desired to have the third joint of a 6axis robot go from an initial angle of 20 to a final angle of 80 in 4 seconds Calculate the coefficients for a thirdorder polynomial jointspace trajectory and plot the joint angles velocities and accelerations The robot starts from rest but should have a final velocity of 5sec 75 It is desired to have the second joint of a 6axis robot go from an initial angle of 0 to a final angle of 90 in 1 second Calculate the coefficients for a thirdorder polynomial jointspace trajectory Determine the joint angles velocities and accelerations at 01 02 05 and 09 seconds It is assumed that the motion starts at 5sec and stops at the end of the motion 76 Repeat Problem 75 but plot the position velocity and acceleration versus time 77 The second joint of a 6axis robot is to go from an initial angle of 20 to an intermediate angle of 80 in 5 seconds and continue to its destination of 25 in another 5 seconds Calculate the coefficients for thirdorder polynomials in joint space Plot the joint angles velocities and accelerations Assume the joint stops at intermediate points 78 A fifthorder polynomial is to be used to control the motions of the joints of a robot in joint space Find the coefficients of a fifthorder polynomial that will allow a joint to go from an initial angle of 0 to a final joint angle of 75 in 3 seconds while the initial and final velocities are zero and initial acceleration and final decelerations are 10sec2 79 Joint 1 of a 6axis robot is to go from an initial angle of θi 30 to the final angle of θf 120 in 4 seconds with a cruising velocity of ω1 30sec Find the necessary blending time for a trajectory with linear segments and parabolic blends and plot the joint positions velocities and accelerations 710 A robot is to be driven from an initial position through two via points before it reaches its final des tination using a 434 trajectory The positions velocities and time duration for the three segments for one of the joints are given Determine the trajectory equations and plot the position velocity and acceleration curves for the joint x0 z0 y0 θ2 θ1 Figure P71 Introduction to Robotics 270 θ1 20 θ1 0 θ1 0 τ1i 0 τ1f 1 θ2 60 τ2i 0 τ2f 2 θ3 100 τ3i 0 τ3f 1 θ4 40 θ4 0 θ4 0 711 A 2DOF planar robot is to follow a straight line in Cartesian space between the start point 26 and the end point 123 of the motion segment Find the joint variables for the robot if the path is divided into 10 sections Each link is 9 inches long 712 The 3DOF robot from Example 77 as shown in Figure 718 is to move from point 3 5 5 to point 3 5 5 along a straight line divided into 10 sections Find the angles of the three joints for each inter mediate point and plot the results Trajectory Planning 271 1 8 Motion Control Systems 81 Introduction Imagine that the controller of a robot sends a signal to one of the actuators to accelerate to the next location Even with a feedback signal to stop the motion as soon as the joint reaches the desired destination the joint may overshoot and go beyond the desired value requiring that a negative signal be sent to the actuator to return it perhaps multiple times until the position is achieved accurately At worst with an unstable system the oscillations may become larger not smaller and eventually destroy the system This happens due to the inertia of the actuator and the linkage attached to it which continue moving even when the signal is turned off Obviously it should be possible to decrease the signal current voltage and so on to the actuator and slow it down as it approaches the destination in order to avoid overshoot But how early and at what rate should we do this How do we make certain the system does not become unstable Can we force the actuator to reach the destination as fast as we desire without overshoot and if so at what rate All these are basic questions that are answered by designing a control system that behaves as desired In this chapter we learn about fundamental definitions building blocks and the theory of motion control systems and how they may apply to robots We continue to refer to this chapter as we discuss actuators and sensors later What we cover in this chapter is not and cannot be complete The assumption is that you either have had a course on control theory or that you will eventually learn it elsewhere Instead we present an intro duction so that a student who has not learned the material yet will be able to understand how motion control theory is applied to robots Please refer to other sources for more complete treatment of the subject 1 2 3 4 5 6 7 8 9 82 Basic Components and Terminology Figure 81 shows the basic components of a control system A control system is used to change control the behavior of a device machine or process called a plant The plant may be an air conditioning system a chemical process an iron a robot and so on In each case the plant creates an effectan output such as the changing temperature of the room or the iron the flow rate in the chemical process or the motion of the robot arm To perform its function the control system uses sensors such as a thermostat a flowmeter or a potentiometer and encoder to measure the output of the plant The controller receives the output signal as its own input signal and based on its design controls the plant and its output the desired temperature in a room or on an iron the rate of flow or the final destination of the robot linkage and its speed Note that there is a difference between the nature of different controllers In the air conditioning system or the iron the controller regulates the output In the robot it tracks the motions and controls their specification This is called a servocontroller system 273 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed An openloop controller lacks a feedback signal and is not aware of the output For example as we discussed in Chapter 1 a robots processor calculates the destinations joint variables and sends the information to the controller If the robot controller were openloop it might send a signal to a joint motor proportional to how far it needs to go but not be aware of whether or not the joint moves at the desired rate With a closedloop controller that includes feedback the controller will receive a signal from the joint indicating its response to the control signal If the motion is not as desired the controller increases or decreases the control signal to force the arm to behave as desired Figure 81 also shows a summing operation between the feedback signal and the input reference signal As you see the feedback signal is subtracted from the reference input signal resulting in an error signal The error signal is the driving signal for the controller For a stable system the feedback signal must be subtracted from the input reference signal Otherwise if they are added the resulting signal becomes larger as the output increases further increasing the output until the system blows up To better understand the relationship between the different elements of a control system lets first consider the behavior of a plant or the systems dynamics 83 Block Diagrams The pictorial representation of a control system depicted in Figure 81 is called a block diagram It assists us in visualizing the relationship between different elements of the system such as the plant the signals the con troller the feedback loop and others Figure 82 shows the simplest block representing a system with its input and output Although the actual system in each block is not shown the relationship between the input and output of the block is represented by an equation As long as this relationship is known the details of the block are not needed for analysis The block diagram also shows how the signals flow between different ele ments and how they are used Later we use block diagrams to represent systems and derive mathematical relationships that govern them 84 System Dynamics A plants behavior is a function of its physical characteristics and external influences and how they are related to each other For example when an iron is connected to a power source it starts to heat up The rate at which the iron heats up is a function of factors such as voltage the resistance of the heating element and how the Controller Sensor Output Input reference Error signal Plant Feedback signal Σ Figure 81 Basic components of a control system G Input Output Figure 82 A simple block diagram Introduction to Robotics 274 element is attached to the body as well as a function of the heat capacity of the iron and the materials used Would you expect that without a control element the iron would eventually melt due to increased temper ature Perhaps But as the irons temperature increases the heat it dissipates also increases until eventually a balance may be achieved Therefore the behavior of the iron is a function of its heat capacity the input power rate of heat dissipation and materials used Similarly if a voltage is applied to a motor the angular acceleration of the rotor is a function of the voltage and the inertia of the rotor However if the same motor is attached to an arm such as a robot arm or a fan blade the moment of inertia of the arm also affects the angular acceleration of the rotor Therefore in this case too the systems behavior is a function of the input voltage the moments of inertia of the rotor and the arm and other physical factors The relationship between these elements is called system dynamics which are represented by the plant in Figure 81 A systems dynamics are generally represented by differential equations and must be known before a control scheme can be designed for the system Although superficially it may appear that mechanical electrical hydraulic chemical and pneumatic sys tems are very different they can be represented with differential equations that are very similar in nature Systems generally include inertia stiffness damping and external forcing functions that can be represented by similar equations and therefore in most cases are equivalent Consequently the control of a system whether mechanical electrical chemical process hydraulic or any combination thereof involves the same procedures and basic theory Referring to Example 61 and Figures 62 and 63 repeated here when a force is applied to the mechanical massspring system the mass moves in relation to Eq 81 This equation represents both the systems dynamic response to the input force and the plant in Figure 81 A controller may be used to control this response based on the elements in Figure 81 As the controller applies a force and the mass moves a sensor measures the movements and feeds back the signal to the controller which in turn adjusts the force to achieve the desired motion F ma Fxkx mx Fx mx kx 81 Similarly consider the rotor of a motor with its inertia and damping Figure 83 The response of the rotor to the torque generated by the magnetic field and the magnets can be represented as T Iθ b θ 82 We will discuss this in more detail in Chapter 7 k x F m Figure 62 Repeated x kx mg R F ma Figure 63 Repeated Motion Control Systems 275 Example 81 Derive the equations that describe the behavior of the mechanical and electrical systems in Figure 84 and compare the results Solution The equation representing the mechanical system can be derived by drawing the freebody diagram as shown in Figure 85 md2x dt2 bdx dt kx F 83 Using Kirchhoffs laws we derive the equation representing the electrical circuit as Ldi dt Ri 1 C idt e 84 Substituting i dq dt in Eq 84 we get Ld2q dt2 Rdq dt 1 C q e 85 Im Iθ bθ Tm Figure 83 Representation of the dynamic behavior of a motor e C R L i k m F x b Figure 84 A mechanical system and an electrical system m kx F mx bx R mg Figure 85 Freebody diagram for Example 81 Introduction to Robotics 276 Note how the terms in Eqs 83 and 85 are similar This indicates that these two systems behave similarly and that the elements in each system are equivalent The similarity between these elements is summarized in Table 81 Similarly Table 82 shows the forcecurrent equivalents between mechanical and electrical systems Similar differential equations can also be derived for hydraulic thermal and pneumatic systems Example 82 Figure 86 shows a simple hydraulic lift As we see later when a feedback system is added to the hydraulic valve the same basic system can be used in a hydraulic robot to move the joints Table 81 Forcevoltage analogy between mechanical and electrical systems Mechanical systems Electrical systems Force F or torque T Mass m or moment of inertia J Viscous coefficient of friction b Spring constant k Displacement x or angular displacement θ Velocity x or angular velocity θ Voltage e Inductance L Resistance R Reciprocal of capacitance 1C Charge q Current i Table 82 Forcecurrent analogy between mechanical and electrical systems Mechanical systems Electrical systems Force F or torque T Mass m or moment of inertia J Viscous coefficient of friction b Spring constant k Displacement x or angular displacement θ Velocity x or angular velocity θ Current i Capacitance C Reciprocal of resistance 1R Reciprocal of inductance 1L Magnetic flux linkage Voltage e Supply Return Return Load Hydraulic valve x y Figure 86 Representation of a hydraulic lift Motion Control Systems 277 As the valve stem is pushed down the pressurized hydraulic fluid is pushed into the lower chamber of the hydraulic ram lifting the load and pushing out the oil above the piston through the return line and vice versa x and y represent the motions of the valve stem and the piston The rate of flow q of the fluid through the valve and into the cylinder which is proportional to x equals the rate of change of volume of the cylinder under the piston which is equal to the piston veloc ity times the area Therefore the behavior of the system can be represented by the following firstorder differential equation q Cx A d dty y C Ax 85 Laplace Transform The differential equations describing the behavior of a system may not always be easy to analyze Transform ing a differential equation ft in the time domain into Fs in the Laplace domain allows us to analyze the equation algebraically Later through an inverse Laplace transform we get solutions in the time domain as becomes clear soon The following is an introduction to the Laplace transform The Laplace transform Fs is defined as f t F s 0 estdt f t 0 f t estdt 86 where s σ jω To see how this is done we derive the Laplace transform for a step function f t 0 for t 0 A for t 0 87 Substituting Eq 87 into Eq 86 we get A F s 0 Aestdt A s est 0 A s 88 For a unit step function A 1 this reduces to F s 1 s Similarly the Laplace transform for a ramp function defined next is f t 0 for t 0 At for t 0 At 0 At estdt At s est 0 0 Aest s dt A s 0 estdt A s 1 s A s2 89 A sinusoidal function defined next can be transformed into the Laplace domain as follows f t 0 fort 0 A sin ωt for t 0 Introduction to Robotics 278 where ejωt cos ωt j sin ωt ejωt cos ωtj sin ωt Therefore sinωt 1 2j ejωt ejωt and A sinωt 0 A 2j ejωt ejωt estdt A 2j 1 sjω 1 s jω Aω s2 ω2 810 In general Laplace transform equations are tabulated and may be used directly from a table 9 Table 83 lists a few select Laplace transforms that are commonly used in controls For more functions refer to refer ences 1 4 5 9 The last three equations in Table 83 representing the derivatives of functions are very useful As shown when the initial conditions for a function are zero the Laplace transform of the first and second derivatives of Table 83 Laplace transform pairs ft Fs Unit impulse 1 Step Au t A s Ramp At A s2 tn n 1 sn 1 e αt 1 s α sinωt ω s2 ω2 cosωt s s2 ω2 eαt sinωt ω s α 2 ω2 eαt cosωt s α s α 2 ω2 kf t kF s f1 t f2 t F1 s F2 s f t sF s f 0 f t s2F s sf 0 f 0 f n t snF s sn1f 0 f n1 0 Motion Control Systems 279 a function are sFs and s2Fs Therefore for a variable x F s x sF s and x s2F s As mentioned earlier the Laplace transform simply reduces a differential equation into an algebraic equation Example 83 Figure 84 and Eq 83 from Example 81 show a massspringdamper system and the differential equation representing it Find the Laplace transform of this equation assuming all initial conditions are zero Assume that the external forcing function is a step function At Solution From Table 83 we get mx bx kx A t ms2F s bsF s kF s A1 s F s A s ms2 bs k Example 84 Using Table 83 derive the Laplace transform of a sine function from a cosine function Solution The Laplace transform of a sine can be derived using Fs for a cosine and the function for the derivative of a Laplace transform as follows f t cosωt f t d dt cosωt ω sinωt sinωt 1 ω d dtcosωt A sinωt A ω d dtcosωt A ω sF s f 0 A ω s2 s2 ω2 1 A sinωt Aω s2 ω2 Final value theorem The final value theorem allows us to calculate the final value of a timedomain func tion at t For example if the input to a system is a step the final value theorem enables us to calculate the eventual final value of the response of the system or its steadystate value It can be calculated from the following lim t f t sF s s 0 811 Example 85 Find the steadystate value of F s k s a for a step input P Solution The Laplace transform for a step input with magnitude P is P s Therefore lim t f t sF s s 0 s k s a P s s 0 kP a Introduction to Robotics 280 86 Inverse Laplace Transform The Laplace transform process was used to convert a differential equation in the time domain into an alge braic equation in the s domain The inverse Laplace transform refers to the process of inverting an equation from the Laplace domain to the time domain Two common methods used are the application of Table 83 and the application of the partial fraction expansion method In this process an equation in the Laplace domain is broken into simple terms where each term can easily be transformed into the time domain using Table 83 as follows F s F1 s F2 s Fn s 1F s 1F1 s 1F2 s 1Fn s f1 t f2 t fn t Assuming that F s N s mD s n where Ns and Ds are the numerator and denominator and assuming that the order of the denominator n is larger than the order of the numerator m we can break the equation into the following form where z and p values are zeros and poles F s N s m D s n K s z1 s z2 s zm s p1 s p2 s pn 812 Therefore we should be able to break the equation into simple terms where the inverse Laplace transform can be found Note that in order to be able to do so the roots of the denominator Ds must be known 861 Partial Fraction Expansion When Fs Involves Only Distinct Poles If the roots p of the denominator are all distinct Fs can be broken into the following form where coefficients a called residues are constants F s N s m D s n a1 s p1 a2 s p2 an s pn 813 Since multiplying both sides of Eq 813 by any s pk and setting s pk will eliminate all terms except ak we can find any of the residues using the following equation ak s pk N s D s s pk 814 and since each term can be inverted to the time domain f t 1 F s a1ep1t a2ep2t anepnt 815 Example 86 Derive the inverse Laplace transform of the following equation F s s 5 s2 4s 3 Solution The given equation can be broken into the following F s s 5 s2 4s 3 s 5 s 1 s 3 a1 s 1 a2 s 3 Motion Control Systems 281 From Eq 814 we get a1 s 1 s 5 s 1 s 3 s 1 s 5 s 3 s 1 4 2 2 a2 s 3 s 5 s 1 s 3 s 3 s 5 s 1 s 3 2 2 1 From Eq 815 the inverse Laplace transform is f t 1 F s 1 2 s 1 1 1 s 3 2et e3t 862 Partial Fraction Expansion When Fs Involves Repeated Poles If the roots of Eq 813 are repeated Eq 814 will not result in the desired residues To solve for the resi dues assuming that there are q repeated roots s p q Fs can be written as F s N s m D s n bq s p q bq1 s p q1 b1 s p a1 s p1 a2 s p2 an s pn 816 where bq values are constants and can be found from bq s p qF s s p bq1 d ds s p qF s s p bqk 1 k dk dsk s p qF s s p 817 The inverted time domain equation is f t bqtq1 q1 bq1tq2 q2 b2t 1 b1 ept a1ep1t a2ep2t anepnt 818 Example 87 Derive the inverse Laplace transform of the following equation F s s 5 s 2 2 s 3 Solution Since there are two repeated roots we use Eqs 816 817 and 814 to get F s b2 s 2 2 b1 s 2 1 a1 s 3 Introduction to Robotics 282 b2 s 2 2 s 5 s 2 2 s 3 s 2 3 b1 d ds s 2 2 s 5 s 2 2 s 3 s 2 d ds s 5 s 3 s 2 s 3 s 5 s 3 2 s 2 2 a1 s 3 s 5 s 2 2 s 3 s 3 2 F s 3 s 2 2 2 s 2 2 s 3 The timedomain equation is f t 3t 1 2 e2t 2e3t 3te2t 2e2t 2e3t 863 Partial Fraction Expansion When Fs Involves Complex Conjugate Poles The previous methods apply to complex conjugate poles too but we will study this in more detail for its unique characteristics Complex conjugate poles always appear in pairs and have the form a jb This is because as we know for a secondorder polynomial fs the roots are f s as2 bs c 0 p1p2 b b24ac 2a If the discriminant b24ac 0 there will be complex conjugate poles in the form f s sp1 sp2 For example for f s s2 2s 5 we get f s s 1 2j s 12j Therefore Eq 813 can be written as F s N s m D s n c1 s σ jω c2 s σjω a1 s p1 an s pn 819 The same techniques used for distinct poles and repeated poles may be used to calculate the residues including the complex conjugate residues However the inverse Laplace equation in the time domain is f t c1e σ jω t c2e σjω t a1ep1t 820 Since Eq 810 can be rewritten as sinθ ejθ ejθ 2j and cosθ ejθ ejθ 2j 821 the complex portion of Eq 820 results in a decaying sinusoidal response Therefore as we will see later when complex conjugate poles are present the system is underdamped consequently it oscillates Motion Control Systems 283 Alternately we may expand an equation with complex conjugate roots as shown in Example 88 Example 88 Derive the inverse Laplace transform of the following equation F s 1 s s2 2s 2 Solution The denominator of the equation contains complex conjugate roots s 1 j1 and s 1j1 We expand the equation using the following form F s a1 s a2s a3 s2 2s 2 a1 s2 2s 2 s a2s a3 s s2 2s 2 Setting the numerator equal to the numerator of the original equation we get a1 s2 2s 2 s a2s a3 1 a1 a2 0 2a1 a3 0 2a1 1 a1 12 a2 12 a3 1 and F s 1 2s s 2 2 s2 2s 2 1 2s 1 2 s 1 2 1 s 1 2 s 1 2 1 From Table 83 the inverse Laplace transform of the given equation is f t 1 2 1 2et sint 1 2et cost Example 89 For the simple system shown in Figure 87 derive the equation of motion when a step force of F0 is applied at t 0 Assume b 2 and k 4 and all initial conditions are zero f k b y Figure 87 The system for Example 89 Introduction to Robotics 284 Solution As in Example 81 the equation of motion can be written as by ky f or 2y 4 f 2sF s 4F s F0 s F s F0 2s s 2 F s a1 2s a2 s 2 where a1 2sF s s 0 F0 2 and a2 s 2 F s s 2 F0 4 Therefore F s F0 4s F0 4 s 2 and f t F0 4 1e2t The response is exponential eventually reaching the value of F04 Note that the same result may be found from the application of the final value theorem f t ss sF s s 0 sF0 2s s 2 s 0 F0 2 s 2 s 0 F0 4 87 Transfer Functions A transfer function is the equation that represents the ratio of output to input in a system It may be written across a block or across a complete system Figure 88 shows the block diagram for a simple system where the output signal is directly fed back to the summing junction In this system Rs Ys Gs and Hs represent the input output system dynamics plus any controller and feedback multiplier respectively The transfer function for each block is simply the ratio of its output to its input We define the following transfer functions Openloop transfer function The ratio of the feedback signal to the actuating error signal while the feedback loop is open although the sensor still reads the output Here the sensor is used to read the output and report it as the feedback signal Therefore Y s E s G s B s Y s H s E s G s H s Error signal Rs Ys Feedback signal Gs Hs Bs Es Σ Figure 88 The block diagram for a simple control system Motion Control Systems 285 OLTF B s E s E s G s H s E s G s H s 822 As you see if the feedback loop is disconnected from the summing junction the feedback signal is in fact a function of GsHs Feedforward transfer function The ratio of the output to the actuating error signal or FFTF Y s E s G s 823 If the feedback function is unity the openloop and feedforward transfer functions are the same Closedloop transfer function The ratio of output to input for the system For the system in Figure 88 the closedloop transfer function is Y s G s E s E s R s B s R s Y s H s Eliminating Es we get Y s G s R s Y s H s Y s 1 G s H s G s R s Consequently the closedloop transfer function is CLTF Y s R s G s 1 G s H s 824 Assuming that both Gs and Hs can be represented in ratios of polynomials as G s NG s DG s and H s NH s DH s Eq 824 can be written as CLTF G s 1 G s H s NGDH NGNH DGDH 825 This form of the closedloop transfer function can assist in quickly composing the equation if the numera tors and denominators of Gs and Hs are known Together the block diagram and the transfer function represent the behavior of a system with feedback mathematically and graphically Example 810 Write the openloop feedforward and feedback transfer functions for the system in Figure 89 Rs Ys Bs Es 1 ss2 1 s Σ Figure 89 The system from Example 810 Introduction to Robotics 286 Solution We substitute appropriate values into Eqs 822824 to get OLTF G s H s 1 s s 2 1 s 1 s2 s 2 FFTF G s 1 s s 2 CLTF G s 1 G s H s 1 s s 2 1 1 s s 2 1 s s s2 s 2 1 We may also calculate the closedloop transfer function directly from Eq 825 as CLTF NGDH NGNH DGDH 1 s 1 1 s s 2 s s 1 s2 s 2 Example 811 Assume that a sensor reads the position of the mass in a massspringdamper system and feeds it back to the inputforce system as shown in Figure 810 Derive the closedloop transfer function for this system Solution Eq 83 repeated here represents the differential motion of the system and its Laplace transform md2x dt2 bdx dt kx F andG s 1 ms2 bs k Assuming that the feedback gain is A the block diagram in Figure 810 represents the system From Eq 825 the closedloop transfer function for the system is CLTF 1 A ms2 bs k 1 ms2 bs k A Notice how the feedback gain is added directly to the spring constant and therefore it can easily augment the stiffness of the spring The following application shows how this can be used in a control system k m F x b Rs Ys Bs 1 ms2 bs k A Σ Figure 810 A massspringdamper system with position feedback Motion Control Systems 287 The jumping robot Imagine a robot that jumps for locomotion There are many examples of robots that have this mode of locomotion including robots that mimic animals such as Spot a robot with four legs that gallops or trots like a horse a pogostick robot with one leg and one that lowers its body and then jumps by quickly extending its legs Most robots of this nature are designed for learning how animals and humans perform their tasks but they have utilitarian applications too In all these the legs contain a spring for energy storage absorption and controlled landing Figure 811 shows a generic depiction of such a system As a result of different loading conditions jump characteristics and control requirements it may be necessary to change the stiffness of the springs inside the legs However readily changing the stiffness of a mechanical spring in situ is no easy task if not impossible As shown in Example 811 a simple feed back gain A can be used to control the effective stiffness of the spring through the feedback loop The same system can also be used in a car to change the effective stiffness of the springs in the suspen sion system therefore forcing it into different modes of operation such a smooth ride sporty ride and so on 88 Block Diagram Algebra In reality block diagrams are not always as simple as the one shown in Figure 88 They may contain multiple parallel and series loops summing junctions and inputs However in general a block diagram can be reduced to the simple form in Figure 88 as long as the results remain the same In this respect remember that The products of the feedforward transfer functions must remain the same The products of the transfer functions around a loop must remain the same Table 84 shows some equivalent block diagrams that may be used in reducing larger block diagrams Example 812 To reduce the block diagram in Figure 812a to a simple standard form do the following 1 Referring to Table 84 the first and second loops can be simplified as G1 1 G1H1 and G3 1 G3H2 as shown in Figure 812b Figure 811 A generic leg design for jumping robots Introduction to Robotics 288 2 Combine the three gains in the forward loop and replace with G4 G1G2G3 1 G1H1 1 G3H2 as shown in Figure 812c 3 Transfer C1 into the loop and replace the gains as shown in Figure 812d 4 Simplify the loop as shown in Figure 812e Table 84 Equivalent block diagrams ABC A ABC B C AB BC A G1 G2 B B G11G1G2 A A AG1G2 G1 G2 A G1G2 A AG1G2 A AG1G2 G1 A G2 G1G2 AG1G2 A AB G AGBG B AGBG G G A B G A AG B AGB A BG ABG G AGB 1G B AG1G2 A A 1G2 G1 AG1AG2 G1 G1 G2 G2 G2 B G1G2 B 1G2 A A Motion Control Systems 289 89 Characteristics of FirstOrder Transfer Functions Firstorder systems are represented in the following standard forms G s Kss τs 1 Kssτ s 1τ Kssa s a 826 where Kss is the steadystate gain and τ is the time constant As you notice the denominator of this equation is a firstorder polynomial with its root called a pole at s a The response of such a system to a step function Put is F s Kssa s a P s PKss s PKss s a The time response can be written as f t PKss 1eat u t 827 The final value of the function is PKss The time response of the firstorder system is shown in Figure 813 The following definitions characterize the response The final value is PKss τ is the time constant an indication of how fast the system responds to the step function A G1 H3 H1 G2 G3 H2 C1 A H3 C1 G4 H3C1 C1G4 A C1G4 1H3G4 A a e d c b A G1 1G1H1 H3 G2 G3 1G3H2 C1 Figure 812 The block diagram for Example 812 Introduction to Robotics 290 a 1τ is a pole The location of the pole in a realimaginary plane relative to the imaginary axis yaxis specifies whether the system is stable and how fast it responds If the pole is to the left of the yaxis negative the response 1eat is bounded If it is to the right of the imaginary axis the response is 1eat which is not bounded To find the time constant let t τ to get x t τ PKss 1eττ PKss 0 63 63 PKss 828 Hence xt reaches 63 of the final value in t τ seconds as shown in Figure 813 This indicates how fast the response is a longer τ indicates a longer time to reach the final value Rise time is the time required between 10 and 90 of the final value and can be found by substituting 10 and 90 into Eq 827 as Tr 2 2τ Settling time is the time from 0 to 98 rise and is Ts 4τ The slope at t 0 can be found by differentiating Eq 827 as dx dt PKss 0 a eat dx dt t 0 PKssa PKss τ 829 This slope is shown in Figure 813 which obviously indicates how fast the rise time is As τ increases the slope decreases Since rise time cannot be zero the slope cannot be infinite In firstorder transfer functions the system responds as soon as ut is applied Now lets look at a closedloop firstorder transfer function as shown in Figure 814 The feedback is unity but there is a proportional gain KP added to the feedforward path Es R 1 KP Kss τs 1 Y Σ Figure 814 A closedloop firstorder system xt 100 98 10 63 XssPKss t 0 90 Rise time τ Figure 813 The time response of a firstorder system to a step function Motion Control Systems 291 Using Eq 825 the transfer function can be written as TF s KPKss KPKss τs 1 Ksys τsyss 1 where τsys τ KPKss 1 and Ksys KPKss KPKss 1 As the proportional gain KP varies it affects the behavior of the system although the plant remains the same For example when KP increases τsys decreases causing the system to respond faster Similarly Ksys approaches 1 making the system more accurate 810 Characteristics of SecondOrder Transfer Functions Secondorder transfer functions are represented in the following standard form G s ω2 n s2 2ζωns ω2 n 830 where ζ is the damping ratio and ωn is the natural frequency The response of such a system to a step function ut is F s ω2 n s2 2ζωns ω2 n 1 s After partial fraction expansion the time response of the system may be written in either of the follow ing forms f t 1eζωnt cosωdt ζ 1ζ2sinωdt 831 or f t 1 1 1ζ2eζωnt sin ωdt α 1 ζ 1 832 where ωd ωn 1ζ2 and α tan1 1ζ2ζ Eqs 831 and 832 have an exponential portion and sinusoidal portions Therefore the response is an oscillatory function influenced by whether the exponential portion is decaying or growing as follows If ζ 0 indicating no damping the exponential portion becomes a constant Consequently the response is a sinusoidal function that oscillates indefinitely as shown in Figure 815a If ζ 1 indicating critical damping the response is an exponential function that eventually achieves the steadystate value Figure 815b If the exponential portion grows the response grows as well indicating an unstable system If the exponential portion decays indicating less than critical damping the oscillations decrease in size until the system stabilizes Figure 815c for ζ 0 2 and Figure 815d for ζ 0 4 Differentiating these equations and setting t 0 reveals that the slope of the response is zero This means that unlike firstorder systems where the initial slope is never zero the initial slope of secondorder transfer functions is always zero indicating a slower initial response The steadystate gain or the final value in response to a step function is Fss lim s 0s ω2 n s2 2ζωns ω2 n P s P Introduction to Robotics 292 Figure 816 shows a typical secondorder response to a step function The following characterize this response The peak time Tp is the time to the maximum response value and can be found by taking the deriv ative of Eq 831 and setting it to zero as Tp πωn 1ζ2 833 The rise time Tr is the time that it takes to go from 10 of the response to 90 Unlike for a firstorder system no time constant is defined for a secondorder transfer function Settling time Ts is reached when the response does not vary more than 2 or Ts 4ζωn 834 Percent overshoot OS is the ratio of the overshoot to the steadystate value or OS F max Fss Fss 100 e ζπ 1 ζ2 100 835 For the response in Figure 816 with ζ 0 2 OS 53 Similarly the OS for zero damping results in 100 overshoot as shown in Figure 815a 2 a b c d 2 15 1 05 0 0 5 10 15 20 2 15 1 05 00 5 10 15 20 15 1 05 00 5 10 15 20 2 15 1 05 00 5 10 15 20 Figure 815 The response of a secondorder transfer function to a step function at different damping ratios a ζ 0 b ζ 1 c ζ 0 2 d ζ 0 4 Motion Control Systems 293 811 Characteristic Equation PoleZero Mapping When the denominator of the transfer function is set to zero the resulting equation is called the character istic equation The roots of the characteristic equation are called poles whereas the roots of the numerator of the transfer function are called zeros Polezero mapping is the graphical representation of the locations of the poles and zeros in a realimaginary plane Example 813 Draw the polezero map of the following transfer function TF s s 3 s 5 s 2 s2 4s 5 Solution The poles and the zeros of the transfer function are s 5 s 2 s2 4s 5 0 s 5 s 2 s 2 j s 0 s 3 Note that complex conjugate roots are always in pairs Figure 817 shows the poles shown as and zeros shown as 0 1 2 5 4 3 1 2 Im Re Figure 817 Polezero mapping of the roots in Example 813 1 09 01 5 10 15 Peak time Tp Rise time Tr ωnt Figure 816 A typical response of a secondorder transfer function and its characteristics Introduction to Robotics 294 The loci of the poles and zeros reveal much information about the system and how it behaves From the graph we can identify the transfer function the order of the system and whether it is underdamped critically damped overdamped stable or unstable For a firstorder transfer function of Eq 826 the only pole is τs 1 0 s 1 τ 836 Therefore the reciprocal of the pole location is the time constant Clearly as s increases indicating a smal ler time constant the response of the system is faster When the pole moves to the right closer to the origin the time constant is larger with a slower response As long as the pole is on the left side of the imaginary axis the system is stable A pole at the origin is a pure integrator which we will study later For secondorder transfer functions the solution for the characteristic equation is s2 2ζωns ω2 n 0 s b b24ac 2a 2ζωn 2ζωn 24 ω2 n 2 s ζωn ωn ζ21 837 Four possibilities exist ζ 1 and therefore s ωn repeated twice This means that there will be two poles at the same loca tion This system is critically damped and the response is as shown in Figure 815b ζ 1 and therefore ζ21 is positive resulting in a pair of real and distinct roots and a system that is overdamped ζ 1 and therefore ζ21 is negative In this case the roots are a complex conjugate pair s ζωn ωn 1ζ2j The system is underdamped as shown in Figure 815cd ζ 0 and therefore s ωnj which is an undamped system with complex conjugate roots on the imaginary axis The response is as shown in Figure 815a Figure 818 shows the mapping of the poles of an underdamped system The following relationships hold true d ζωn 2 ωn2 1ζ2 ωn cosθ ζωn ωn ζ θ cos1ζ and hence when ζ 0 θ 90 and as we saw before the system is undamped and the roots are on the imaginary axis When ζ 1 θ 0 and the system is critically damped with real poles Im θ Re 2 1 d n ζ d ω ω ζ n ω Figure 818 An underdamped system with its pair of complex conjugate poles and its characteristics Motion Control Systems 295 Figure 819 shows how the response of the system changes as the poles move in different directions These conclusions are based on the preceding results Higherorder transfer functions may be analyzed similarly through forming the timedomain response of the system based on partial fraction expansion and plotting the result Usually the result includes exponential portions oscillatory sections as well as step functions Depending on the magnitudes of the poles and zeros it may be possible to assume that certain portions of the time response are negligible while others are dominant Regardless the response can be plotted and analyzed through either timedomain plotting or polezero plot ting For further reading on higherorder systems refer to related books and journal articles on this topic 812 SteadyState Error Figure 820 shows a typical control loop The transfer function for this system is Y s R s k1k2 k2H s τs 1 The steadystate error signal Ess is a function of both the transfer function and the type of input to the system It can be written as Ess Rk1YssH 838 where Yss lim s 0s k1k2 k2H s τs 1 R s 839 E Rs H k2 s1 k1 Ys 1 s τ Figure 820 A typical control loop Im Re slower faster less damping more damping no damping critical damping lines of constant damping higher frequency lower frequency Figure 819 The response of the system changes as the poles move in different directions Introduction to Robotics 296 For a step input the steadystate output and the steadystate error signal are Yss lim s 0s k1k2 k2H s τs 1 1 s k1 H 840 Ess 1 k1 k1 H H 0 841 As Eqs 840 and 841 show although the input to the system was a unit step the output is k1H unless k1 H and the steadystate error signal is zero This can be very handy depending on our application For example in a telerobot such as a surgical robot or a repair robot in space that is meant to follow the opera tors motions accurately the steadystate output should be the same as the input In that case the robots motions will be the same as the operators input joystick onetoone mapping with no steadystate error signal On the other hand a large robot with large motions for example the space shuttle robot that handles satellites must make large motions for small motions of the joystick and therefore must have a large gain even though no steadystate error signal is desired In this case an appropriate gain may be selected to pro vide the desired motions while the steadystate error signal remains zero Note that it is assumed that the dynamics of the robot are included in the model Therefore the previous example must be modified to rep resent a robot appropriately In order to see how the steadystate error can be found for any system lets consider a typical feedback loop as shown in Figure 821 The error signal and the transfer function for the system are E s R s Y s H s Y s G s 1 G s H s R s E s 1 1 G s H s R s Ess lim s 0s 1 1 G s H s R s 842 Assume the openloop transfer function GsHs can be represented as G s H s K τas 1 τbs 1 sn τ1s 1 τ2s 1 843 The value of n in Eq 843 determines the type of the system and is an indication of how many pure inte grators are present in the feedforward path For n 0 the system is type0 for n 1 the system is type1 etc Substituting different inputs for R for different system types in Eq 842 will yield the steadystate error signal Step inputs For step inputs we define the static position error coefficient Kp lims 0G s H s Therefore Ess 1 1 Kp Es Rs Gs Ys Hs Figure 821 The typical control loop Motion Control Systems 297 For a type0 system with n 0 G s H s K τas 1 τbs 1 τ1s 1 τ2s 1 Kp K and Ess 1 1 K 844 For a type1 or higher system with n 1 G s H s K τas 1 τbs 1 sn τ1s 1 τ2s 1 Kp and Ess 0 845 Notice how a type1 system has zero steadystate error compared to a type0 system As we will see later having an additional pole in the denominator is equivalent to adding an integrator to a control system bring ing the error to zero Ramp input For ramp inputs we define the static velocity error coefficient Kv lims 0sG s H s Therefore Ess lim s 0s 1 1 G s H s 1 s2 lim s 0 1 sG s H s 1 Kv For a type0 system with n 0 G s H s K τas 1 τbs 1 τ1s 1 τ2s 1 Kv 0 and Ess 846 For a type1 system with n 1 G s H s K τas 1 τbs 1 s τ1s 1 τ2s 1 Kp K and Ess 1 K 847 Therefore for a ramp input the steadystate error in a type0 system is infinite whereas for a type1 system it is finite A similar analysis may be applied for higherorder inputs 813 Root Locus Method The root locus is the collection of the loci of the roots of the characteristic equation plotted on a real imaginary plane as parameters vary The root locus is a powerful tool for both analysis of the system whether it is stable system sensitivity whether it is underdamped critically damped or overdamped and so on as well as system design to determine the location of roots or the magnitude of the gains for specific system behavior To see how the root locus is formed and what it means lets consider the system shown in Figure 822 The transfer function and characteristic equations for the system in Figure 822a are TF Y R KG KGH 1 and KGH 1 0 848 E R G Y K H E R Y K 5s4 ss3s7 Figure 822 A typical control system Introduction to Robotics 298 If we write the openloop transfer function in polynomial form as GH N s D s the characteristic equation can be written as K N s D s 1 0 KN s D s 0 or K D s N s 849 Therefore using Eq 849 the characteristic equation for Figure 822b is 5K s 4 s s 3 s 7 0 850 The root locus is the loci of the roots of Eq 849 as K varies If K 0 the roots for Figure 822b are the poles s 0 3 7 As K increases the location of the roots change until K approaches at which time the roots converge to the zeros of the openloop transfer function s 4 for Figure 822b For every value of K the roots will be at a different location yielding a different behavior Plotting these roots for all values of K root locus allows us to both analyze and predict the behavior of the system Figure 823 shows the root locus for the system in Figure 822b As you see the roots start at the poles where K 0 and move in the direction of the arrows as K increases One of the conclusions we can make right away is that since the poles and the zero are all to the left of the imaginary axis this system can never be unstable Conclusions such as this make the root locus a very pow erful and useful technique In the next sections we study the root locus technique and its applications in the design of control systems Start and end of the root locus The start of root locus is where K in Eq 849 is zero This corresponds to the poles of the openloop transfer function Therefore by plotting the poles in the realimaginary plane we have the start of all portions of the root locus Each portion of the root locus ends at a zero or at where K in Eq 849 approaches Therefore by plotting the openloop transfer function zeros the ends of root loci can be marked off Each portion starts at a pole and ends at a zero or 10 8 6 4 2 2 4 6 8 10 8 6 4 2 0 2 Re Im Figure 823 The root locus for the system in Figure 822b Motion Control Systems 299 If all the roots are numbered sequentially from right to left the root locus exists to the left of the odd numbered roots only Each section starts at a pole and ends at a zero or continues to Root locus between the start and end points The location of each point on the root locus relative to a pole or zero is represented by a vector with real or realimaginary components The magnitude of the overall transfer function at this point is the ratio of the products of all vectors from this point to each zero and pole or MTF Mzi Mpi Mz1Mz2 Mp1Mp2 851 where Mzi and Mpi are the magnitudes of each vector between the zeros or the poles to the point of interest Similarly the corresponding angles of vectors are added as θ θzi θpi 180 852 Example 814 Calculate the magnitude and the angle of the vectors for the characteristic equation K s1 s 1 s 4 s 6 0 shown in Figure 824 for point s 0 4j Solution Using Eqs 851 and852 we get M 12 42 12 42 42 42 62 42 17 32 52 0 4167 θz1 tan14 1 76 θz2 tan1 4 1 104 θp1 tan14 6 33 7 θp2 tan14 4 45 θ 76 10433 745 101 3 Magnitude criterion Equation 851 can be used as a criterion for both determining the root locus and design purposes Based on Eq 848 if the following magnitude criterion is satisfied the closedloop char acteristic equation is also satisfied and the chosen point is on the root locus KGH 1180 853 4 3 2 1 1 8 6 4 2 0 2 P1 P2 z1 z2 Re Im Figure 824 The vectors between a point in the RealImaginary plane and the poles and zeros Introduction to Robotics 300 Angle criterion Similarly based on Eq 853 since K is a real value the angle criterion is satisfied when GH 180 Example 815 Based on the magnitude and angle criteria point s 0 4j from Example 815 is not on the root locus because neither its magnitude 0 4167 1 nor its angle 101 3 180 satisfies the requirements Asymptotes The total number of asymptotes is α poleszeros 854 Asymptote angles The angles of asymptotes are θ π3π5π α 855 This can be summarized as in Table 85 Asymptote center Designating the real components of the poles and zeros as σp and σz the center of the asymptotes where they intersect the real axis is σA σp σZ α 856 Example 816 As shown in Figure 823 based on Eq 856 the center of the asymptotes is σA σp σZ α 037 4 2 3 Breakaway and breakin Points These are the points where the value of K is the largest on the real axis therefore at these points the system is critically damped with the fastest rise time without any overshoot or any oscillations no imaginary components are present and consequently the system will not oscillate To find these points we may take the derivative of the closedloop characteristic equations and set it to zero as follows KG s H s 1 0 K 1 G s H s Table 85 The angles of asymptotes based on their number α Angles of asymptotes 1 180 2 90 270 3 60 180 300 4 45 135 225 315 Motion Control Systems 301 dK ds d ds 1 G s H s 0 857 Except for simple cases calculation of breakaway and breakin points requires solving higherorder poly nomials which is not always readily possible Therefore an estimate can be made for drawing the root locus followed by an iterative process for the exact location if necessary Example 817 The root locus for the following characteristic equation can be drawn as follows GH 1 s1 s 4 s 6 p 1 4 6 Number of asymptotes α 30 3 Angles of asymptotes 60 180 300 Asymptote center σA σp σZ α 146 0 3 3 Breakaway point dK ds d ds s1 s 4 s 6 0 Solve to get s 0 9 and 5 08 Figure 825 shows the root locus Example 818 The root locus for the following characteristic equation can be drawn as follows s2 Ks ω2 0 s jω sjω Ks see Eq 849 Therefore p jω z 0 Number of asymptotes α 21 1 Angle of asymptote 180 10 8 6 4 2 2 4 6 8 10 8 6 4 2 0 2 Figure 825 The root locus for Example 817 Introduction to Robotics 302 Asymptote center is at σA 0 Breakaway point dK ds d ds s2 ω2 s 0 s ω Figure 826 shows the root locus Root locus with MATLAB Although it is crucial that the details of the root locus be learned to be able to draw it and use it as a design tool it is also convenient to use programs such as MATLAB to draw the root locus See available tutorials in MATLAB to learn how to use the program 814 Proportional Controllers Figure 822a shows a system with a proportional gain in the feedforward loop As we discussed earlier when gain K varies the locations of the poles and zeros of the system change as shown on a root locus Therefore the systems behavior is dependent on the value of this gain K Consequently it is possible to select design a value for the gain that makes the system behave in a particular way For example we may desire a system with an overshoot less than a certain percent an overdamped system or a system whose rise time is less than a certain value This process called pole placement allows the designer to select poles and calculate the value of K that yields the particular pole locations Proportional controllers are simple and very common We only need to change the amplification value of a controller that already exists without having to add anything to the system However it is not always possible to find appropriate pole locations with proportional controllers that yield satisfactory results In that case as we see next we may select other types of controllers Please review Figure 819 before we continue with the next subject Note the lines of constant damping the directions of faster or slower response directions of less or more damping and so on In order to see how the root locus may be used to design a proportional controller we use the following example 10 08 06 04 02 02 04 06 08 1 16 12 08 04 0 04 Figure 826 The root locus for Example 818 Motion Control Systems 303 Example 819 Find a proper value for the proportional gain that yields the following requirements for the system Settling time 1 sec overshoot 5 GH K s 1 s 8 Solution Figure 827 shows the root locus for the system As expected there are two poles at 1 and 8 and two asymptotes at s 4 5 Since the system is secondorder we use Eqs 834 and 835 to get Ts 4ζωn ζωn 4 Ts 4 1 4 OS e ζπ 1 ζ2 100 ζ 0 69 by trial and error θ cos1ζ 46 5 ωn 5 8 radsec We were able to use Eq 834 only because this is a secondorder system Otherwise we need to either use approximation based on which pole is dominant or use MATLAB as we will discuss Applying the minimum requirements for the given specifications ζωn 4 and θ 46 5 to the root locus in Figure 827 we find all the acceptable possible root locations left of the vertical line and between the constant damping lines For example point A and its conjugate A or point B with their corresponding K values can be used as possible roots Now we check the steadystate error Note that this particular system is type0 and with a step input its steadystate error is finite Conforming the given GH to the form in Eq 844 we get G s H s K s 1 s 8 Kp K 8 and Ess 1 1 K 8 5 4 3 2 1 1 2 3 4 5 8 6 4 2 0 2 Point A Point B 465 A Figure 827 The root locus for Example 819 Introduction to Robotics 304 Higher K yields lower steadystate error and therefore we should select point A and its conjugate at s 4 5 4 75j We can use Eq 851 to calculate K as follows K Mpi Mzi 3 52 4 752 3 52 4 752 1 34 8 Ess 1 1 K 8 0 187 Figure 828 shows the response of this system to a unit step function plotted by MATLAB Notice how the steadystate error matches the analytical results Also notice that the overshoot is about 5 above the final value not the desired value of 1 The settling time is also about 1 second Figure 829 shows the response of the system if the roots were selected at point B in Figure 827 As you see the settling time is still about 1 second but there is no overshoot critical damping and the steadystate error is much bigger at about 04 We will discuss how to reduce this error in the next section 08 1 06 04 02 0 Amplitude Step Response 0 02 04 06 08 Time sec 1 12 14 Figure 829 The response of the system from Example 819 with critical damping Step Response 08 06 04 02 0 0 02 04 06 08 Time sec Amplitude 1 12 14 Figure 828 The step response of the system from Example 819 Motion Control Systems 305 Example 820 In Example 82 shown in Figure 86 we studied a hydraulic lift Adding a floating lever to the system as shown in Figure 830a makes this system a proportional servo valve As the lever arm is pushed up the supply fluid will move the power piston down which in turn brings down the spool in the valve and eventually closes it Figure 830b shows the feedback loop Note how the transfer function is type0 proportional controller Y s R s l2 l1 l2 K s 1 l1 l1 l2 K s l2K l1 l2 s l1K 815 ProportionalPlusIntegral Controllers Integral controllers provide a means for eliminating steadystate error in a system This is because an inte grator adds an additional s to the denominator of the transfer function therefore raising its type Referring to Section 812 recall that for type0 systems the steadystate error for a step function is a finite value however for type1 systems it is zero Similarly the steadystate error with a ramp input for a type0 system is infinite but finite for a type1 system Each integrator within the system raises its type reducing the error boundary Now imagine that we are designing a control system for a robot It should be clear that i the response of the robot actuators to a step function to go from one location to another should not overshoot ii it should rise to the value of the input signal as quickly as possible and iii it should not have any steadystate error Obviously if the response has an error all our estimations of acceleration velocity and positional accuracy will be wrong Therefore we need to create a controller that delivers all these requirements simultaneously However as we discussed in Example 819 when a proportional controller was used even allowing an over shoot resulted in a significant steadystate error When we placed the poles on the realaxis making it crit ically damped and eliminating the overshoot the steadystate error was further increased In order to have faster response a high gain is needed but that creates overshoot and error When overshoot is reduced error increases further Consequently a proportional controller alone cannot simultaneously provide for fast response no overshoot and zero steadystate error However a system with both proportional and integral elements will improve system response A proportionalplusintegral PI controller with gains KP and KI can be represented as shown in Figure 831 and derived as follows notice that KP used here is different from Kp the static position error coefficient in Section 812 Load Hydraulic proportional valve x y A B C l1 l2 E R Σ Y l2 l1 l2 l1 l1 l2 K s Figure 830 A proportional hydraulic servo valve Introduction to Robotics 306 G Va E KP KI s KP s KI KP s K s zI s 858 where zI KI KP As Eq 858 shows the controller adds a pole at the origin as well as a zero at zI which is influenced by our choice of KI and KP To not severely affect the shape of the root locus by this addition we should pick zI to be close to the origin Therefore the integral gain should be small compared to the pro portional gain With this choice the pole at the origin and the zero near it add an additional small part to the root locus without changing its general shape The following example demonstrates how this can affect the systems behavior Example 821 The system from Example 819 can be modified into a proportionalplusintegral con troller to eliminate the steadystate error We modify the system by adding an integrator pole at the origin and a zero at zI 0 1 Figure 832 shows the root locus for the system GH K s 0 1 s s 1 s 8 As shown the root locus looks similar to Example 819 except that it has a small portion between the origin and the zero Since the system is no longer secondorder the equation for settling time no longer holds but the acceptable range for roots remains about the same Figure 833a is the step response for the system when the roots are selected at A and its conjugate 4 46 4 75j Notice that there is a 5 overshoot at the beginning but the integrator reduces the steadystate error to zero although it takes a long time Figure 833b shows the step response when E Va KP KI s Σ Figure 831 A proportionalplusintegral controller 10 Point A Point B 5 0 5 10 8 6 4 2 Real Axis Imaginary axis 0 2 Figure 832 The root locus for Example 821 Motion Control Systems 307 the roots are selected at point B Notice that since this corresponds to critical damping there is no overshoot but the response is slower with zero steadystate error Therefore the addition of the inte grator and a zero near it has improved the systems steadystate performance without changing the characteristics of the overall system 816 ProportionalPlusDerivative Controllers Sometimes it is impossible to meet the design requirements with proportional or proportionalplusintegral controllers In these cases the dynamic behavior of the system must be altered in order to achieve the design requirements This may be achieved by a proportionalplusderivative PD controller A PD controller with gains KP and KD can be represented as shown in Figure 834 and derived as G Va E KP KDs KD s KP KD K s zD 859 where z KP KD The controller adds a zero to the root locus and therefore changes its characteristics In order to see how this may affect the system we continue with Example 821 40 35 30 25 20 Time sec Step Response a b 15 10 1 08 06 04 Amplitude 02 0 5 0 90 70 80 60 50 40 Time sec Step Response 30 20 1 08 06 04 Amplitude 02 0 10 0 Figure 833 The step responses for the system from Example 821 E Va KP KDs Figure 834 A proportionalplusderivative controller Introduction to Robotics 308 Example 822 As we discussed earlier the settling time may be an important issue in the design of a system such as a robot In order to improve the positional accuracy of a robot we would like to improve the settling time of the system from Examples 819 and 821 As you see although an integral controller was added to the system in Example 819 and consequently its steadystate error was eliminated the settling time for the system was increased However in both cases the root locus limitation was set at or near 4 for the given settling time In order to improve this design requirement we need to reduce the settling time However since the center of the asymptotes is near 45 on the real axis the best settling time we can get is Ts 4ζωn 44 50 9 Beyond that as shown in Figure 835 there will not be any roots available Now lets assume that the design requirements indicate a settling time of 06 sec with the same 5 overshoot The limits are shown in Figure 835 Lets arbitrarily choose point A and its conjugate at s 6 5 7j as desired points for achieving the design requirements We need to find the location of the derivative portion of a controller that will yield a root locus that includes these points To find the location of this zero we do the following 1 Calculate the angle deficiency For the original transfer function GH K s 1 s 8 the roots are at s 1 and s 8 From Eq 852 the complex vector angles to points s 6 5 7j are θp 1 180tan1 7 6 5 1 128 2 θp 8 tan1 7 6 5 8 77 9 θzi θpi θz 128 2 77 9 180 θz 26 1 5 4 3 2 1 1 2 3 4 5 8 6 4 2 0 2 Point A 465 7 6 6 7 Figure 835 No roots are available for settling time less than 09 Motion Control Systems 309 2 With this deficiency angle the zero should be located at tan26 1 7 6 5 z z 20 8 3 The gain for these points can also be calculated from Eq 851 as MTF Mzi Mpi 5 52 72 1 52 72 14 32 72 4 4 The overall transfer function for the system is GH 4 s 20 8 s 1 s 8 Figure 836 shows the root locus for this system Figure 837 shows the response to a step input As indicated both the overshoot and settlingtime requirements are met However the steadystate error is not zero because we did not include an integrator in the system 25 20 15 10 5 0 5 10 Imag Axis 15 20 25 40 35 30 25 20 Real Axis 15 10 5 0 Figure 836 The root locus for the system from Example 822 1 08 06 04 02 Amplitude 00 01 02 03 04 05 06 07 08 09 Time sec Step Response Figure 837 The response of the system from Example 822 to a step function ζ 0 68 s 6 5 7j gain 4 Introduction to Robotics 310 It is important to note here that a derivative controller especially at high gains is very susceptible to high frequency noise Since this type of controller differentiates the signal when highfrequency or sharply chan ging signals are present the derivative of the signal may become excessively large Therefore it may be nec essary to use filters to reduce highfrequency noise in the system For example in the following equation the amplitude of the highfrequency noise is low but when differentiated its effect can be significant e t 1 sin 10t 0 01 sin 1000t d dte t 10 cos 10t 10 cos 1000t 817 ProportionalIntegralDerivative Controller PID As we saw the addition of a derivative component to a controller changes its behavior allowing the placement of the roots in desirable locations and thereby achieving the design requirements However a proportional and derivative controller may not result in zero steadystate error Many systems including robots may require zero steadystate error in addition to other requirements Therefore it will be necessary to add an integrator to the system as well However care must be taken to ensure that the addition of the integrator does not otherwise change the behavior of the system Figure 838 shows how a PID controller may be constructed The transfer function for this system is G Va E KP KI s KDs KD s2 KP KD s KI KD s KD s z1 s z2 s 860 In orderto maintain the behavior of the system and the general shape of the root locus we may placeone of the zeros in Eq 860 near the origin and therefore cancel the dynamic effect of the integrator pole at the origin called zeropole cancellation With this although the system behavior remains almost unchanged its steadystateerrorwillgotozerobecausethesystemtypeisraisedRememberthatzerosmustberealanddistinct Example 823 To eliminate the steadystate error of the system in Example 822 we add a pole at the origin and a zero near it We can express the system as GH K s 20 8 s 0 5 s s 1 s 8 The root locus of this system is shown in Figure 839 Notice the similarity of this root locus to the one in Figure 836 even though a pole and a zero were added to the transfer function Also notice that the location of the zero was chosen arbitrarily Other values may also be acceptable Figure 840 shows the response of this system to a step function Notice how the design requirements are mostly met E Va KP KDs KI s Figure 838 A proportionalintegralderivative PID controller Motion Control Systems 311 The selected poles are at s 14 3 14 8j with ζ 0 697 The loop gain is 202 From Eq 860 we can calculate the gains of the system as follows G KD s2 KP KD s KI KD s 20 2 s 20 8 s 0 5 s KD s2 KP KD s KI KD 20 2 s2 21 3s 10 4 KD 20 2 KP 430 3 KI 210 1 25 20 15 10 5 0 5 10 15 20 2540 35 30 25 20 Real Axis Imag Axis 15 10 5 0 Figure 839 The root locus of the system from Example 823 with a proportionalintegralderivative controller 14 Step Response 12 1 08 06 Amplitude 04 02 00 01 02 03 04 Time sec 05 06 07 08 09 Figure 840 The response of the system from Example 823 to a step function Introduction to Robotics 312 818 Lead and Lag Compensators Ideal integral and derivative controllers are used to change the response of a plant according to the required design specifications such as the settling time speed of the response percent overshoot and steadystate error elimination However they are both active systems and require power In addition a derivative con troller has a wide bandwidth therefore although it can differentiate high frequencies in the system it can also create problems when noise is present Alternately a lead compensator or a lag compensator may be used In each case the circuits for lead and lag compensators are passive basically consisting of resistors capacitors and inductors A lead compensator has limited bandwidth and therefore may be even better for highfrequency noise reduction Lead and lag compensation is usually performed along with frequencydomain analysis of systems such as the Bode diagram A lag compensator consists of a zero placed near a pole close to the origin The addition of the pole near the origin and not exactly at the origin which makes it a pure integrator acts similar to an integrator but over time the system loses its accuracy as the steadystate error increases Therefore lag compensators are assumed to be leaky The addition of the zero near the pole keeps the root locus about the same A lead compensator consists of a zero near the origin that acts similar to a derivative controller plus a pole near it A lead compensator causes little change in the overall shape of the root locus but provides for passive derivative compensation with limited bandwidth 819 Bode Diagram and FrequencyDomain Analysis The analysis and design techniques associated with the root locus are based on the time or Laplace domain However many systems function with inputs that vary continuously and therefore it is better to analyze them in the frequency domain A Bode diagram is a graphical representation of the openloop transfer function in the frequency domain when s is replaced with jω It consists of two graphs one for the magnitude of GH in the logarithmic scale another for the phase angle as ω varies Figure 841 shows a typical Bode diagram plotted for G s 1 s2 s 10 by MATLAB As you see the magnitude is drawn on a loglog scale in dB where dB 20 log G jω The phase is also drawn Notice how the magnitude outputinput ratio 20 30 40 50 60 70 80 45 0 90 Phase deg Magnitude deg 135 180 100 101 Frequency radsec 102 Bode Diagram Figure 841 A typical Bode diagram for a secondorder system Motion Control Systems 313 increases at the natural frequency of the system ωn 10 Both graphs also vary significantly depending on the damping ratio However it is possible to draw the Bode diagram albeit with some error at the corner frequencies by drawing asymptotes whose slopes are functions of the order of the system For example for the system in Figure 841 since the transfer function is secondorder the magnitude at higher frequencies decreases at 40 dBdecade while the phase change is 90 degreesdecade Since the magnitude and phase are in logarithmic scale the Bode plots of different parts of the characteristic equation can simply be added together to get the Bode diagram of the whole system For more information and for design techniques using the Bode diagram please refer to other sources 820 OpenLoop vs ClosedLoop Applications You may have noticed that both openloop and closedloop representations have been used for different applications The following is a summary of which one is used for which application Remember that the closedloop transfer function and characteristic equation and the openloop transfer function for the system in Figure 842 are CLTF Y s R s KG KGH 1 OLTF KGH Characteristic equation KGH 1 The openloop transfer function represents the output of the system as measured by the feedback sensor Stability The closedloop transfer function poles are plotted They must be in the lefthalf plane Steadystate error Ess This is related to the system type as well as the type of input The openloop transfer function with unity feedback is used to calculate the steadystate error Root locus The openloop transfer function is used The root locus starts at the poles and ends at zeros or 821 MultipleInput and MultipleOutput Systems Most systems we have considered so far are singleinput singleoutput SISO systems where there is one input and one output For example when a voltage is supplied to a motor the motor rotates and its angular velocity output can be measured However many systems have multiple degrees of freedom where more than one variable controls the systems In this case multiple inputs and multiple outputs MIMO may be present The following are simple examples of how linear MIMO systems may be analyzed K H Ys G Rs Σ Figure 842 A typical feedback control system Introduction to Robotics 314 Example 824 Figure 843 shows a multipleinput singleoutput system Derive the relationship between the inputs and the output Solution There are multiple ways of solving this problem However we simply write R1 YH2 R3 H1 G1 R2 G2 Y R1G1G2YH1H2G1G2R3H1G1G2 R2G2 Y G2 R1G1R3H1G1 R2 Y 1 H1H2G1G2 Y G2 R1G1 R2R3H1G1 1 H1H2G1G2 Example 825 Derive the equations that represent each output of the MIMO system in Figure 844 Solution We write the equations relating to each input and output as follows R1Y2H2 G1 Y1 R2Y1H1 G2 Y2 R2 G1 R1 Y H2 H1 G2 R3 Figure 843 Multipleinput singleoutput system from Example 824 R2 G1 R1 Y1 H2 H1 G2 Y2 Figure 844 MIMO system from Example 825 Motion Control Systems 315 Substitute Y2 into Y1 to get R1 R2Y1H1 G2H2 G1 Y1 R1G1R2G1G2H2 Y1 1G1G2H1H2 Y1 R1G1R2G1G2H2 1G1G2H1H2 Similarly substitute Y1 into Y2 to get R2 R1Y2H2 G1H1 G2 Y2 R2G2R1G1G2H1 Y2 1G1G2H1H2 Y2 R2G2R1G1G2H1 1G1G2H1H2 These two equations may be written in matrix form as Y1 Y2 G1 K G1G2H2 K G1G2H1 K G2 K R1 R2 where K 1G1G2H1H2 A multiaxis robot has multiple inputs and multiple outputs that must be controlled simultaneously However in most robots each axis is controlled individually as a SISO unit Although this introduces some error the error is small for most practical purposes The analysis of these systems is beyond the scope of this introduction to control theory For further reading please refer to related books and journal articles on this topic 822 StateSpace Control Methodology The transfer function that describes the relationship between the input and output of a system is only appli cable when the system is initially relaxed no initial conditions otherwise the Laplace transform cannot be applied and only relates the inputs and outputs but not the internal signals within the system An alternative to this method of representation is statespace where different signals within the system may be linked together in order to create a set of firstorder linear equations that are easy to solve and provide information about internal signals Consider the mechanical system in Figure 84 repeated here k m F x b Figure 84 Repeated Introduction to Robotics 316 The equations describing the motions of the mass as a result of the application of force F are given in Eq 83 as md2x dt2 bdx dt kx F The actual motion is of course a function of the initial conditions of the location and velocity of the mass In other words the succeeding motion location and velocity of the mass depends on where the mass is located and its velocity when the force is applied Each one of these variables is a state Therefore we can express the equation in a different form as follows We choose the position of the mass as one state y1 x We also choose the velocity as the second state therefore y2 x y1 As you see both the initial conditions and the states within the system position and velocity are included in our representations Equation 83 can be written as my1 by1 ky1 F or my2 by2 ky1 F y1 y2 my2 by2ky1 F y1 y2 0 1 k m b m y1 y2 0 1 m F The output can be represented as x 1 0 y1 y2 This is the statespace equation describing the system As you see this is a twodimensional linear time invariant equation where the secondorder part of the equation is converted to firstorder by the introduc tion of the velocity state variable y1 and y2 are states of the system that can be measured say with sensors if necessary Now consider the system shown in Figure 845 with three states x1 x2 x3 and its transfer function derived as RE1 a1 s a2 s2 a3 s3 E1 R E1 1 a1 s a2 s2 a3 s3 Y E1 s3 Y R 1 s3 a1s2 a2s a3 861 Now consider the system in Figure 846 where the input to the system is augmented by feedback from the states as shown such that E2 Rk1x1k2x2k3x3 Notice how each state is the integral of the previous state and how these states are available at any given time 1 s 1 s 1 s a1 a3 a2 R x1 x2 x3 E1 Y Figure 845 A system with three states Motion Control Systems 317 The transfer function of the system can be derived as E2E1 a1 s a2 s2 a3 s3 E1 E2 E1 1 a1 s a2 s2 a3 s3 RE1 k1 s k2 s2 k3 s3 E2 R E1 1 a1 k1 s a2 k1 s2 a3 k1 s3 Y E1 s3 Y R 1 s3 a1 k1 s2 a2 k2 s a3 k3 862 From Eqs 861 and 862 it is clear that the two systems are the same except that each root is supple mented with a k value This provides for a very convenient way to place the roots of the characteristic equa tion at any desired place making this a powerful technique to design a control system Example 826 A plant is modeled as Y R 1 s s 1 s 5 with poles at s 0 s 1 and s 5 How ever to change the behavior of the plant we wish to place the poles at s 10 and s 1 j 3 Find the appropriate values of k to accomplish this Solution The original plant is represented by R y 6y 5y and s3 6s2 5s 0 The desired plant may be represented as s 10 s2 2s 4 s3 12s2 24s 40 0 The augmented characteristic equation may be set equal to the desired one as s3 12s2 24s 40 s3 6 k1 s2 5 k2 s k3 And 6 k1 12 5 k2 24 k3 40 k1 6 k2 19 k3 40 Therefore the poles can easily be located at a desired location 1 s 1 s 1 s a1 a3 a2 R x1 x2 x3 k3 k2 k1 E2 E1 Y Figure 846 The representation of a statespace system Introduction to Robotics 318 One additional benefit of this system is that in cases where the states of the system are not available or the cost of measuring the states may be high it is possible to estimate the expected value of the state from the dynamics of the system In other words if the dynamics of the system are known the states of the system may be estimated as shown in Figure 847a Therefore a system may be devised with estimators that provide values for each state the values are fed into the control system and the response is measured and corrected as needed as shown in Figure 847b Estimators are readily used in many systems from rockets to simple devices Example 827 Using statespace methodology derive the equations describing a DC motor as shown in Figure 848 Solution For the electrical circuit portion of the system where vbemf KBθ KB is a constant we may write Ri Ldi dt e t vbemf e t KBθ For the mechanical side of the system with its inertia of the armature and load and damping and Tbemf Kti where Kt is a constant we may write Tbemf Kti Jθ bθ Plant model R Y ˆx3 ˆx2 ˆx1 Plant Corrected plant model k1 k3 k2 R Y ˆ1 x ˆx2 ˆx3 a b Figure 847 The application of estimators in control systems et R L i vbemf Jθ bθ T θ Figure 848 The electromechanical system for Example 827 Motion Control Systems 319 The states of the motor are the current i angular position θ and angular velocity θ Lets select state variables as x1 θ x2 θ x1 and x3 i Therefore these equations can be written as Lx3 e t KBx2Rx3 Jx2 Ktx3bx2 x1 x2 or x1 x2 x3 0 1 0 0 b J Kt J 0 KB L R L x1 x2 x3 0 0 1 L e t and θ 1 0 0 x1 x2 x3 Once again the secondorder equations are transformed into firstorder linear timeinvariant equa tions where the state variables can be measured and used in controls Obviously there is much more to the statespace control methodology than is covered in this section For further reading on this topic please refer to other books and journal articles 823 Digital Control Digital control is used in systems where microprocessors are used for controlling the system and in which signals are sampled Many of the techniques used in analog control are also used in digital control systems including the root locus leadlag proportional integral and derivative control Bode diagrams and others However one essential difference is that digital systems are discrete not continuous Principally a digital system can first be designed in the splane as an analog system and subsequently through digital filtering be converted to the digital domain called the zplane or it can be designed in the digital domain As long as the sampling rate in the system is relatively high both techniques are accept able Otherwise the system should be designed in the digital domain We will discuss the sampling theorem when we discuss vision systems Suffice it to say here that the sampling rate ωs for a system with a maximum frequency of interest of ω should be ωs 2ω Figure 849 shows a general representation for a digital system A microprocessor or computer generates a control signal that must be converted to an analog signal by a hold circuit or a digitaltoanalog converter R Σ Microprocessor or computer Y Sensor G Hold or DAC Sampler or ADC Figure 849 A typical digital system Introduction to Robotics 320 DAC The plants response is read by a sensor If the sensor is not digital the signal must be sampled and converted to digital form with an analogtodigital converter ADC before it can be used by the microproc essor or computer Now consider a differential equation y ay u Since in digital systems an analog signal is sampled and held until the next sample is taken the signal is discrete an updated value is obtained only when a new sample is taken but remains the same during the interval between samples Therefore y must be represented by a finite difference as y Δy Δt y n y n1 T Substituting into the differential equation we get y n y n1 T ay n u n y n 1 1 aT y n1 Tu n 863 where T is the sampling period Therefore we need to be able to relate each value of the sample to the pre vious ones This is done using the ztransform As we saw the Laplace transforms for functions and their derivatives in continuous domain are defined as f t F s 0 f t estdt and f t sF s f 0 Similarly a ztransform for a discrete domain is defined as F z n 0 f n Z n 864 and Z f n1 z1F z 865 Example 828 If f n 1 for n 012 the ztransform of the function is F z n 0 zn 0 1 zn 1 1 z 1 z2 1 1z1 z z1 Example 829 Derive the ztransform of the following equation y u a1y n1 a2y n2 b0u n b1u n1 b2u n2 Solution Using Eqs 864 and 865 we get Y z a1z1a2z2 Y z b0 b1z1 b2z2 U z Y z 1 a1z1 a2z2 b0 b1z1 b2z2 U z Y z U z b0 b1z1 b2z2 1 a1z1 a2z2 Motion Control Systems 321 There is much more to this subject than is presented here as an introduction For more information about digital control systems please refer to related books and journal articles 824 Nonlinear Control Systems A system is considered linear if the differential equation describing it is linear and if the components of the system behave in a linear fashion This means that if a system responds with outputs y1t and y2t for inputs x1t and x2t respectively its response to an input a1x1 t a2x2 t will be a1y1 t a2y2 t Otherwise the system is nonlinear Most systems are inherently nonlinear For example a springs constant is not really constant However for a small range of displacements we may assume the response is linear Other examples of nonlinearity are saturation backlash hysteresis and piecewise behavior such as in a relay In robotic applications too many elements of the system are inherently nonlinear but they may be assumed linear or they may be linearized for small ranges in order to simplify the analysis In other cases it is also possible to multiply the response of an element or system by the inverse of the component that makes the system nonlinear in order to eliminate its effect For example if the output of a component is a function of sin θ multiplying it by 1sin θ linearizes the output Alternately since sin θ may be represented by a Taylor series function ignoring the higherorder terms also linearizes the function albeit for small angles Figure 850 shows examples of nonlinear behavior of system elements Example 830 The nonlinear equation describing the motion of a pendulum shown in Figure 851 may be linearized for small motions close to θ 0 as follows mlθ mg sinθ ld2θ dt2 g sinθ d2θ dt2 g l sinθ 0 sinθ n 0 θn n dn dθn sinθ θ 0 θ θ3 3 θ5 5 Input Output Input Output Figure 850 Examples of nonlinear behavior of system elements l mg m T mlθ2 mlθ θ Figure 851 The pendulum from Example 830 Introduction to Robotics 322 Ignoring the higherorder terms of the Taylor series simplifies and linearizes the equation to d2θ dt2 g l θ 0 for small θ 825 Electromechanical Systems Dynamics Robot Actuation and Control Although hydraulic and pneumatic actuators are used in certain applications most common industrial robots are electromechanical In these systems the role of the actuator whether prismatic or revolute is to move a joint or a link and change its position The role of the feedback control system is to ensure that the position is achieved in a manner that is satisfactory as planned A system whose role is to control the position of a system and track its motions is called a servomechanism Figure 852 shows a simplified depiction of a control system for a robot As we discussed in Chapters 2 5 6 and 7 the joint values displacement velocity acceleration and applied forces and torques are calculated from kinematic dynamic and trajectory analyses These values are sent to the controller which in turn applies appropriate actuating signals to the actuators to run the joints to their destination in a controlled manner The sensors measure the outputs and feed the signals back to the controller which in turn controls the actuating signals accordingly Robot manufacturers create their own controllers in most cases with pro prietary designs to achieve their design specifications A multiaxis robot has multiple inputs and multiple outputs for each joint that must be controlled simul taneously However in most robots each axis is controlled individually called independent joint control as a singleinput singleoutput unit The coupling effects from other joints are usually treated as disturbances and are taken care of by the controller Although this introduces some error the error is small for most practical purposes Additionally robot dynamics equations have nonlinearities that require more sophisticated control schemes which are beyond the scope of this text For more information on nonlinear control theory see related books and journal articles However the following section shows how a robot actuator may be mod eled for control purposes A robots actuator consists of a motor sensors a controller through which a position reference signal is issued and which provides an actuating signal to the motor and the external load These elements form a system as shown in Figure 853 The motor model contains both an electric circuit as well as mechanical elements such as inertia and damping These two systems are coupled together through the backemf torquevoltage For the electrical circuit portion of the system where vbemf KBθ KB is a constant we may write Ri Ldi dt e t vbemf e t KBθ Control system Robot Sensors Trajectory analysis Disturbances 1 s 1 s θd θd θd θ θ θ Figure 852 The feedback loop of a robot controller Motion Control Systems 323 This equation may be written in the Laplace form as E s RI s LsI s KBsΘ s 0 866 For the mechanical side of the system with its inertia of the armature and the load and damping and Tbemf Kti where Kt is a constant we may write Tbemf Kti Jθ bθ This equation may be written in Laplace form as KtI s Js2Θ s bsΘ s 867 Combining Eqs 866 and 867 and rearranging the terms we get E s R Js2 bs Kt Ls Js2 bs Kt KBs Θ s 868 In practice the inductance of the motor L is usually much smaller than the inertia of the rotor and the load combined and can easily be ignored for analysis Consequently Eq 868 may be simplified to E s R Js2 bs Kt KBs Θ s The transfer function between the output Θs and input Es is TF Θ s E s Kt R Js2 bs KtKBs KtRJ s s b J KtKB RJ 869 If we are interested in the velocity of the motor robots arm in response to the input voltage we may multiply the s in the denominator and Θs to get Ωs Therefore the transfer function may be written as TF Ω s E s K s a where K Kt RJ and a 1 J b KtKB R 870 This transfer function is a firstorder differential equation relating the motor angular velocity to the input voltage and may be used to analyze the response of the motor For example when a particular input voltage is applied to the motor we may analyze the response of the motor its steadystate operation how fast the response is and much more Es R L i vbemf Jθ bθ G1 H1 Θs Θs et θ Σ Figure 853 An electromechanical actuating system and its model Introduction to Robotics 324 Example 831 Assume that the input voltage to the system in Figure 853 is a step function Put Determine the response of the motor and its steadystate value Solution Using Eq 870 as the transfer function and referring to Table 83 we get Ω s K s a P s KP s s a a1 s a2 s a where a1 s KP s s a s 0 KP a and a2 s a KP s s a s a KP a Hence Ω s KP sa KP s a a KP a 1 s 1 s a The inverse Laplace transform of the equation is ω t KP a 1eat and is shown in Figure 854 The steadystate velocity output of the motor using the final value theorem is ωss lim s 0s KP s s a KP a Now lets add a tachometer to the system as a feedback sensor The tachometer measures the angular speed of the motor in response to the actuating signal Figure 855 shows the system in Figure 853 with the added tachometer For the tachometer vb Kf θ The circuit representing the tachometer can be expressed in the Laplace domain as I s Ra RL Ls Vb s Kf sΘ s Vo s I s RL Kf sΘ s RL Ra RL Ls t ωt Figure 854 The approximate response of the motor from Example 831 Motion Control Systems 325 The transfer function for the tachometer is TF V0 s sΘ s V0 s Ω s Kf RL Ra RL Ls m s n 871 where m Kf RL L and n Ra RL L Figure 856 shows the completed block diagram of the system in Figure 855 Equation 868 can also be used to calculate the natural frequency and damping ratio of the system It can be rewritten as E s LJs2 s RJ Lb Rb KtKB Kt sΘ s Therefore the transfer function between the input voltage and output angular velocity is Ω s E s Kt LJ s2 s RJ Lb LJ Rb KtKB LJ Since the characteristic equation is secondorder in the form of s2 2ζωns ω2 the damping coefficient and natural frequency of the joint and the connected load can be calculated 826 Design Projects You may now decide how your robots will be controlled and how you will implement the controllers Many different specifications and characteristics must be defined for a proper controller both in terms of what the controller will include as well as how it will influence the behavior of the robot You may try to Es vin i vbemf Jθ bθ G1 H1 Ra L RL vb vo R θ L Θs Θs Σ Figure 855 An electromechanical system with a tachometer feedback sensor K sa m sn Es Ω s Σ Figure 856 Completed block diagram for the robots actuating motor Introduction to Robotics 326 decide these specifications for your robots including overshoots damping settling and rise times and others However remember that this was an introduction to control systems design We will learn about robot actuators and sensors in the following chapters where many of these decisions will be made when the type of actuators loads and other factors are specified Many student projects include relatively simple microprocessors small loads slow motions and simple control schemes It will be your decision what level of sophistication is needed for your particular project 827 Summary In this chapter we studied the basic principles of control systems how they are analyzed and how they may be designed We also studied some introductory robot actuator modeling techniques You should have learned enough material to be able to follow the design methodology for robot controllers However there is much more to control systems beyond what we can cover in one chapter You should learn more from other references if you expect to design a working controller In the following chapters we discuss actuators sensors and applications and you will come to better understand how control systems play a role in the overall robot design References 1 Nise Norman Control Systems Engineering 7th edition John Wiley and Sons 2014 2 Golnaraghi F B Kuo Automatic Control Systems 10th edition 2017 McGraw Hill 3 Lyshevski Sergey Mechatronics and Control of Electromechanical Systems CRC Press 2017 4 Dorf Richard Robert Bishop Modern Control Systems 11th edition PrenticeHall 2008 5 Bateson Robert Introduction to Control System Technology 7th edition 2002 PrenticeHall 6 Sciavicco Lorenzo Bruno Siciliano Modeling and Control of Robot Manipulators McGrawHill 1996 7 Spong Mark W Seth Hutchinson M Vidyasagar Robot Modeling and Control John Wiley and Sons 2006 8 Craig John J Introduction to Robotics Mechanics and Control 3rd edition PrenticeHall 2005 9 Ogata Katsushito System Dynamics 4th edition PrenticeHall 2004 Problems 81 Derive the inverse Laplace transform of the following equation F s 3 s2 5s 4 82 Derive the inverse Laplace transform of the following equation F s s 6 s s2 5s 6 83 Derive the inverse Laplace transform of the following equation F s 1 s 1 2 s 2 Motion Control Systems 327 84 Derive the inverse Laplace transform of the following equation F s 10 s 4 s 2 3 85 Simplify the block diagram in Figure P85 86 Simplify the block diagram in Figure P86 87 Simplify the block diagram in Figure P87 88 Write an equation that describes the output of the system in Figure P88 A G1 H3 H1 G2 H2 B Figure P85 G1 H1 G2 H2 H3 B A Figure P86 G1 H1 B A G2 G3 G4 H3 Figure P87 G1 H1 G2 Y U1 U2 Figure P88 Introduction to Robotics 328 89 Write the equations that describe the inputoutput relationships for Figure P89 810 Sketch the root locus for the following GH K s s 1 s 3 s 4 811 Sketch the root locus for the following GH K s 6 s s 4 812 Sketch the root locus for the following GH K s 6 s s 10j10 s 10 j10 s 12 813 For the system in Problem 810 assume that two of the roots are chosen at s 5 2 55j Find the systems gain damping ratio and natural frequency Show that the angle criterion is met Can you determine from the root locus whether or not the system is stable 814 For the system in Problem 810 assume that two of the roots are chosen at s 4 1 24j Find the systems gain damping ratio and natural frequency 815 For the system in Problem 811 assume that the roots are chosen at s 3 1 73j Find the systems gain damping ratio and natural frequency Show that the angle criterion is met Can you determine whether or not the system may become unstable as the gain changes 816 For the system in Problem 811 find the roots the gain and the steadystate error for a settling time of less that 1 second and overshoot of 4 or less 817 For the following system find the roots gain and steadystate error for the fastest response and a settling time of less than two seconds and an overshoot of less than 4 GH K s 1 s 3 818 For the system in Problem 817 select the locations and the proportional and integral gains to change it to a proportionalplusintegral system with zero steadystate error G1 G2 Y1 U1 U2 U3 Y2 H1 H2 Figure P89 Motion Control Systems 329 819 For the system in Problem 817 we would like to improve the settling time to one second by adding a zero to the system proportionalplusderivative Find a proper location for the zero and the loop gain 820 For the system in Problem 619 add an integrator to the system to make it into a PID system in order to achieve a zero steadystate error Find the location of an additional zero and the proportional deriv ative and integral gains Introduction to Robotics 330 9 Actuators and Drive Systems 91 Introduction If the links and the joints of a robot are its skeleton the actuators are its muscles The actuator must have enough power to accelerate and decelerate the links and to carry the loads and yet be light economical accurate responsive reliable and easy to maintain There are many types of actuators available and undoubtedly there will be more varieties available in the future At least the following types are worth mentioning Electric motors Servomotors Stepper motors Directdrive electric motors Hydraulic actuators Pneumatic actuators Novelty actuators Electric motors and specially servomotors are the most commonly used robotic actuators Hydraulic sys tems were very popular for large robots in the past and are still around in many places but are no longer as popular except for specific applications Pneumatic actuators are used in robots that have a half degree of freedom or onoff type joints as well as for insertion purposes Novelty actuators including directdrive elec tric motors electroactive polymer actuators musclewire actuators and piezoelectric actuators eg for micro positioning are mostly used in research and development work or as specialty items for specific pur poses but may become more useful in the future In the following section we compare the common characteristics of different types of actuators followed by the individual study of each type 92 Characteristics of Actuating Systems The following characteristics may be used to compare different actuating systems In addition to these depending on the special circumstances in which the actuator is used other characteristics may be relevant Examples include underwater systems where waterproof operation of a system is very important and space systems where the liftoff weight and reliability are of absolute importance 921 Nominal Characteristics Weight PowertoWeight Ratio Operating Pressure Voltage and Others It is important to consider the nominal characteristics of actuators These include weight power and power toweight ratio operating pressure operating voltage temperatures and others For example since in serial 331 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed robotic systems the actuators are placed directly at the joints and therefore move with them the weight of the actuator acts as a load on the preceding actuators and must be accelerated and decelerated by them A heavier actuator downstream requires more torque upstream resulting in larger power requirements and heavier actuators Consequently it is crucial to consider the weight and placement of actuators Another important characteristic is the powertoweight ratio For example the powertoweight ratio of electric systems is average Stepper motors are generally heavier than servomotors for the same power and therefore have a lower powertoweight ratio Hydraulic systems have the highest powertoweight ratio However it is important to realize that in these systems the weight is actually composed of two portions the hydraulic actuator and the hydraulic power unit The systems power unit consists of a highpressure pump a reservoir filters electric drive motor to drive the pump cooling unit valves and so on However the power unit is normally stationary somewhere away from the robot itself It does not move with the actu ator The power is brought to the robot via an umbilical tether hose Consequently the actual powerto weight ratio of the actuator is very high for the moving parts If the power unit must also move with the robot eg a hydraulic transportation robot the total powertoweight ratio will be much less Pneumatic actuators deliver the lowest powertoweight ratio The power that the hydraulic system delivers is very high due to high operating pressures This may range from 505000 psi 0345 to 345 MPa Pneumatic cylinders normally operate around 100120 psi 069 to 083 MPa The higher pressures in hydraulic systems create higher power concentrations but also require higher maintenance if a leak occurs they can be more dangerous Electric motors that operate at a higher voltage have a better powertoweight ratio too Additionally as we will see later for the same power output as the voltage to an electric motor increases the required current will decrease reducing the size of the required wires The heat generated in the motor is a secondorder function of the current and therefore as the current decreases the generated heat decreases and efficiency is increased 922 Stiffness vs Compliance Stiffness is the resistance of a material against deformation It may be the stiffness of a beam against bending under the load the resistance of a gas against compression in a cylinder under load or resistance of wine against compression in a bottle during corking operation A stiffer system requires a larger load to deform Conversely a more compliant system requires a smaller load to deform Stiffness is directly related to the modulus of elasticity of the material The modulus of elasticity of fluids can be around 1 106 psi 6900 MPa which is very high As a result hydraulic systems are very stiff and non compliant Conversely because air is compressible pneumatic systems are compliant Stiffsystemshaveamorerapidresponsetochangingloadsandpressuresandaremoreaccurate Obviouslyif a system is compliant it can easily deform or compress under changing load or changing driving force and consequently it is inaccurate Similarly if the driving pressure in a hydraulic ram is increased slightly due to its stiffness it responds more rapidly and more accurately than a pneumatic system that deforms under the load Additionallyastiffsystemresistsdeformationundertheloadandthereforeholdsitspositionmoreaccurately Now consider a robot that is used to insert an IC chip into a circuit board If the system is not stiff enough it will not be able to push the chip into the board because the actuator may deform under the resistive force On the other hand if the part and the holes are not perfectly aligned a stiff system does not deform enough to prevent damage to the robot or the part whereas a compliant system gives to prevent damage So although stiffness causes a more responsive and more accurate system it also creates a danger if all things are not always perfect Consequently a working balance is needed between these two competing characteristics We will discuss a particular solution to this problem called a remotecenter compliance RCC device later 923 Use of Reduction Gears Some systems such as hydraulic actuators and directdrive electric motors are capable of producing very large forces or torques at high resolution This means that the actuator may be moved very slightly while Introduction to Robotics 332 delivering its full force or torque As a result there is no need to use reduction gears to increase the torque it produces and to slow it down to manageable speeds For this reason hydraulic actuators can be directly attached to the links to simplify the design reduce the weight cost and rotating inertia of joints reduce back lash increase reliability of the system due to simpler design and fewer parts and reduce noise On the other hand electric motors rotate at high speeds up to many thousands of revolutions per minute and must be used in conjunction with reduction gears to increase their torque and decrease their speed as no one would want a robot arm to be rotating at such high speeds This of course increases the cost number of parts backlash inertia of the rotating body and so on but also increases the resolution of the system because it is possible to rotate the link a very small angle Now suppose that a set of reduction gears with a ratio of N is connected to a load with inertia Il and to a motor with inertia Im including the inertia of the reduction gears as shown in Figure 91 The torque and speed ratio between the motor and the load are Tl N Tm θl 1 N θm and θl 1 N θm 91 If we write the torque balance equation for the system from freebody diagrams in Figure 92 and substitute from Eq 91 we get Tm 1 N Tl Imθm bmθm and Tl Ilθl blθl Tm Imθm bmθm 1 N Ilθl blθl Tm Imθm bmθm 1 N2 Ilθm blθm 92 where bm and bl are viscous coefficients of friction for the motor and the load As Eq 92 indicates the effective inertia of the load felt by the motor is conversely proportional to the square of the reduction gear ratio or IEffective 1 N2Il and ITotal 1 N2Il Im 93 So the motor will only feel a fraction of the actual inertia of the load which in the case of a robot constitutes both the manipulator and the load it carries Reduction ratios of 20100 are common in manipulator robots Therefore the total inertia applied to the motor from the load may only be 1400th to 110 000th of the actual Il Im Tm N θm θl Tl Figure 91 Inertia and torque relationship between a motor and a load Actuators and Drive Systems 333 inertia allowing the motor to accelerate and decelerate quickly Considering that a rule of thumb for high inertia is Iload 5Irotor this is a significant improvement In both electric and hydraulic directdrive systems the actuators are exposed to the full inertial loads With high gear ratios the inertial effects of the load can actually be ignored in the control system of the robot Note that the opposite is also true that the effect of the inertia of the motor on the load is also 40010 000 times larger To reduce this effect designers opt to use pancake motors or lowinertia motors with long slender rotors Example 91 A motor with rotor inertia of 0015 kgm2 and maximum torque of 8 Nm is connected to a uniformly distributed arm with a concentrated mass at its end as shown in Figure 93 Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the total inertia felt by the motor and the maximum angular acceleration it can develop if the gear ratio is a 3 or b 30 N Free body diagram Inertiaangular acceleration diagram Tl Il Tl Tl bmθm blθl Im Imθm Ilθl Tm N Figure 92 Freebody diagrams of the motor and the load Tm Tl N x y z 05 m m 3 kg m 2 kg Im Figure 93 Schematic drawing of the system from Example 91 Introduction to Robotics 334 Solution This is very similar to a robot arm and a servomotor actuator The total moment of inertia of the arm and the concentrated mass at the center of rotation is Il Iarm Imass 1 3marml2 mmassl2 1 3 3 0 5 2 2 0 5 2 0 75 kgm2 From Eq 93 a ITotal 1 9 0 75 0 015 0 098 kgm2 b ITotal 1 900 0 75 0 015 0 0158 kgm2 As you see with the higher gear ratio the contribution of the load to the total inertia is very little The maximum angular accelerations are a θm Tm Itotal 8 0 098 82 radsec2 b θm Tm Itotal 8 0 0158 506 radsec2 The noload maximum angular acceleration of the motor would be about 530 radsec2 93 Comparison of Actuating Systems Table 91 is a summary of actuator characteristics We will refer to and discuss these characteristics through out this chapter 94 Hydraulic Actuators Hydraulic systems and actuators offer a high powertoweight ratio large forces at low speeds both linear and rotary actuation compatibility with microprocessor and electronic controls and tolerance of extreme hazard ous environments They can hold a load without need for a brake generate less heat at the actuator and apply a torque without the need for gearing Many large robots of the past decades mostly used in automobile pro duction were hydraulic robots However due to the leakage problem that is almost inevitable in hydraulic sys tems and due to their power unit weight and cost they are no longer common Nowadays most robots are electric However many robots in industry still have hydraulic actuators Additionally for special applications such as very large robots in civil and military service hydraulic actuators may be the appropriate choice One important difference between hydraulic actuators and electric motors is that the hydraulic pump not the actuator may be sized for average load whereas electric actuators must be sized for maximum load This is because a hydraulic system uses an accumulator that stores the constant energy of the pump and can han dle larger loads when necessary Another important consideration is that in general an electric motor is located at or near a joint adding to the mass and inertia of the robot However in hydraulic systems only the actuator and the control valves are near the joints The hydraulic power unit may be located remotely reducing the mass and inertia Actuators and Drive Systems 335 The total force that a linear cylinder can deliver can be tremendously large for its size A hydraulic cylinder can deliver a force of F p A lb or N where A is the effective area of the piston or ram and p is the working pressure For example for a 1000 psi pressure every square inch of the cylinder develops 1000 lb of force In rotary cylinders the same principle is true except that the output is a torque where dA t dr T r2 r1 p r dA r2 r1 p r t dr pt r2 r1 r dr 1 2pt r2 2 r2 1 94 where p is the fluid pressure t is the thickness or width of the rotary cylinder and r1 and r2 are the inner and outer radii of the rotary cylinder as shown in Figure 94 Fluid in Fluid out Rotary vane r1 r2 Figure 94 A rotary hydraulic actuator This actuator can be directly attached to a revolute joint without any need for gear reduction Table 91 Summary of actuator characteristics Hydraulic Electric Pneumatic Good for large robots and heavy payloads Highest powerweight ratio Stiff system high accuracy better response No reduction gear needed Can work in wide range of speeds without difficulty Can be left in position without any damage May leak not fit for clean room applications Requires pump reservoir motor hoses etc Can be expensive and noisy requires more maintenance Viscosity of oil changes with temperature Very susceptible to dirt and other foreign material in oil Low compliance High torque high pressure large inertia on the actuator Good for all sizes of robots Better control good for highprecision robots Higher compliance than hydraulics Reduction gears reduce inertia on the motor Does not leak good for clean room Reliable low maintenance Can be sparkfree good for explosive environments Low stiffness Needs reduction gears increased backlash cost weight etc Motor needs braking device when not powered otherwise the arm may fall Many components are usually offtheshelf Reliable components No leaks or sparks Inexpensive and simple Low pressure compared to hydraulics Good for onoff applications and pick andplace Compliant systems Noisy Require pressurized air filter and so on Difficult to control and maintain linear position Deform under load constantly Very low stiffness inaccurate response Lowest powerto weight ratio Introduction to Robotics 336 The flow rate and volume of fluid needed in a hydraulic system are d Vol πd2 4 dx 95 Q d Vol dt πd2 4 dx dt πd2 4 x 96 where dx is the desired displacement and x is the desired velocity of the piston By controlling the volume of the fluid going into the cylinder the total displacement can be controlled By controlling the rate at which the fluid is delivered to the cylinder the velocity can be controlled This is done through a servovalve that con trols both the volume of the fluid as well its rate A hydraulic system generally consists of the following components or subsystems Hydraulic linear or rotary actuators that provide the force or torque needed to move the joints and are controlled by the servovalves or manual valves Hydraulic pump that provides high pressure fluid to the system Electric motor or in cases such as in a mobile unit an engine that operates the hydraulic pump Cooling system or fans to dissipate the generated heat Fluid reservoir tank Accumulators that are used to store extra energy for maximum loads especially when the pump is designed for average use Servovalves that control the amount and the rate of fluid to the cylinders Checkvalves for safety and controlling maximum pressure Holding valves used to prevent the actuator from moving when the system is turned off or power is lost Connecting hoses between the cylinders and the reservoir Filtering system to maintain the quality and purity of the fluid Due to its nature moisture in the fluid damages hydraulic actuators and must be separated from the fluid Sensors that are used as feedback to control the motion of the actuators Figure 95 is a schematic drawing of a typical hydraulic system 95 Pneumatic Devices Pneumatic devices are principally very similar to hydraulic systems A source of pressurized air is used to power and drive linear or rotary cylinders controlled by manual or electrically controlled solenoid valves Since the Hydraulic power unit Source Return Servovalve Servomotor Sensors Controller Accumulator Figure 95 Schematic of a hydraulic system and its components Actuators and Drive Systems 337 source of pressurized air is separate from the moving actuators these systems may have lower inertial loads However since pneumatic devices operate at a much lower air pressure than the hydraulic units usually up to 100120 psi 069 to 083 MPa their powertoweight ratio is much lower than hydraulic systems The major problem with pneumatic devices is that air is compressible and as a result its volume changes under load Consequently pneumatic actuators are usually only used for insertion purposes where the actu ator is all the way forward or all the way back or they are used with halfDOF joints that are fully on or fully off Otherwise controlling the exact position of pneumatic cylinders is very difficult One way to control the displacement of the pneumatic cylinders is called differential dithering In this sys tem the exact location of the piston is sensed by a feedback sensor such as a linear encoder or potentiometer This information is used in a controller that controls the air pressure on the two sides of the cylinder through a servovalve to control the exact position 1 Pneumatic actuators are simple rugged and safe Even if they leak the air is not a contaminant Most com ponents are off the shelf and therefore easy to use and inexpensive They are mostly used either as onoff devices or as accessories in a robotic cell in conjunction with robots for material handling and similar purposes 96 Electric Motors When a conductor wire carrying a current is placed within a magnetic field it experiences an electromotive force emf normal to the plane formed by the magnetic field and the current Consequently each side of the wire coil in Figure 96 experiences a force as shown If the wire is able to rotate about an axis the resulting torque rotates it until the torque is zero Switching the direction of the magnetic field or the current causes a change in the direction of the force If there is a second conductor perpendicular to the first and if we now pass the current through the second conductor it will also rotate 90 Continually passing the current through each conductor can force them to rotate In practice in order to accomplish this change in the cur rent either a set of commutators and brushes or slip rings are used with DC motors the current is electron ically switched in brushless DC motors or AC current is used with AC motors although in this case the permanent magnets and the coil are switched 2 This is the basic principle behind all electric motors Sim ilarly if a conductor is moved within a magnetic field crossing the flux a current is induced in the conductor like a generator This is called backelectromotive force backemf There are many types of motors including AC induction motors AC synchronous motors DC brushed motors DC brushless motors stepper motors directdrive DC motors switched reluctance motors AC DC universal motors and other varieties such as threephase AC motors disk motors and others Although we will discuss a number of issues about electric motors the assumption is that you have already studied different motors and how they operate So the discussion here will be at a minimum and only about the Current Field Force N S Force N S Figure 96 A wire carrying a current placed within a magnetic field will experience a force in a direction normal to a plane formed by the current and the field Introduction to Robotics 338 subjects that are directly related to robotic actuation Please refer to other sources for additional detail about motors and their drive circuitry All types of electric motors can be used as a servomotor as will be discussed later In each case the torque or power output of the motor is a function of the strength of the magnetic fields and the current in the windings as well as the length of the conductors of the coils Some motors have permanent magnets PMs These motors generate less heat since the field is always present and no current is needed to build it Others have a soft iron core and coils where an electric current creates the magnetic field In this case although more heat is generated the magnetic field can be varied when needed by changing the current whereas in permanent magnet motors the field is constant Additionally under certain conditions it is possible that the permanent magnet may get damaged and lose its field strength in which case the motor becomes useless 961 Fundamental Differences Between AC and DCType Motors There are some fundamental differences between AC and DCtype motors that dictate their power range control and applications In the following sections we will discuss these differences and their effects The first major difference between these motors is whether or not their speed can be controlled This will be discussed later with servomotors but suffice it to say that the speed of rotation of a DC motor can be con trolled by changing the current to the windings as the current increases or decreases for the same load on the rotor its speed also increases or decreases However the speed of an AC motor among other things is a function of the frequency of the supplied AC power Since the frequency of the AC power is constant the speed of a synchronous AC motor is generally constant The second major factor in the difference between brushed and brushless motors is the life of the brushes and commutators as well as the physical limitation of mechanical switching by brushes Brushless DC motors AC motors and stepper motors are all brushless and therefore they are sturdy and generally have a long life only limited by the life of the rotor bearings Since brushes wear out the life of brushed motors is limited and they require more maintenance The third important issue in the design and operation of all motors is heat dissipation As with many other devices the generated heat in motors eventually becomes the deciding factor about its size and power The heat is generated primarily from the resistance of the wiring to electric current load related but includes heat due to iron losses including eddy current losses and hysteresis losses friction losses brush losses and shortout circuit losses speed related As we will see in more detail later the generated heat is a function of current W i2R A rule of thumb is that a motor may draw five to seven times its rated amperage during 080 full speed which makes this an additional important consideration Thicker wires generate less heat but are more expensive and heavier more inertia and require more space All motors generate this heat However the rate at which the heat is dissipated is very important as is the path that the heat must take to dissipate The heat path is more important than the amount of heat since if the dissipation is faster more generated heat can be dissipated before damage occurs Figure 97 shows the heatdissipation path to the environment for motors in which the rotor contains the winding versus motors in which the stator contains the winding In motors with the winding carrying the PM stator Air gap Motor body Stator winding Motor body 30 30 30 30 Rotor winding PM rotor Air gap Figure 97 Heatdissipation path of motors Actuators and Drive Systems 339 current within the rotor the heat is generated in the rotor This heat must travel from the rotor through the air gap through the permanent magnets through the motors body and be dissipated into the environment it may also go through the shaft to the bearings and out As you know air is a good insulator Therefore the total heattransfer coefficient for this type of motors is relatively low On the other hand in motors where the winding is within the stator the generated heat is dissipated to the air by conduction through the motors body As a result the total heattransfer coefficient is relatively high especially because no air gap exists Consequently these motors can be exposed to relatively higher currents without damage and therefore they are generally more powerful for the same size AC motors stepper motors and brushless DC motors have windings in their stator Overheating may be the most common cause of failure for electric motors It can lead to Failure of the winding isolation causing shorts or burnouts Failure of the bearings resulting in jamming the rotor shaft Degradation of the magnets permanently reducing the motors torque It is estimated that every 10 C increase in the temperature of the motor beyond the recommended values can cut the life of the insulation by half Heat development in a motor is not linear and is a function of the following 3 The basic heat generated in the winding The increase in the wiring resistance as the winding heats up further increasing heat generation The strength of the magnetic flux which is negatively affected by heat reducing the torque and requiring additional current Increasing heat dissipation as temperature rises Therefore it is possible that the motor may achieve equilibrium at an acceptable temperature or the danger exists that the temperature may continue to rise to failure The heat generated in a motor is Pelectric i2R T2 Kt2Rt 97 where i is the current in the winding R and Rt are the nominal electrical resistance of the winding and the resistance at temperature t and T is the torque Kt is the torque constant at temperature t and is a function of the magnetic field number of turns of the windings the effective area of the air gap the radius of the rotor and material properties The variations in the winding electrical resistance can be described by Rt Rref 1 twinding tref α 98 where Rt and Rref are the electrical resistance at the temperature of interest twinding and room temperature tref and α is a material constant αcopper 0 00393 K 1 The torque constant representing the magnetic field of the motor varies with temperature as Kt Kref 1 tmagnet tref β 99 Here Kt and Kref represent torque constants at the temperature of interest tmagnet and the reference tem perature 20 C and β represents the decay of magnetic fluxdensity a material dependent property Since this decay is negative magnetic flux decreases as temperature increases A simplified model for the final tem perature of the motor can be written as tmotor Pelectric Pfriction Rthermal tref 910 where Rthermal is the thermal resistance between the motor and the ambient Through these equations we can estimate the elevated temperature of the motor and find out whether or not it is at equilibrium Introduction to Robotics 340 Example 92 A motor develops a torque of 12 Nm at its nominal speed with reference electrical resistance of 8Ω The reference torque constant for the motor is 05 NmA and the thermal resistance for the motor is 105 KW Ambient temperature is assumed to be 20 C For the material used in the motor β 0 002 K Friction is ignored a Find whether or not the motor temperature will stabilize and if so find the converged value b Repeat the same assuming that due to improvements in heat dissipation for example by using a fan thermal resistance is reduced to 102 KW Solution a Substituting these values in Eqs 97910 we get the following power based on initial resistance Pelectric T2 Kt2Rt 1 22 0 52 8 46W and tmotor Pelectric Pfriction Rthermal tref 46 0 1 05 20 68 C At this temperature both the resistance and the torque constant change and we get Rt Rref 1 twinding tref α 8 1 6820 0 00393 9 5Ω Kt Kref 1 tmagnet tref β 0 5 1 6820 0 002 0 452NmA Resubstituting these values into Eqs 97 and 910 we get a new temperature of Pelectric 1 22 0 4522 9 5 67W tmotor 67 0 1 05 20 90 C The next iterations of the same process show that the temperature continues to rise At iteration 20 the temperature is 180 C degrees and rising uncontrollably indicating that the motor will overheat b Repeating the same with the new thermal resistance will converge after about 30 iterations to near 130 C Therefore it is clear that the proper dissipation of heat is a major issue in motors It should be clear from the preceding discussion that a motor construction with windings in the stator is preferable when considering heat generation and deterioration of the brushes whereas a motor with the winding within the rotor is preferred for speed control A combination of both characteristics would be ideal As we will see in more detail later brushless DC motors and stepper motors possess these characteristics and therefore are more robust and last longer In the following sections we briefly discuss DC motors servomotors brushless DC motors and stepper motors 962 DC Motors DC motors are very common in industry and have been used for a long time As a result they are reliable sturdy and relatively powerful Actuators and Drive Systems 341 Most DC motors consist of permanent magnet stators with a fixed flux or windings that carry a current and can create a variable flux and a rotor that has the winding coils that carry a current Through brushes and commutators the current flows through the windings sequentially causing the rotor to rotate continuously Conversely if the rotor is forced to rotate within the magnetic field a DC current develops and the motor acts as a generator the output is DC but not constant Figure 98 shows the construction of a DC motor its commutators and brushes and the permanent magnet stator If permanent magnets are used to generate the magnetic field the output torque T is proportional to the magnetic flux ϕ and the current in the rotor windings i Then T α ϕ i kt i 911 where kt is called the torque constant Since in permanent magnets the flux is constant the output torque becomes a function of i and to control the output torque i or corresponding voltage must be changed If instead of permanent magnets soft iron cores with windings are used for the stator as well then the output torque is a function of currents in both the rotor and the stator windings as T ktkf irotoristator 912 where both kt and kf are constants Assuming no power loss during this energy conversion the total input must be equal to the output Therefore P T ω E i E T ω i kt ω 913 which indicates that voltage E is proportional to the angular velocity of the motor ω This voltage is called the backemf voltage and is generated across the motor because the windings cross the magnetic field Therefore as the rotor speed increases so does the backemf voltage Since in reality the rotor windings have both resist ance and inductance we can write Figure 99 V Ri Ldi dt E 914 Figure 98 The stator rotor commutators and the brushes of a DC motor R L i E V M J ω Figure 99 Schematic diagram showing a DC motor armature circuit Introduction to Robotics 342 Substituting Eqs 911 and 913 into 914 and rearranging it we get kt R V T L R dT dt kt 2 R ω 915 L R is called motor reactance and is usually small therefore the differential term may be ignored for simplicity of analysis at this time Consequently we get T kt R V kt 2 R ω 916 Equation 916 shows that as input voltage V increases the output torque of the motor increases as well It also shows that as the angular velocity increases the torque decreases due to backemf Therefore when ω 0 torque is the greatest stalled torque and when ω is at its nominal maximum value T 0 and the motor does not produce any useful torque Figure 910 Referring to Eq 913 the output power of the motor is zero when either the angular velocity of the motor at stall condition or the torque at maximum speed are zero as shown in Figure 910 Through the use of powerful magnets made of rareearth materials and alloys such as neodymium the performance of motors has improved significantly albeit at higher costs As a result the powertoweight ratio of motors is much better than before and they have replaced almost all other types of actuators To overcome the problem of high inertia and the large size of many electric motors a disk also called a pancake or hollow rotor can be used In these motors the iron core of the rotor winding is eliminated to reduce its weight and inertia and as a result these motors are capable of producing very large accelerations zero to 2000 rpm in one ms 4 and they respond very favorably to changing currents for control purposes Figure 911 shows a motor in which the hollow rotor has no soft iron In the disk motor in Figure 912 the Torque Speed Tmax ωmax ωmax V 1 2 Power Figure 910 The output torque and power of a DC motor versus its angular velocity Figure 911 Eliminating the soft iron from a rotor makes it lightweight with low inertia Actuators and Drive Systems 343 rotor is a flat printed thin plate with windings etched into it as if we would flatten a rotor into a disk The permanent magnets are generally small short cylindrical magnets that are placed on the side of the disk As a result disk motors are very thin and are used in many applications where both space and acceleration requirements are important Another alternative to save space and reduce inertia is to use a frameless motor as shown in Figure 913 These motors can be directly integrated into the structure of the joint Similar gear reduction can be used for proper rotational speed and torque requirements 963 AC Motors AC motors use the alternating nature of AC power to switch the direction of flux therefore all commutators and brushes are unnecessary The stator houses the coils In synchronous AC motors the rotor is a perma nent magnet In induction AC motors the rotor is a matrix of conductors either in the shape of a cage called squirrelcage motors or a ferric rotor that carries no current as shown in Figure 914a As the flux generated Figure 912 A disk pancake motor The rotor has no iron core and consequently has very little inertia As a result it can accelerate and decelerate very quickly Source Pictures courtesy of Automation Source Technologies and Printed Motor Works Ltd UK Figure 913 Frameless motors can be directly integrated into the joint structure to save space and reduce weight Source Courtesy of Maxon Precision Motors Introduction to Robotics 344 by the AC current changes the rotor follows it and rotates As a result unlike DC motors AC motors have fixed nominal speeds a function of the number of poles on their rotor and the line frequency eg 60 Hz Since AC motors can dissipate heat more favorably than DC motors they can be more powerful The same principles of backemf see Section 966 hold for AC motors as well Nowadays with the available power electronics it is possible to use methodologies such as flux vector con trol to generate a sinusoidal current with desired frequency and amplitude that enable us to control the speed and torque of an AC motor This is accomplished by converting the AC line voltage to a DC form and creating an approximate pulsed sinusoidal DC current at the desired frequency and magnitude to drive the motor Stepper motors driven in microstepping mode and brushless DC motors are similar attempts at making DC motors operate similar to an AC motor There are also reversible AC motors available In this case the motor winding is centertapped therefore as the current flows in each half of the winding the direction of the flux and consequently the rotation of the rotor changes as shown in Figure 914b However since the current flows in only half of the winding the generated torque is half as much There is a wealth of information about practical applications of both DC and AC motors available far beyond the scope of this book For more information please refer to the internet and references such as 5 in this series of articles commercial motor characteristics construction standards and applications are discussed 964 Brushless DC Motors Brushless DC motors are a hybrid of AC motors and DC motors Although not exactly the same their con struction is very similar to an AC motor The windings constitute the stator and the rotor is a permanent magnet usually with multiple poles The major difference is that brushless DC motors are operated with an electronically switched DC waveform that is similar to an AC current either sine wave or trapezoidal waveform but is not necessarily at 60 Hz As a result unlike AC motors DC brushless motors can be oper ated at any speeds including very low speeds To operate a feedback signal is necessary to determine when to switch the direction of the current In practice a resolver an optical encoder or Halleffect sensors send signals to a controller which switches the current to the stator For smooth operation and almostconstant torque the stator usually has three phases in it 2 6 Therefore three currents with a 120 phase shift are fed into the stator Brushless DC motors are operated by a controller circuit They will not operate if you connect them directly to a DC power source Figure 915a shows a radialtype brushless DC motor with the rotor and stator side by side Figure 915b is the stator of an axialtype brushless motor i i a b Figure 914 An AC motor and centertapped AC motor winding Actuators and Drive Systems 345 965 DirectDrive Electric Motors Directdrive electric motors are very similar in construction to brushless DC motors or stepper motors The major difference is that they are designed to deliver a very large torque at very low speeds with very high resolution These motors are intended to be used directly with a joint without any gear reduction Direct drive motors can be very expensive and very heavy but have impressive characteristics A voice coil may be used as a directdrive actuator for lowtorque but highresolution applications Voice coils are commonly used in disk drives and deliver impressive characteristics in reliability and resolution Figure 916 shows a disk drive voice coil actuator 966 Servomotors An important issue in all electric motors is the backemf As discussed earlier a conductor carrying a current within a magnetic field will experience a force which causes it to move Similarly if a conductor moves within a magnetic field such that it crosses the field lines or if the field strength changes eg when a coil is turned off a current is induced into the conductor This is the basic principle of electric power generation a b Figure 915 Brushless DC motors Figure 916 Disk drive voice coil actuator Introduction to Robotics 346 However it also means that when the wires of the windings in a motor are rotating within the magnetic field of the magnets a current or voltage is induced in them in the opposite direction of the input current back emf which can be thought of as tending to reduce the effective current of the motor The faster the motor rotates the larger the backemf Backemf current is usually expressed as a function of rotor speed as shown in Eq 913 and repeated here E kt ω where kt is typically given in volts per 1000 rpm As the motor approaches its nominal noload speed the backemf is large enough such that the motor speed stabilizes at the nominal noload speed with its corre sponding effective current However at this nominal speed the output torque of the motor is essentially zero The motors velocity is governed by Eq 916 repeated here T kt R V kt 2 R ω As shown in Figure 910 at maximum ω the output torque is zero With constant input voltage V if a load is applied to the motor it slows down resulting in a smaller backemf larger effective current and conse quently a positive net torque The larger the load the slower the motor rotates in order to develop a larger torque If the load becomes increasingly larger there comes a time when the motor stalls there is no back emf the effective current is at its maximum and the torque is at its maximum In each case when the back emf is smaller and the output torque is larger since the net current is larger so is the generated heat Under stall or nearstall conditions the generated heat may be large enough to damage the motor This is why the recommended peak torque is generally very different from continuous duty torque To increase the motor torque while maintaining a desired speed the input voltage V or current to the rotor or stator or both if soft iron magnets are used must be increased In such a case although the motor rotates at the same speed and although the backemf is still the same the larger voltage increases the net effective current and consequently the torque By varying the voltage or corresponding current the speedtorque balance can be maintained as desired This system is called a servomotor It should be men tioned here that monitoring the sudden changes in the required current in a servomotor or a sudden change in the load can be related to a robot hitting an object or colliding with a human Consequently it is possible to use this to control the motions of a collaborative or cooperative robot and to stop it immediately if the load suddenly increases unexpectedly A servomotor is a DC AC brushless or even stepper motor with feedback called an integrated hybrid servomotor that can be controlled to move at a desired speed and torque for a desired angle of rotation To do this a feedback device sends signals to the servocontroller circuit reporting its angular position and velocity If as a result of higher loads the velocity is lower than desired set value the voltage or current is increased until the speed is equal to the desired value If the speed signal shows that the velocity is larger than the desired value the voltage is reduced accordingly If position feedback is used as well the feedback signal is used to shut off the motor as the desired angular position is achieved We will discuss sensors in Chapter 10 Here suffice it to say that many different types of sensors may be used for this purpose including encoders resolvers potentiometers and tachometers If a position sensor such as a potentiometer or encoder is used its signal can be differentiated to produce a velocity signal Figure 917 shows a servomotor with its associated feedback device and circuitry and a schematic drawing of a simple control block diagram for a servomotor 967 Stepper Motors Stepper motors are versatile robust simple motors that can be used in many applications In most applica tions stepper motors are used without feedback although they can be used with feedback as servomotors too This is because unless a step is missed the motor rotates a known angle each time it is stepped Therefore its Actuators and Drive Systems 347 angular position is always known and no feedback is necessary Stepper motors come in many different forms and principles of operation Each type has certain characteristics unique to it making it an appropriate choice for particular applications Most stepper motors can be used in different modes by wiring them differently Unlike regular DC or AC motors but like brushless DC motors if you connect a stepper motor to power it will not rotate Steppers rotate only when the magnetic field is rotated through its different windings In fact their maximum torque is developed when they do not turn Even when not powered steppers have a resistive torque called detent or residual torque An external torque must be applied to turn a stepper motor even when not powered Stepper motors need a microprocessor or drivercontroller indexer circuit for rotation You may either create your own driver or purchase an indexer that drives the stepper motor for you Similar to servomotors which require feedback circuitry stepper motors need drive circuitry So in each application the designer must decide which type of motor is more appropriate For industrial robotic actuation except in small tabletop robots stepper motors are hardly ever used without feedback However stepper motors are used extensively in nonindustrial robots and robotic devices as well as in machines used in conjunction with robots from materialhandling machines to peripheral devices and from automatic manufacturing to control devices Without feedback stepper motors should be used in applications where the certainty of not missing steps is high or the price of missing steps is low or where the motor resets itself repeatedly during operations such that even if a step is missed it will correct itself soon eg a printer For more information about stepper motors versus servomotors see 7 Structure of Stepper Motors Generally stepper motors have soft iron or permanent magnet rotors while their stators house the winding coils Based on the discussion in Section 961 since the heat generated in the coils can more easily dissipate a Motor dynamics Load Desired position and velocity Error Feedback Output position Differentiate Velocity b Figure 917 a A servomotor and b the schematic of a servomotor controller A sensor sends velocity and position signals to the controller which controls the output velocity and position of the servomotor Introduction to Robotics 348 through the motors body stepper motors are less susceptible to heat damage and since there are no brushes or commutators they have long life The rotors of stepper motors are not all alike We will discuss two types of rotors later In each case though the rotor follows a moving magnetic field generated by the coils As a result somewhat similar to both AC motors and brushless DC motors a rotor follows a moving field under the control of a controller or driver In the next sections we study how stepper motors operate Principle of Operation Generally there are three types of stepper motors variable reluctance permanent magnet also called a can stack and hybrid Variable reluctance motors use a soft iron toothed rotor Permanent magnet canstack type motors use a permanent magnet rotor without teeth Hybrid motors have a permanent magnet but toothed rotor These simple differences result in somewhat different principles of operation In the following sections we discuss canstack and hybrid motors The variable reluctance motors operate with the same prin ciple as hybrid motors Imagine a stepper motor with two coils as its stator and a permanent magnet as its rotor as in Figure 918 When one of the coils of the stator is energized the permanently magnetized rotor or soft iron in variable reluctance motors rotates to align itself with the stator magnetic field Figure 918a The rotor stays at this position unless the field rotates When this coil is turned off and the second coil is turned on the rotor rotates to once again align itself with the field in the new position Figure 918b Each rotation is equal to the step angle which may vary from 180 to as little as a fraction of a degree depending on the number of coils and the way they are arranged in this example 90 If the first coil is once again turned in the opposite polarity while the second is turned off the rotor rotates another step in the same direction The process continues as one coil is turned off and another is turned on A sequence of four steps brings the rotor back to exactly the same state it was at the beginning of the sequence Now imagine that at the conclusion of the first step instead of turning off one coil and turning on the sec ond coil both are turned on In that case the rotor rotates only 45 to align itself to the path of least reluctance Figure 918c Later if the first coil is turned off while the second remains on the rotor rotates another 45 This is called halfstep operation and includes a sequence of eight movements Of course with the opposite onoff sequence the rotor will rotate in the opposite direction Typical step pers run between 1895 in fullstep mode Obviously one way to reduce the size of the steps is to increase the number of coils However there is a physical limit to how many coils may be used To further increase the a b c S N S N N S N S S N N S N S Figure 918 Basic principle of operation of a stepper motor As the coils in the stator are turned on and off the rotor rotates to align itself with the magnetic field Actuators and Drive Systems 349 number of steps per revolution different numbers of teeth can be built into the stator and rotor creating an effect similar to a caliper For instance as we will see later 50 teeth on the rotor and 40 teeth on the stator results in a 1 8 step size with 200 steps per revolution CanStack Motors These motors are very common and inexpensive usually have a 7 5 or similar step size and are used in many different applications Due to their construction they are relatively short and lend themselves to applications with low vertical clearance The rotor is a cylinder with alternate strips of northsouth polarities usually made of resin embedded with ferrite particles similar to refrigerator magnets as shown in Figure 919 A typical rotor for a 7 5 stepper motor has 24 pairs of poles on it A refrigerator magnet sticks to ferrite materials on one side only the side that is meant to have a message or advertisement on it does not stick Is it because of the additional print layer Not really It is because there is no magnetic flux on that side but only on the side that sticks These magnets are made of a resin mixed with a ferrite powder that is magnetized as a series of small horseshoe magnets next to each other called a Halbach array as shown in Figure 920a The permanent magnet rotors of many stepper motors and brushless DC motors are made the same way therefore the rotors crosssection is made up of a series of horseshoe magnets next to each other This arrangement creates a unique rotor that allows small steps in a brushless DC motor see Figure 915 and canstacktype stepper motor see Figure 919 Figure 920b shows both a refrigerator magnet and a rotor with soft iron dust sprinkled on them showing the magnetic poles S N S N S N Figure 919 A typical rotor of a canstack stepper motor N S N S N S N S N S N S S S N N a b Figure 920 a magnetic flux pattern on a refrigerator magnet and the rotor of a stepper motor or brushless DC motor b how the Halbach arrays look when iron powder is sprinkled over them Introduction to Robotics 350 The stator is made up of 4 plates each with 12 tabs teeth stacked on top of each other with the tabs stag gered in 1324 order as shown in Figures 921 and 922 One coil is wrapped around plates 1 and 2 and one around plates 3 and 4 The four plates create two independent magnets on top of each other each with a wind ing that is centertapped called bifilar and grounded at the center A current going through one coil and exit ing at the center creates a certain magnetic polarity that is the opposite of the polarity if the current goes in from the other end and exits at the center wire As a result each coil may be energized at either polarity Each winding causes all the tabs on each plate of a pair to be of similar polarity all north or all south Consequently energizing both windings creates repeating patterns of north and south in all four plates Figure 922 is a schematic of a canstack stator linearized for better visualization Plates 1 and 2 are related to coil A1A2 two halves of coil A and plates 3 and 4 to coil B1B2 two halves of coil B If coil A1 is ener gized plate 1 will be north and plate 2 will be south However if coil A2 is energized the polarity of plates 1 and 2 is reversed plate 1 is south and plate 2 is north The same happens to plates 3 and 4 with coils B1 and B2 This is called centertapping and is shown in Figure 923 The advantage of center tapping is that during Figure 921 The stator of a canstack stepper motor Coil A Coil B A1 A2 B1 B2 1 2 3 4 Cross section of four plates staggered A single plate with tabs teeth Figure 922 Canstack stator windings and plates Coil A 12 Coil A1 12 Coil A2 Figure 923 Center tapping of a coil allows changing the polarity of the magnetic field by having the current flow in either half of the coil Actuators and Drive Systems 351 manufacturing a set of two wires is simultaneously wrapped around the pole At the conclusion the two heads of the wires are connected and form the ground while the tails are used as contact points for input current As a result the magnet may easily be energized with either polarity by simply having current in each half of the double winding During the operation of the motor two coils are turned on in the following sequence resulting in the indi cated polarities Step A1 A2 B1 B2 Plate1 Plate2 Plate 3 Plate 4 1 on off on off N S N S 2 off on on off S N N S 3 off on off on S N S N 4 on off off on N S S N Notice that A1 and A2 or B1 and B2 are never turned on simultaneously as they would cancel each others fields During each step of the sequence the poles on the rotor align themselves between the stator poles with the least reluctance such that any south pole on the rotor will be between two north poles on the stator and any north pole on the rotor will be between two south poles on the stator as in Figure 924 In this figure arcs of SN show the polarities of the poles at each step of the sequence At the end of the fourstep sequence the rotor has moved four steps which brings it to exactly the same situation as in the beginning of the sequence Therefore repeating the fourstep sequence will rotate the rotor continuously The faster the sequencing of steps the faster the rotor will rotate As a result by carefully controlling how many sequences are provided and at what speed the rotational displacement as well as angular velocity of the motor can be controlled Note that Figure 924 is drawn with only one quarter of the actual number of stator and rotor poles In actual stepper motors there are a total of 48 poles providing a 7 5 step angle N N S S S N N S S S N N N S S N S S N N S N N S N S S N Sequence 4 3 2 1 N S N S N S Plate 1 Plate 3 Plate 2 Plate 4 2 3 1 4 2 3 1 4 1 2 3 4 Sequence Figure 924 The cross section of a canstack stepper motor Each SN arc shows the polarities of each pole during one step of the sequence of four Introduction to Robotics 352 Instead of always energizing two coils simultaneously if either one or two coils are energized alternately rendering an eightstep sequence the stepper will step at half the angle therefore halfstepping However this is not common in canstack motors Table 92 shows the onoff sequence for fullstepping as well as for halfstepping the stepper motor Reversing the sequence causes the stepper motor to rotate in the opposite direction Hybrid Stepper Motors These steppers are usually made with two coils either center tapped or two independent windings in oppo site directions each with four poles The rotor is made of two collinear cylinders mounted on a stainless steel shaft such that one end of the rotor is north and the other end is south Figure 925 The rotor and the stator poles are all cut to have teeth where the teeth on one half of the rotor are offset by a half tooth from the other half of the rotor However to understand the role of the teeth on the rotor and stator of these motors we first review the concept behind a caliper Table 92 a Fullstep and b halfstep sequence for stepper motors Step A1 A2 B1 B2 1 On Off On Off 2 Off On On Off 3 Off On Off On 4 On Off Off On Step A1 A2 B1 B2 1 On Off On Off 2 Off Off On Off 3 Off On On Off 4 Off On Off Off 5 Off On Off On 6 Off Off Off On 7 On Off Off On 8 On Off Off Off Figure 925 The stator left and rotor right of a hybrid stepper motor Actuators and Drive Systems 353 Lets take two parallel lines of equal length capable of sliding relative to each other each one unit of length long Next divide each line into 10 equal divisions In order to have the division lines aligned with each other when moving one step the sliding line must move one whole division to the next division Figure 926 Similarly take two lines and divide one into 10 equal divisions and the other into 11 equal divisions In this case the divisions are 01 and approximately 009 unit respectively If two of the division lines are aligned and one of the lines slides it will only take a distance of 01 009 001 units to align the next pair of division lines Calipers do exactly the same By dividing the lines into different lengths we can easily measure a dis tance at a fraction of the smallest division The teeth on the stepper motor stator and rotor are similar Since the number of teeth on the stator and rotor are different for each step the rotor only rotates an angle equal to the difference between the two divi sions With 40 teeth on the stator poles and 50 teeth on the rotor the step angle is 1 8 at full steps because 360 40 360 50 9 7 2 1 8 917 The two rotor cylinders Figure 925 are a halfstep out of phase and the stator poles run across the whole length of the stepper Although the way hybrid and canstack stepper motors work is somewhat different driving the motors is similar Figure 927 is a simplified hybrid stepper motor with only two coils on the stator and three teeth on the rotor Actual motors have many more teeth on the stator and rotor As long as the number of teeth in Second divisions aligned Second divisions aligned 01 unit slide 001 unit slide First divisions aligned First divisions aligned Figure 926 Application of unequal divisions for measuring lengths as in a caliper a b N S S S S N S S S S Figure 927 Basic operation of a hybrid stepper motor Introduction to Robotics 354 the stator and the rotor are different the previously mentioned effect is true Now suppose that one coil is energized as shown in Figure 927a The rotor with all its teeth as south on one side and north on the other will align itself to the path of least reluctance as shown If the coil is turned off and the second coil is turned on although the flux or field has turned 90 the rotor will rotate only 30 to the new location in Figure 927b The same sequence will continue similar to a canstack motor and the rotor will rotate accord ingly Changing the sequence backward causes the rotor to rotate backward Applying the sequence faster causes the rotor to move faster Therefore by controlling the sequence its direction and its speed the rotors motion and angular velocity can be controlled Of course the same eightstep sequence can also be applied to these motors for halfstep operation Unipolar Bipolar and Bifilar Stepper Motors Unipolar stepper motors are designed to work with one power source Generally it is desirable to have one power source that powers both the motor windings as well as the drive circuits Unless other techniques of switching are used with one power source it is impossible to simply change the polarity of the coils by chan ging the polarity of the power from the power source as this would ruin the electronic drive circuitry Since the polarity of the coils cannot be changed these motors may not be run in halfstep mode However there is only one power source used which reduces the cost and the motor develops its full power For bipolar motors the assumption is that the polarity of the power source can be changed As a result there are either two power sources where one powers the motor windings and its polarity can be switched and one is used to power the drive circuitry or that more sophisticated switching is used with one power supply to prevent damage to the circuits In this case the motor requires an additional power supply and electronics but can be run either at full or halfstep modes and it develops its full power In bifilar motors the coils are centertapped as was previously discussed In this case the polarity of the coils can be changed simply by passing the current in each half of the coil Therefore with simple circuits and one power supply the motor can be run in either full or halfstep mode but since only half of the coil is energized the motor develops only half of its full power Figure 928 is a schematic drawing for unipolar and bipolar drive circuits The switches are connected to the microprocessor ports and are turned on and off by the microprocessor SW4 SW3 SW2 SW1 SW1 SW3 SW2 SW4 Unipolar drive circuit Bipolar drive circuit Figure 928 Schematic drawing for unipolar and bipolar drive circuits Actuators and Drive Systems 355 Depending on how they are wired internally some motors may be used in different modes Figure 929 shows how stepper motors may be wired internally In an 8lead configuration you may wire the motor in any mode as the coils are completely detached from each other In this case it is also easy to find which two wires are connected to which coil The 6lead motors are connected such that each coil is centertapped but the two coils are detached In 5lead motors the two center taps are connected together Fourlead motors may not be used in bifilar mode By measuring the resistance between different wires we may find which wire is connected to which coil Stepper Motor SpeedTorque Characteristics Stepper motors are very useful in many applications They do not require any feedback although a hybrid servomotor with a stepper motor is possible as it is assumed that stepper motors advance a known angle every time a signal is sent As long as the load on the motor is less than the torque it can deliver the steps will not be missed and this assumption is correct However if the load is too large or if the speed is more than the motor is capable of rotating steps may be missed and since there is no feedback all subsequent positions will be incorrect Stepper motors develop their maximum torque called holding torque at zero angular velocity when the rotor is stationary the torque developed with no power is called detent or residual torque Like all motors as the speed of the stepper motor increases the torque it develops reduces but more significantly than others Therefore it is very important that the designer check the speedtorque characteristic of stepper motors from manufacturers before a choice is made Figure 930 is a typical speedtorque characteristic for a stepper motor The useful torque also called pullout torque depends on the way the stepper is externally wired and the drive power signals used 8 One reason for this poor performance at higher speeds is that since at each step the rotor must accelerate cruise decelerate and stop at the next step and this process must be repeated for every single step stepper motors cannot rotate quickly especially if the rotor is heavy If the signals coming to the motor are too fast the rotor will not have time to acceleratedecelerate and will miss steps So one reason for losing output 4lead 5lead 6lead 8lead Figure 929 Stepper motor lead configurations Torque Speed Figure 930 A typical speedtorque curve for a stepper motor Introduction to Robotics 356 torque at higher speeds is the inertia load However even more important is the changing magnetic field of the stator As was discussed earlier every time a coil is turned off there is a varying in this case decaying flux that causes backemf in the wires of stator coils slowing down the decay of the flux Consequently the back emf flux tends to hold the rotor from rotating slowing it down To remedy this problem and to prevent highcurrent sparking across the switches Figure 931a a free wheeling diode may be added to the circuit as in Figure 931b The diode allows the current to continue flowing through the coil and be dissipated through conversion to heat in the resistor The effectiveness of the process can be increased by adding a Zener diode to the circuit as shown in Figure 931c It is important to realize that the Zener diodes breakdown voltage must be near the transistors breakdown voltage rating Otherwise it will have no effect Microstepping Stepper Motors In microstepping instead of turning the coils on and off abruptly the powerup or powerdown for each coil is done gradually by dividing the changes into smaller divisions as high as 250 steps As an example suppose coil A is on and coil B is off In full stepping the next sequence is for coil A to be off and for coil B to be on In microstepping this is divided lets say into 100 divisions As a result in the next microstep coil A will be 99 on and coil B will be 1 on Therefore the rotor will turn slightly to the point of least reluctance which is a microstep away from the previous original step In the next step coil A becomes 98 strong and coil B is at 2 still microstepping the rotor a little further The process continues until both are equal for the halfstep and then until coil A is turned off and coil B is 100 on This divides the full step into 100 smaller steps For a 200step 1 8 stepper motor this means that with microstepping the motor will have 20 000 steps per revolution In practice each step is usually divided into 125 or 250 microsteps requiring 25 000 or 50 000 microsteps per revolution for a 1 8 stepper This dividing of the voltages is done with electronic circuits that resolve the voltage into smaller divisions and corresponding steps Since unlike full stepping the dissipation of the flux is not abrupt the backemf is much smaller As a result with microstepping a stepper motors performance is improved significantly The motor develops a higher torque and its maximum speed without missed steps is much higher Additionally because microsteps are very small the motors movement is not as piecewise consequently vibration of the motor is smaller and less pronounced Of course the disadvantage is that microstepping requires a more a b c R L V L V R V SW4 SW1 Figure 931 Application of a a resistor b a diode and c a Zener diode with stepper motors for increasing the maximum velocity Actuators and Drive Systems 357 sophisticated driver that is much more accurate with better current resolution and is more expensive Addi tionally the microsteps are not as uniform and accurate as expected In practice instead of dividing the steps into linear and equally divided divisions like 1 divisions the changes follow a sine wave In other words the voltage to each coil is a piecewise digital voltage resolved into up to 250 steps Consequently in this mode the stepper is in fact similar to an AC synchronous motor except that its angular velocity is not fixed with line frequency but is driven by the microstepper driver cir cuit As a result the motor is driven at a desired angular velocity for any desired angular displacement and can be stopped at any instant Stepper Motor Control Stepper motors may be driven by microprocessors or microcontrollers either directly or through driver circuits They can also be driven by a dedicated stepper drivertranslator that motor manufacturers offer To drive a stepper motor directly with a microprocessor the power to the motor coils must be directly controlled by the processor This is accomplished in two ways depending on the microprocessor If the out put port of the processor is low power mA it will not be able to provide a high enough current to the motor windings the output port of a personal computer is an example of this situation As a result the output port must turn on and off power transistors that control the power flow into the motor coils at higher currents If the output ports of the microprocessor can provide high current flow as long as the current requirement of the motor is less than the microprocessors the motor coils can be directly connected to the output ports In either case the microprocessor controls the current flow to the coils of the stepper motor by sequentially turning on and off the output ports as discussed previously The stepper will move in one direction or another depending on the order of the sequence In this situation four output ports are needed to drive one stepper motor but the steppers displacement velocity and direction are all under control Figure 932 shows a schematic arrangement in which a microprocessor with a lowpower output port is used to drive a stepper motor with transistors Figure 932a as well as a microprocessor with high current capa bility which is used without transistors Figure 932b Microprocessor Output port Vin a SW4 SW3 SW2 SW1 Microprocessor Output port b Figure 932 Schematic drawing of the application of a microcontroller in driving a stepper motor a with low current output and b with high current output Introduction to Robotics 358 Alternatively it is possible to use a dedicated integrated circuit IC chip to control the motion of a stepper motor 9 10 These IC chips called stepper drivers with translator are designed to sequence the stepper motor based on the information they receive In most cases the information needed is a stream of pulses Every time the driver receives a pulse the input to the chip changes from low to high it advances the stepper by one step If n signals are received the motor is sequenced for n steps When a driver is used the micro processor only provides the stream of pulses which are always the same and not the sequences A second input pulse to the driver determines the direction of motion Consequently only two output ports are needed to drive a stepper motor for any displacement at either direction at any speed Therefore using stepper dri vers the same number of output ports as before four outputs can drive twice as many stepper motors Most drivers provide a choice of full or half stepping by making one of their pins high or low In this case three output lines are necessary Drivers are very easy to use are very inexpensive and simplify programming of the processors Relatively inexpensive microstepping stepper driver IC chips are also commercially available and may be used for limited microstepping Figure 933 shows how the stepper driver may be used Drivers like microprocessors may be low current or high current If they are low current it is necessary to use power transistors as switches where the driver turns the transistors on and off thus driving the stepper motor If the driver is high current the output port of the driver may directly be connected to the stepper motor simplifying the circuit Another way to run a stepper motor with a driver is to provide the impulse train to the driver by means other than a microprocessor As an example the timer circuit in Figure 934 can provide a steady stream of impulses to the driver causing it to run the stepper motor However to change the velocity of the stepper or to control the total displacement other means of control are needed for example adjusting the potenti ometers in the circuit Still in certain applications where the velocity remains constant or where the total displacement can be controlled by other means such as a microswitch the timer circuit may be very useful The charge time for the circuit when the output signal is high is longer than the discharge time where the signal is low For RH R1 R2 R3 the following equations apply to this circuit thigh 0 693C2 RH R4 tlow 0 693C2 R4 ttotal 0 693C2 RH 2R4 f 1 44 C2 RH 2R4 918 Direction control Stream of pulses input Coil 1 Coil 2 Coil 3 Coil 4 Stepper motor Microprocessor Stepper driver Figure 933 Schematic of a typical stepper motor driver Actuators and Drive Systems 359 For practical purposes R3 should be large The circuit should be stable up to 100 kHz The 001μF capacitor is used to clean the output signal With an appropriate choice of resistors and capacitors a wide range of periods may be achieved For more information on mechatronics applications and design please refer to 11 12 13 14 15 97 Microprocessor Control of Electric Motors As we discussed in Chapter 1 a robot is supposed to be controlled by computers or microprocessors There fore it is important to be able to control the motions of the actuators with microprocessors We have already discussed in some detail how a stepper motor or a brushless DC motor may be controlled by a microproc essor In the following sections a few other common techniques for controlling electric motors are discussed A microprocessor is a digital device It only deals with digital inputs and digital outputs Any voltage lower than about 08 volts is considered low off 0 Any voltage above approximately 24 volts is considered high on 1 The microprocessor can only read the 0s and 1s It can also only output 0s and 1s All analog or continuous input signals or information must be digitized for use by a microprocessor All desired analog or continuous output signals or information must be converted from digital to analog as well Analogtodigital converters ADCs and digitaltoanalog converters DACs are used for this purpose However a key ele ment in both DACs and ADCs is their resolution Digital devices handle numbers and all other information by bits which can only be 0 or 1 A onebit piece of information can only have two states 0 or 1 off or on To add to this capability we may use two bits where there are four possibilities 00 01 10 11 As the number of bits increases the variations increase to 2n There fore a 4bit set has 16 distinct possibilities and an 8bit set has 28 or 256 possibilities Every four bits is called a nibble and every eight bits is a byte Suppose you want to read a variable voltage between 05 volts into your microprocessor and be able to use it for running a device Of course the processor can only read high or low not a continuous number If you use a onebit input port it can only recognize whether the voltage is high or low hardly a continuous process Now suppose you use two bits to read the voltage There are four distinct possibilities for two bits Conse quently the voltage can be divided into four different values perhaps 0 167 334 and 5 which correspond to 00 01 10 and 11 bit mapping Then we may distinguish four different levels of voltage with the processor If this resolution is not enough we would have to increase the number of bits With a 4bit input the 5volt voltage can be divided into 16 portions corresponding to 0000 0001 0010 0011 mapping Then the 8 7 6 5 1 2 3 4 5 5 5 Output 5 VDC Coarse Fine R1 R3 R4 R2 C2 001 μF Figure 934 Schematic drawing of a timer circuit that creates a pulse train which can be used to drive a stepper driver Adjusting the potentiometers will change the period of the output pulses Introduction to Robotics 360 smallest change in voltage we could read resolution is 033 volts As you can see with larger number of bits the resolution improves However what this means is that to read one input voltage four input ports of the processor have to be dedicated to it Additionally you would have to use an ADC to convert the analog volt age signal to a digital form and feed the information from ADC into the processor Conversely suppose you want to control a servomotor with a microprocessor In order to have a variable voltage to control the speed of the motor the digital information must be converted to analog form through a DAC The resolution of this information is also limited to the number of bits used For better resolution more bits are necessary Imagine how many input and output ports would be necessary to have an accurate 6axis robot with multiple servomotors inputs and sensors To control the motions of a robot or to move from one point to another the robot controller calculates the magnitude of the change in each joint based on the kinematic equations governing the motions of the robot If it is desired to also have velocity control the speed at which each joint must move is also calculated This information determines how much and how fast each joint must move which alternately determines how much and how fast the servomotors of each joint must rotate based on the gear ratio of the joint and so on This information is converted to a set of voltages and voltage profiles The voltage is fed to the servomotor and the feedback signals going back to the controller are checked The voltage is adjusted accordingly for desired velocity until the joint is moved a desired amount This process continues until the robots move ments are finished Consequently it is necessary to have control over the voltages that go to each servomotor and to be able to read the feedback signals from each joint It should be mentioned here that a new category of intelligent motor controllers IMC is evolving 16 These dedicated highspeed controllers can be programmed for the highperformance motor control of brushless motors and AC induction motors 971 Pulse Width Modulation As we discussed earlier to be able to run a servomotor with a voltage that is close to analog we would have to dedicate a large number of output ports or bits to it to increase resolution This is expensive and may be impossible if more input and output ports are needed than available Additionally since this voltage is low power and cannot directly run the motor it has to be used as input to a power transistor that controls the motor Now lets see what happens when a transistor is not run in full power mode Figure 935a shows a simple circuit to control a motor VCE of the ideal transistor is controlled by the micro processor which in turn controls the voltage across the motor and therefore the current The power loss in the transistor can be found as i Vm R Ptrans VCE i VinVm i VinVm Vm R 919 Figure 935b shows the power loss of the transistor As Eq 919 indicates when either Vm 0 or Vm Vin power loss is zero this assumes that the internal resistance of an ideal transistor is very low and therefore when fully on the voltage drop across it is very little Otherwise the power loss is a secondorder function of the Vm motor voltage as shown in Figure 935b If the transistor is fully on or off there is no power loss Otherwise it generates and wastes a lot of power Therefore it is beneficial to run the transistor fully on or fully off To overcome both preceding problems a method called pulse width modulation PWM is used PWM can create variable voltages with only one output port of the microprocessor without any loss in the power tran sistors because they are always fully on or off To do this the voltage on the output port of the processor is turned on and off repeatedly many times a second such that by varying the length of time that the voltage is Actuators and Drive Systems 361 on or off the average effective voltage will vary In other words as in Figure 936 as t1 versus t changes the average voltage at the motor changes accordingly The average output voltage in PWM is Vout V t1 t 920 The pulse rate of PWM may be 220 kHz while the natural frequency of a motor is much smaller If the rate of PWM switching remains many times larger than natural frequency of the motors rotor the switching will have little effect on the performance of the motor The motor effectively acts as a lowpass filter and does not respond to onoff signals except through the average value of the input voltage due to PWM PWM can create an audible noise in a motor which becomes inaudible as the frequency increases beyond the hearing threshold of humans On the other hand theoretically the power loss of the transistor is zero when it is off or fully on However in reality every time the transistor is turned on or off it takes a finite time for the voltage to build up or break down causing heat generation As the frequency increases heat gener ation increases as well Therefore it is crucial to use transistors that have very fast switching capability eg MOSFETs for low power and IGBTs for higher power Additionally as the PWM rate increases the back emf voltage in the motor due to L di dt in Eq 914 can also increase Therefore it may be necessary to insert a diode across the motor armature to protect the system Time V Voltage t1 t Effective average voltage Figure 936 Pulse width modulation timing M R i Wasted power 0 Vm Vin V m Vin VCE Maximum power loss Transistor off Transistor fully on a b Figure 935 a Application of a power transistor to control the supplied voltage to a motor b the power loss of the transistor at different voltages Introduction to Robotics 362 By varying the PWM timing continuously a variable voltage can be created that can be used in brushless DC motors servomotors or similar applications Figure 937 depicts sine wave generation with PWM 972 Direction Control of DC Motors with an HBridge Another troublesome issue in motor control with a microprocessor is the changing of polarity for direction change In microprocessor control of motors it is desirable to change the direction of current flow in a motor to change its direction of rotation with only two bits of information In other words instead of actually chan ging the polarity we may change the direction of the flow by changing bit information from the microproc essor A simple circuit called an Hbridge can accomplish this as shown in Figure 938 As shown if all four switches are off the rotor coasts freely If SW1 and SW4 are connected the current flows from A to B and the rotor rotates in one direction whereas if SW2 and SW3 are connected the current flows from B to A and the rotor rotates in the opposite direction In fact if SW3 and SW4 are connected due to backemf a braking effect is created on the rotor Regardless the switches are turned on and off by the microprocessor therefore only two bits are needed to control the Hbridge and the direction of rotation of the motor Figure 939 shows how an Hbridge is wired The diodes are necessary to prevent damage to the circuitry during switching Additionally if two switches on the same side are turned on together a short circuit occurs Time Vcc Voltage Figure 937 Sine wave generation with pulse width modulation Rotor coasts freely Forward direction Reverse direction Braking SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V SW2 SW1 SW3 SW4 A B V Figure 938 Directional control of a motor using switches in an Hbridge Actuators and Drive Systems 363 The same is true if one switch on one side does not turn off before the other is turned on Most commercial Hbridges have internal protection built into them 98 Magnetostrictive Actuators When a piece of a material called TerfenolD is placed near a magnet this special rareearthiron material changes its shape slightly This phenomenon called a magnetostriction effect is used to make linear motors with μinch displacement capabilities 17 18 To run the actuator a magnetostrictive rod covered by a mag netic coil is attached to two chassis As the magnetic field changes causing the rod to contract and expand one chassis moves relative to the other A similar concept is used with piezo crystals to create a linear motor with nanoinch displacements including flexible actuators for robots 19 20 21 22 99 ShapeMemory Type Metals One particular type of titaniumnickel shapememory alloy called Biometal muscle wire a patented alloy shortens by about 4 when it reaches a certain temperature The transition temperature can be designed into the material by changing the composition of the alloy but standard samples are set for about 90 C At around this temperature the crystalline structure of the alloy makes a transition from martensitic to austenitic state and consequently it shortens However unlike many other shapememory alloys it switches back to mar tensitic state when it is cooled down This process can continue for hundreds of thousands of cycles if the loading on the wire is low The common source of heat for this transition is an electric current flowing through the metal itself which heats due to its electrical resistance As a result a piece of Biometal wire can easily be shortened by an electric current from a battery or other power sources The major disadvantage of the wire is that the total strain happens within a very small temperature range therefore except in onoff situations it is very difficult to accurately control the strain and thus the displacement 23 Nevertheless the alloy can be used as actuating muscle for many applications including grippers switches and more 910 Electroactive Polymer Actuators EAPs When exposed to highvoltage electric fields due to a phenomenon called Maxwell stress dielectric elasto mers such as silicones and acrylics contract in the direction of the field and expand in the direction normal to it By laminating thin films of the material with layers of electrodes on two sides the elastomer can contract in the direction of the electric field formed between the electrodes that act as a capacitor and expand V SW2 SW1 SW3 SW4 Forward A B Reverse High SW1 SW4 Low High SW2 SW3 Low Direction of rotation Figure 939 Application of Hbridge in controlling the direction of rotation of a motor Introduction to Robotics 364 perpendicularly to it 24 To act as an actuator the laminate can be formed in many shapes in series parallel or series and parallel as well as in cylindrical configuration 25 When in the form of a sheet the material reacts to a voltage between any two points on it and bends locally 911 Speed Reduction Any means of speed reduction common in industry may be used in robots as well This includes fixedaxis and planetary gear trains with many types of gears Additionally particular types of planetary gear trains called Harmonic Drive and Orbidrive as well as a novel design with nutating gears may be used The following sections describe the Harmonic Drive concept as well as the nutating gears concept In planetary gear trains there are normally four basic elements the sun gear the ring gear the arm and the planets For calculation purposes the sun and the ring gears are called first and last gears Although we will not develop the following equation here it can be stated that for a gear train with corresponding angular velocities and number of teeth for the first and last gears the following is true 26 ωLA ωFA ωLωA ωF ωA NF N3 N2 NL 921 where ωF ωL and ωA are the angular velocities of the first and last gears and the arm ωLA and ωFA are the angular velocities of the first and last gears relative to the arm and NL NF N2 and N3 are the number of teeth of the first last and the planet gears as in Figure 940 In this gear train example it is assumed that the first gear is stationary and its angular velocity is zero The input to the system is the arm and the output is the last gear There are two planets designated as gears 2 and 3 For ωF 0 from Eq 921 we get NFN3ωA N2NLωLN2NLωA ωA N2NLNFN3 N2NLωL and e ωL ωA N2NLNFN3 N2NL 922 where e is the gear ratio for the system This can be used to calculate the gear ratio based on the number of teeth of the four gears N3 N2 NF NL Planet gears Internal First gear ωL ωF ωA Internal Last gear Figure 940 Schematic drawing of a planetary gear train Actuators and Drive Systems 365 In Harmonic Drives the number of teeth of the gears are chosen such as to render very large gear ratios with very few gears To do this suppose the teeth are chosen such that NF N2 1 and NL N3 1 In that case Eq 922 reduces to ωA ωL NF 1 NL NF NL 923 For example with NL 50 teeth and NF 45 teeth the gear ratio will be 440 which is huge the negative number of the answer only indicates a direction change between the input and output of the gear train The problem is that although theoretically we can pick the gears such that NF N2 1 and NL N3 1 in practice this will not work because a pair of internalexternal gears engaged with each other and having this many teeth will not rotate relative to each other To overcome this problem the planet in the Harmonic Drive is a flexible metal band with teeth called a flexspline that rolls over a cam wave generator As the wave generator rotates it changes the shape of the flexspline planet such that it remains in contact with the internal gear at two opposing points only while the remaining teeth are disengaged Figures 941 and 942 For more information refer to other references 2729 Cam wave generator Flexspline Last gear Rollers Figure 941 Schematic of the strain wave gearing train Wave generator Flexspline Circular spline Figure 942 A Harmonic Drive strain wave gear Source Reproduced with permission from Harmonic Drive LLC Harmonic Drive is a trademark of Harmonic Drive LLC Introduction to Robotics 366 The nutating gear train concept is somewhat similar Gears that are very close in size wobble relative to each other at their edges 30 As a result after each revolution one gear falls slightly behind the other thus creat ing a large gear ratio The equation governing the system is the same as Eq 922 A simple rendition of the nutating gears is shown in Figure 943 912 Other Systems Many other novel systems can be used in robotic actuation and there will be yet others available in the future For example although not used in any industrial robots there is available a spherical actuator made up of 80 magnets attached to the inside of a hollow sphere The sphere is placed inside a cone made up of 16 circular electromagnets By controlling which magnets are turned on in relation to the permanent magnets on the sphere it can be forced to rotate in any direction 31 Piezoelectrically generated traveling waves can drive a harmonic drive 32 or a planetary speed reducer may use balls instead of gears 33 Look around for other innovations 913 Design Projects In the following section you will find a few suggestions for possible projects These are presented only as a starting point Obviously countless other possibilities exist Be creative and think of other projects as well 9131 Design Project 1 Considering the advantages disadvantages capabilities and limitations of each type of actuator and depend ing on what may be available to you design actuators for your robot Whatever system you pick you will have to consider what components are needed how you can later run and control the actuators their cost weight robustness and availability You must also consider how you will connect the actuators to the joints and links the gear ratios needed and so on Additionally make sure that the actuator you pick can deliver the desired torque or force You must also design and program a controller for controlling the actuators Stepper motors can be easily programmed and controlled by a simple microprocessor with or without driver chips or commercial stepper drivers or with a pulsegenerating circuit and a driver chip Depending on the capability of your driver or controller you may be able to control the speed of your stepper motors as well as their displacements For servomotors you will need a servo controller Commercial servo controllers are expensive However with an appreciable amount of effort one may design and build a servo controller Note that it is relatively easy to make a controller for controlling the position in a servomotor This can be done with a simple feedback device like a potentiometer or an encoder However the design of a servo controller becomes much more complicated if you decide to control the velocity of the robot as well which is why a servomotor would be used Inexpensive simple geared servomotors available commercially that are designed for use with remote control airplanes are a good choice for inexpensive robots or for other actuation These servomotors rotate a specific angle depending on the length of the signal they receive Therefore a simple command signal from your microprocessor can be used to easily control the servomotor Speed control is usually possible too How ever the accuracy and the power of these motors are limited Figure 943 Nutating gears train Actuators and Drive Systems 367 At much higher cost but with much better characteristics robot actuator units such as Figure 944 may also be used if enough funds are available for your project You must also pick an appropriate microprocessor that has enough computing power to calculate the kin ematic equations but also has enough input and output ports for adequate communication with the motors Integrating the robot manipulator with the actuators and the microprocessor will complete your robot When you have completed the programming you will have a functioning robot In the next chapter we learn more about sensors at which time you may integrate desired sensory information into the robot as well 9132 Design Project 2 This project involves the design and manufacturing of a rollingcylinder or sphere robot rover The rolling cylinder robot is meant to consist of two colinear hollow cylinders that can rotate independently and there fore navigate Its power source electronic drive circuitry actuators and sensors are all supposed to be inside the two cylinders As a result from outside the rover should look like a cylinder Figure 945 shows a sample Figure 944 Commercial actuators are available for more sophisticated and advanced projects Source Reproduced with permission of Maxon Precision Motors Inc Motors Platform and electronics Batteries Figure 945 A schematic depiction of a possible arrangement for the cylinder rover Sample made by Nick Supat at Cal Poly Introduction to Robotics 368 cylinder robot with its external cylinders removed You should be able to program the rover to follow a pre determined path or using its sensors navigate through hallways a maze or similar environments Figure 945 also shows the arrangement of the cylinders As shown if the two cylinders rotate relative to each other the rover rotates about a vertical axis If they rotate together in the same direction the rover moves forward The sample robot shows how the circuitry and the drive motors may be mounted on a platform and assembled inside the cylinders Stepper motors or servomotors may be used for actuation each with its own advantages and disadvantages The motors mounted on a platform may be attached to the cylinders by shafts or by rotating friction wheels The center of gravity of the assembly consisting of the platform the motors the power source and the circuitry must be below the centerline of the rotating cylinders bottom heavy This creates a downward gravitational force that keeps the platform from rotating As a result as the motors rotate the cylinders the whole assembly moves You must realize that this is similar to a pendulum attached to a rolling wheel If you write the equations of motion you will see that the system oscillates every time the tor que on the system changes As a result you should expect to have rolling cylinders that oscillate every time they start stop or rotate However increasing the mass of the platform as well as increasing the distance of the center of mass of the platform from the center of the cylinders reduces the frequency of the oscillations Note that since a stepper motors rotation involves stopandgo steps it increases the oscillations of the plat form Therefore a servomotor may be a better choice After you have built a prototype rover you may add damping to the system create additional points of support between the platform and the cylinders or improve your drive programs by controlling accelerations and decelerations to reduce or eliminate the oscillations The motors the sensors as will be discussed in Chapter 10 and the added intelligence can all be controlled by a microprocessor or other control circuitry This design project is intentionally left openended in order to allow you to be as creative as you wish As an example you may use light sensors to start and stop the rover and to navigate it the light can be projected onto a sensor between the two cylinders Alternately you may use a microprocessor that responds to sensed information to do the same or use a wireless communica tion link To complete the design project first choose the cylinders platform size motors control system and sen sors you want to incorporate in the design You must make sure the arrangement of the subsystems will render a bottomheavy system Consider how the motors will be attached to the cylinders After the design details are completed you may proceed with the manufacturing of the design testing and modifying until all problems are solved When the rover is completed you may proceed with programming it to do more sophis ticated navigation and sensory information processing The sphere robot is similar to the cylinder robot except that the outside shell is a sphere that houses the drive unit The drive unit moves inside the sphere forcing the sphere to move forward You may use a cyl inder robot to do this It may appear that as the robot rotates sideways inside the sphere it should force the sphere to turn sideways too However since the sphere already has a forward velocity turning the cylinder robot sideways inside the sphere pushes it up and interferes with the motion Instead design and build a simple gyroscopic steering mechanism In this case one motor turns both wheels together or even three wheels moving the sphere forward but the rotation of the sphere results from a gyroscope To do this imag ine that you attach a flywheel to a motor that constantly rotates about the xaxis Install the flywheel and the motor in gimbals that can rotate about the yaxis on the platform When the flywheel is rotated about this axis it turns the assembly about the zaxis forcing the sphere to change direction Therefore you can control the motions of the sphere by a microprocessor that sends signals to the motors running the wheels and the gyro Figure 946 shows one rendition of this idea 9133 Design Project 3 Design and build a crawling robot with Biometal alloy as its actuators One way to do this is to build a series of links attached in series that act as the crawlers body Attach pieces of Biometal between the links eg as shown in Figure 947 By sending signals from your microprocessor to these simple actuators and Actuators and Drive Systems 369 contracting them sequentially you can create a slithering motion Just remember that you might need to create a onedirectional frictional force in the forward direction at the underbelly of the crawler to force the slithering motion forward The simplicity of Biometal muscle wires is a good choice for this project although other means may also be used You may also design and build other insect robots animal robots and walking machines Use your imag ination to come up with an interesting and unique robot 914 Summary In this chapter a variety of different actuating systems were presented Each system has its advantages and disadvantages that make it useful for particular applications In addition to their application in actuating robots they can also be used in other devices used with robotic systems Although hydraulic systems are no longer common for industrial robots they are still used for heavy pay load robots and for devices that require a high powertoweight ratio Most industrial robots are actuated by servomotors Stepper motors are very common in many other peripheral devices and in small robots Other novel actuators can also be used for specific purposes in robotics The design engineer must consider the best application for each actuator based on the design specifications In the next chapter we discuss a variety of sensors that are used in conjunction with robots and robotic applications Figure 946 A sphere robot Source Cal Poly Robotics Club Biometal actuators Springs Figure 947 A possible design for a crawling robot Designed by Bryan Terry at Cal Poly Introduction to Robotics 370 References 1 Servopneumatic positioning system Festo AG Co 2000 2 Step motors and servomotors control catalog Parker Hannifin 3 Hage Edward Size Indeed Matters Power Transmission Engineering February 2009 pp 3437 4 Mazurkiewicz John From Dead Stop to 2000 rpm in One Millisecond Motion Control SepOct 1990 pp 4144 5 Cowern Edward Baldor Motors Basics series of articles Power Transmission Engineering December 2016 to April 2018 6 McCormik Malcolm A Primer on Brushless DC Motors Mechanical Engineering Feb 1988 pp 5257 7 Jones Dan Step vs Servo Selecting the Best Power Transmission Engineering October 2018 pp 3236 8 Labriola Don Integrated Hybrid Servo Motors vs Standard Integrated Servo Motors How Do They Stack Up Power Transmission Engineering December 2018 pp 7073 9 Technical Information on Stepping Motors Oriental Motors USA Corporation 10 Application of Integrated Circuits to Stepping Motors Oriental Motor USA Corporation 11 Shetty Devdas R Kolk Mechatronics System Design PWS Publishing MA 1997 12 Lyshevski Sergey Mechatronics and Control of Electromechanical Systems CRC Press 2017 13 Stiffler Kent A Design with Microprocessors for Mechanical Engineers McGraw Hill NY 1992 14 Mechatronics 98 proceedings of the 6th UK Mechatronics Forum International Conference Skovde Sweden J Adolfsson J Karlsen editors Pergamon Press Amsterdam 1998 15 Bolton W Mechatronics Electronic Control Systems in Mechanical and Electrical Engineering 6th edition Pearson Education UK 2015 16 Lewin C Intelligent Motor Control ICs Simplify System Design Motion Control Technology Tech Briefs December 2009 pp 5354 17 Ashley S Magnetostrictive Actuators Mechanical Engineering June 1998 pp 6870 18 PushPull Magnetostrictive Linear Actuators NASA Tech Briefs August 1999 pp 4748 19 Tiny Steps for a Big Job NASA Motion Control Tech Briefs August 1999 pp 1b4b 20 MEMSBased PiezoelectricElectrostatic Inchworm Actuator NASA Motion Control Tech Briefs June 2003 p 68 21 Flexible Piezoelectric Actuators NASA Tech Briefs July 2002 p 27 22 Magnetostrictive Motor and Circuits for Robotic Applications NASA Motion Control Tech Briefs August 2002 p 62 23 Toki America Technologies Biometal Reference 24 Ashley Steven Artificial Muscles Scientific American October 2003 pp 5359 25 ElectroactivePolymer Actuators with Selectable Deformations NASA Tech Briefs July 2002 p32 26 Erdman Arthur GN Sandor Mechanism Design Analysis and Synthesis PrenticeHall New Jersey 1984 27 Hollow Shaft Actuators with Harmonic Drive Gearing NASA Motion Control Tech Briefs December 1998 pp 10b14b 28 Orbidrive catalog Compudrive Corporation 29 Planetary Speed Reducer with Balls Instead of Gears NASA Tech Briefs October 1997 p 15b 30 Kedrowski D Scott Slimak Nutating Gear Drivetrain for a Cordless Screwdriver Mechanical Engineering January 1994 pp 7074 31 Stein David Gregory S Chirikjian Experiments in the Commutation and Motion Planning of a Spherical Stepper Motor Proceedings of DETC00 ASME 2000 Design Engineering Technical Conferences and Computers and Information in Engineering Conference Baltimore Maryland September 2000 pp 17 32 Travelling Wave Rotary Actuators Piezoelectrically Generated Travelling Waves Drive Harmonic Gears NASA Tech Briefs October 1997 p 10b 33 Planetary Speed Reducer with Balls Instead of Gears NASA Tech Briefs October 1997 p 15b Actuators and Drive Systems 371 Problems 91 A motor with rotor inertia of 0035 kgm2 and maximum torque of 15 Nm is connected to a uniformly dis tributed arm with a concentrated mass at its end as shown in Figure P91 Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the total inertia felt by the motor and the max imum angular acceleration it can develop if the gear ratio is a 10 b 50 c 100 Compare the results 92 Repeat Problem 1 but assume that the two gears have 0003 kgm2 and 0005 kgm2 inertias respectively 93 A motor with rotor inertia of 005 kgm2 is connected to a load with a moment of inertia of 15 kgm2 through a pair of gears with a ratio of N Ignoring the inertia of a pair of reduction gears and viscous friction in the system calculate the torque that is needed to accelerate the arm at the rate of θ 500rads2 for a N 1 b N 10 c N 100 94 The threeaxis robot shown in Figure P94 is powered by geared servomotors attached to the joints by worm gears Each link is 22 cm long made of hollow aluminum bars each weighing 05 kg The center of mass of the second motor is 20 cm from the center of rotation The gear ratio is 13 in the servomotor and 15 in the worm gear set The worstcase scenario for the elbow joint is when the arm is fully extended as shown Calculate the torque needed to accelerate both arms together fully extended at a rate of 90 rads2 Assume the inertias of the worm gears are negligible Tm Tl N x y z 05 m m 3 kg m 3 kg Im Figure P91 Worm gear Motors I1 001 kgm2 m3 05 kg m2 05 kg m4 05 kg N 3 N 5 Figure P94 Introduction to Robotics 372 95 Repeat Problem 3 but suppose the maximum torque this motor can provide is 09 Nm Therefore a new motor must be picked Two other motors are available one with inertia of 0009 kgm2 and torque of 085 Nm one with inertia of 0012 kgm2 and torque of 1 Nm Which one would you use 96 Estimate how much the torqueinertia ratio of a disk motor might be if it can go from zero to 2000 rpm in one millisecond and compare it to the motor in Problem 1 97 Using a timer circuit design a pulsegenerating circuit that delivers a range of 100400 pulses per second to a stepper motor driver 98 Calculate the gear ratio for a planetary gear system if a NL 90 NF 80 N2 50 N3 50 b NL 90 NF 80 N2 40 N3 40 c NL 90 NF 80 N2 40 N3 50 99 Calculate the gear ratio for a Harmonic Drive if NL 100 NF 95 N2 90 N3 95 910 Calculate the gear ratio for a Harmonic Drive if NL 100 NF 95 N2 94 N3 99 911 Write a program to generate a variable pulse stream to drive a motor with pulsewidthmodulated voltages of 1 2 3 4 and 5 volts for a 5 volt input 912 Write a program to generate a sinusoidal pulsewidthmodulated output for a constant input voltage 913 If you have access to a microprocessor and electronic components such as transistors make an H bridge and write a control program to drive a motor in either direction or to brake it Be mindful of the problems associated with an Hbridges transistors turning on and off at inappropriate times Actuators and Drive Systems 373 29 10 Sensors 101 Introduction In robotics sensors are used for both internal feedback control and external interaction with the outside world Humans and animals have similar sensors For example when you wake up even before you open your eyes you know where your extremities are you do not have to look to know that your arm is beside you or that your leg is bent This is because neurons in the muscles send signals to the brain and as they are stretched or relaxed with the contracting stretching or relaxing muscles the signal changes and the brain determines the state of each muscle Similarly in a robot as the links and joints move sensors such as poten tiometers encoders and resolvers send signals to the controller allowing it to determine where each joint is located Additionally similar to humans and animals with senses of smell touch taste hearing vision and speech to communicate with the outside world robots may possess sensors that allow them to do the same Some sensors such as vision touch and smell are similar in function to that of humans Others such as a radioactive sensor may be something humans lack There is a huge array of sensors available for measuring almost any phenomenon 1 However in this chapter we only discuss sensors used in robotics and automatic manufacturing 102 Sensor Characteristics To choose an appropriate sensor for a particular need we have to consider a number of different character istics These characteristics determine the performance cost ease of application and utility of the sensor In certain situations different types of sensors may be available for the same purpose Therefore we may con sider the following before a sensor is chosen Cost The cost of a sensor is an important consideration especially when many sensors are needed for one machine However the cost must be balanced with other requirements of the design such as reliability importance of the data they provide accuracy repeatability life and so on Size Depending on the application of the sensor the size may be of primary importance For example the jointdisplacement sensors have to be adapted into the design of the joints and move with the robots body elements The available space around the joint may be limited Additionally a large sen sor may limit the joints range Weight Since robots are dynamic machines the weight of a sensor is very important A heavy sensor adds to the inertia of the arm and reduces its overall payload eg a heavy camera mounted on a robotic insect airplane severely limits its flying capabilities Type of output digital or analog The output of a sensor may be digital or analog and depending on the application this output may be used directly or it may have to be converted For example the output of a potentiometer is analog whereas that of an encoder is digital If an encoder is used in 375 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed conjunction with a microprocessor the output may be directly routed to the input port of the proc essor while the output of a potentiometer has to be converted to a digital signal with an analogto digital converter ADC The appropriateness of the type of output must be balanced with other requirements Interfacing Sensors must be interfaced with other devices such as microprocessors and controllers The interfacing between the sensor and the device can become an important issue if they do not match or if other addon components and circuits such as resistors transistor switches or a power source are needed The length of wires involved is also an important consideration Resolution Resolution is the minimum step size within the range of measurement of the sensor In a wirewound potentiometer it is equal to the resistance of one turn of the wire In a digital device with n bits the resolution is Resolution Full Range 2n 101 As an example an absolute encoder with four bits can report positions up to 24 16 different levels Therefore its resolution is 36016 22 5 Sensitivity Sensitivity is the ratio of a change in output in response to a change in input Highly sen sitive sensors will show larger fluctuations in output as a result of fluctuations in input includ ing noise Linearity Linearity represents the relationship between input variations and output variations This means that in a sensor with linear output the same change in input at any level within the range will produce a similar change in output Almost all devices in nature are somewhat nonlinear with vary ing degrees of nonlinearity Some devices may be assumed to be linear within a certain range of their operation Others may be linearized through assumptions A known nonlinearity in a system may be overcome by proper modeling equations or additional electronics For example suppose a displace ment sensor has an output that varies as a secondorder equation Using the square root of the signal either through programming or by a simple electronic circuit will yield a linear output proportional to the displacement Therefore the output will be as if the sensor were linear Range Range is the difference between the smallest and the largest outputs the sensor can produce or the difference between the smallest and largest inputs with which it can operate properly Response time Response time is the time that a sensors output requires to reach a certain percentage of the total change It is usually expressed in percentage of total change such as 95 It is also defined as the time required to observe the change in output as a result of a change in input For example the response time of a simple mercury thermometer is long whereas a digital thermometers response time which measures temperature based on radiated heat is short A special response time of 632 is called the time constant τ Similarly rise time is the time required between 10 and 90 of the final value Settling time is the time between 0 and 98 rise Frequency response Suppose you attach a very highquality radio tuner to a small cheap speaker Although the speaker reproduces the sound its quality is very low whereas a highquality speaker system with a woofer and tweeter can reproduce the same signal with much better quality This is because the frequency response of the twospeaker system is very different from the single cheap speaker The natural frequency of a small speaker is high and therefore it can only reproduce high frequency sounds On the other hand a speaker system with at least two speakers runs the signal into both the highfrequency tweeter and the lowfrequency woofer The summation of the two frequency responses allows the speaker system to reproduce the sound signal with much better quality in real ity the signals are filtered for each speaker All systems can resonate at around their natural fre quency with little effort As the input frequency deviates from the natural frequency value the response falls off The frequency response is the range in which the systems ability to resonate respond to the input remains relatively high The larger the range of the frequency response Introduction to Robotics 376 the better the ability of the system to respond to varying input Otherwise the quickly changing var iations in the phenomenon may not be measured by the sensor Therefore it is important to consider the frequency response of a sensor and determine whether or not the sensors response is fast enough under all operating conditions we will discuss this in more detail in Chapter 11 Reliability Reliability is the ratio of how many times a system operates properly divided by how many times it is used For continuous and satisfactory operation it is necessary to choose reliable sensors that last a long time while considering the cost and other requirements Accuracy Accuracy is defined as how close the output of the sensor is to the expected value For example a thermometer should read 100 C when placed in pure boiling water at sea level Repeatability The output of a sensor to a series of similar input values may vary Repeatability is defined as the radius of a circle that encompasses all output values if a sufficient number of measure ments are made In general repeatability is more important than accuracy We can generally measure or predict systematic inaccuracies in the response and compensate for the error However repeat ability is generally random and cannot be easily compensated Figure 101 The following is a review of some sensors used in robotics mechatronics and automation 103 Sensor Utilization Figure 102a shows a basic sensor circuit with a voltage source As the sensor turns on and off due to the backemf principle the wires act as inductors and consequently a voltage spike is generated in the wires that can create false readouts To prevent this it is advisable to add a monolithictype capacitor to the circuit as shown in Figure 102b The capacitor should be placed as close to the sensor as possible Similarly if long wires longer than a few inches are used to connect a sensor to a voltage source or to where the signal is read the wires can act as antennae and interfere with the signal The solution is to use shielded or coaxial wires or to twist the wires together Accurate and repeatable Inaccurate but repeatable Inaccurate and not repeatable Target Figure 101 Accuracy versus repeatability Device Output signal V V Device Output signal a b Figure 102 a Basic sensor circuit b application of a capacitor added to prevent voltage spikes in reading sensors Sensors 377 By the way this is true in other cases too For example long wires that connect a motor to a voltage source can also act as antennae and therefore it is better to twist the wires together Similarly voltage spikes can create problems with integrated circuit chips Therefore it is advisable to place a capacitor between the voltagein and ground pins of an IC chip as close to it as possible for example next to or under the chip 104 Position Sensors Position sensors are used to measure displacements both angular and linear as well as movements In many cases such as in encoders the position information may also be used to calculate velocities The following are common position sensors used in robotics 1041 Potentiometers A potentiometer converts position information into a variable voltage through a resistor As the sliding con tact wiper slides on the resistor due to a change in position the proportion of the resistance before or after the point of contact with the wiper compared to the total resistance varies Figure 103 The resistive external load RL is in parallel with R2 and both are in series with R1 Since in this capacity the potentiometer acts as a voltage divider the output will be proportional to the resistance as Vout R2RL R1RL R2RL R1R2 Vcc 102 Assuming that RL is large the quantity R1R2 can be ignored and the equation simplifies to Vout Vcc R2 R1 R2 103 Example 101 Assume that R1 R2 1kΩ Calculate the difference between the values of Vout based on Eqs 102 and 103 if a RL 10kΩ and b RL 100kΩ Solution a Vout 10 10 10 1 Vcc 10 21Vcc 0 476Vcc versus Vout 1 2 Vcc 0 5Vcc b Vout 100 100 100 1 Vcc 100 201Vcc 0 498Vcc versus Vout 1 2 Vcc 0 5Vcc Clearly it is crucial that the resistive load be large enough for acceptable accuracy Vcc R1 R2 Vout RL Figure 103 A potentiometer as a position sensor Introduction to Robotics 378 Potentiometers can be rotary or linear and therefore can measure linear or angular motions Rotary poten tiometers can also be multipleturn enabling the user to measure many revolutions of motion Potentiometers are either wirewound or use a conductive polymer resistor paste a deposit of a thin film of resistive carbon particles in a polymer or ceramic and metal mix called cermet on a phenolic substrate The major benefit of conductive polymers is that their output is continuous and therefore less noisy As a result it is possible to electronically differentiate the output of this type of resistor to find velocity However since the output of a wirewound potentiometer is stepwise it cannot be differentiated Potentiometers are generally used as internal feedback sensors in order to report the position of joints and links Potentiometers are used both alone as well as together with other sensors such as encoders In this case the encoder reports the current position of joints and links whereas the potentiometer reports the startup positions As a result the combination of the sensors allows minimal input requirement with maximum accu racy This will be discussed in more detail later 1042 Encoders An encoder is a simple device with a digital output signal for each small portion of a movement The encoder disk or strip is divided into small sections as in Figure 104 Each section is either opaque or transparent it can also be either reflective or nonreflective A light source such as an LED on one side projects a beam of light onto the other side of the encoder disk or strip where it is seen by a lightsensitive sensor such as a phototransistor If the disks angular position or in the case of a strip the linear position is such that the light is revealed the sensor on the opposite side is turned on and has a high signal If the angular position of the disk is such that the light is occluded the pickup sensor is off and its output is low therefore a digital output As the disk rotates it continuously sends signals If the signals are counted the approximate total displacement of the disk can be measured at any time Incremental Encoders There are two basic types of encoders incremental and absolute Figures 104ab are incremental encoders In this type of encoder the areas arcs of opaque and transparent sections are all equal and repeating Since all arcs are the same size each represents an equal angle of rotation If the disk is divided into only two portions each portion is 180 and its resolution is also 180 Within this arc the system is incapable of reporting any more accurate information about the displacement or position If the number of divisions increases the accu racy increases as well Therefore the resolution of an optical encoder is related to the number of arcs of trans parentopaque areas Typical incremental encoders can have 512 to 1024 arcs reporting angular a b c Figure 104 a A simple rotary incremental encoder disk mounted on a motor shaft This encoder measures angular rotations b A rotary encoder disk with its light source and pickup sensor c A reflectivetype linear absolute encoder that can measure linear movements and a rotary incremental encoder disk with 1024 slots Sensors 379 displacements with a resolution of 07035 Highresolution encoders with thousands of pulses per revo lution PPR are also available and constantly improving Optical encoders either have an opaque disk with the material removed for transparent areas or are clear material like glass with printed opaque areas Many encoder disks are also etched such that they either reflect the light or do not reflect the light In that case the light source and the pickup sensor are both on the same side of the disk An incremental encoder is like an integrator It only reports changes to angular position it reports the change in location which is the displacement However it cannot report or directly indicate the actual value of the position In other words an incremental encoder can only tell how much movement is made But unless the initial location is known the actual position cannot be discerned from the sensor An incremental encoder acts as an integrator because the controller actually counts the number of signals the encoder sends determining the total positional change and consequently integrating the position signal Unless the con troller knows the startup position it can never determine where the robot is In all systems that track posi tions with incremental encoders it is necessary to reset the system at the beginning of operations or at wake up or to measure the startup position with other sensors in some Adept robots a 16bit encoder is used together with a Halleffect sensor to provide 20 μm accuracy The controller subsequently integrates the data received from the incremental encoder to track the actual position at all times Most photodetectors are analog devices This means that as the magnitude of the light varies their output varies too Therefore as one section on the encoder disk approaches the detector and the projected light intensity increases to a maximum the output of the detector rises before falling again as it departs Conse quently a squaring circuit is used to condition the signal Figure 105 shows the output of an incremental encoder If only one set of slots is used it is impossible to determine whether the disk is rotating clockwise or counterclockwise To remedy this encoder disks have two sets of slots two channels a half step out of phase with each other Figure 104a As a result the output signals of the two sets of slots are also a half step out of phase with each other The controller can compare the two signals and determine which one changes from high to low or vice versa before the other signal Through this comparison it is possible to determine the direction of rotation of the disk By counting both the leading edges as well as the trailing edges of the output signals of the encoders on both channels we may increase resolution of the output of incremental encoders without increasing the number of slots Channel A Channel B Output of leading edges for one channel only Output of leading and trailing edges for one channel only Output of leading and trailing edges for two channels High Low Figure 105 Output signals of an incremental encoder Introduction to Robotics 380 Note that it is crucial to set up your system to look for changes in the signal not whether the signal is high or low If your circuit keeps counting when the signal is high it may register a significantly high false count especially if your system is fast compared to the rotational speed of the shaft Only counting when there is a change high to low or low to high ensures that a correct number of signals are registered and counted Absolute Encoders An alternative to incremental optical encoders is an absolute encoder Each portion of the encoder disks angular displacement has a unique combination of clearopaque sections that give it a unique signature Through this it is possible to determine the exact position of the disk at any time without the need for a starting position In other words even at start time the controller can determine the position of the disk by the unique signature of the disk at that location Similar to Figure 106 there is a multiple row of sections each one different from the others The first row may have only one clear and one opaque section one on one off The next row has 4 or 22 followed by 8 or 23 and so on Each row must have its own light source and light detector assembly Each sensor assembly sends out one signal Therefore two rows require two inputs to the controller two bits three rows require three bits and so on As shown in Figure 106 an encoder with 4 rows can have 24 16 distinct combinations each section covering an angle of 22 5 This means that within this section of 22 5 the controller cannot deter mine where the encoder is Therefore the resolution is only 22 5 To increase the resolution there would have to be more sections or bits An encoder with 1024 divisions on one row has 10 1024 210 bits of information that must be communicated to the controller With 10bit resolution a robot with 6 joints would require 60 input lines to the controller Consequently it is necessary to consider the advantages and disadvantages of incremental and absolute encoders Commercial encoders with higher bit counts are available Figure 106 also shows the difference between a binary code and a gray code In the binary code system there are many instances where more than one set of bits change sign simultaneously whereas in gray code at any particular location there is always only one bitchange to go back or forth The importance of this dif ference is that in digital measurements unlike popular perception the values of signals are not constantly read but the signal is measured sampled and held until the next sample reading In binary code where multiple bits change simultaneously if all changes do not happen exactly at the same time they may not all register In gray code since there is only one change the system will always find it Table 101 lists the gray code for numbers 011 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 45 45 45 45 45 45 45 45 90 90 90 90 180 180 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 225 45 45 45 45 45 45 45 45 90 90 90 90 180 180 Binary Code Gray Code Figure 106 Each portion of the absolute encoder disk has a unique signature Through this signature the angular position of the encoder can be determined Sensors 381 1043 Linear Variable Differential Transformer LVDT A linear variable differential transformer or transducer is actually a transformer with a moving coil through which a distance is measured it outputs a variable analog voltage as a result of this displacement In general a transformer is an electrictoelectric energy converter that changes the voltagecurrent ratio Except for losses the total input energy to the device is the same as the total output energy When a transformer increases or decreases a voltage in proportion to the number of turns in its coils the corresponding current changes inversely with it This occurs because there is a primary and a secondary coil with different number of turns The electrical energy into the primary coil creates a flux that induces a voltage in the secondary coil proportional to the ratio of the number of turns in the windings As the number of turns in the secondary coil increases the voltage increases proportionally consequently the current decreases proportionally The induction of voltage in the secondary is a function of the strength of the flux If no iron core is present the flux lines can disperse reducing the strength of the magnetic field As a result the induction of voltage in the secondary is minimal Due to the much larger permeability of iron compared to air in the presence of an iron core the flux lines are gathered inward increasing the density of the field and consequently the induced voltage This is used to create the variable output voltage in the LVDT proportional to the level at which the iron core is within the windings as in Figure 107 If the total number of turns in the primary and the secondary are the same the voltages are proportional to the strength of the flux itself a function of the position of the core In LVDTs the secondary coil consists of two parts wound in opposite directions Con sequently as the core moves in each direction away from the center position the direction of the output voltage changes as well The output of an LVDT is almost linear and proportional to the input position of the core Table 101 Binary and gray codes Gray code Binary code Gray code Binary code 0 0000 0000 6 0101 0110 1 0001 0001 7 0100 0111 2 0011 0010 8 1100 1000 3 0010 0011 9 1101 1001 4 0110 0100 10 1111 1010 5 0111 0101 11 1110 1011 Vout Displacement Vin Voltage out Position AC Primary coil Secondary coils Figure 107 Linear variable differential transformer Introduction to Robotics 382 Assuming that the input voltage is Vin A sin ωt the output voltage created by each half of the secondary coil is V1 k1 sin ωtϕ and V2 k2 sin ωtϕ Vout k1k2 sin ωtϕ When k2 is larger than k1 the direction of output voltage changes 1044 Resolvers Resolvers are very similar to LVDTs in principle but are used to measure an angular motion A resolver is also a transformer where the primary coil is connected to the rotating shaft and carries an alternating current either through slip rings or from a brushless transformer within it Figure 108 There are two secondary coils placed 90 apart from each other As the rotor rotates the flux it develops rotates with it When the primary coil in the rotor is parallel to either of the two secondary coils the voltage induced in that coil is maximum while the voltage induced in the other secondary coil perpendicular to it is zero As the rotor rotates eventually the voltage in the first secondary coil goes to zero while the second coil develops its max imum voltage For all other angles in between the two secondary coils develop a voltage proportional to the sine and cosine of the angle between the primary and the two secondary coils Although the output of a resolver is analog it is equal to the sine and cosine of the angle eliminating the necessity to calculate these values later Resolvers are reliable robust and accurate 1045 Linear Magnetostrictive Displacement Transducer LMDT or MDT In this sensor a pulse is sent through a conductor which bounces back as it reaches a magnet The time of travel to the magnet and back is converted to a distance if the speed of travel is known By attaching the moving part to either the magnet or to the conductor the displacement can be measured A simple schematic of the sensor is shown in Figure 109 The IBM 7565 hydraulic gantry robot displacement sensors were of this type as shown in Figure 1010 V1 V2 Voltage out Vin V sinωt V2 K sinωt cosθ V1 K sinωt sinθ θ θ θ Figure 108 Schematic of a resolver Magnet Time Displacement Figure 109 Schematic drawing of a magnetostrictive displacement sensor Sensors 383 1046 Halleffect Sensors A Halleffect sensor works on the Halleffect principle where the output voltage of a conductor carries a current changes when in the presence of a magnetic field Therefore the output voltage of the sensor changes when a permanent magnet or a coil that produces a magnetic flux is close to the sensor A Halleffect trans ducers output is analog and must be converted for digital applications It is used in many applications including the sensing of the position of the permanent magnet rotors of brushless DC motors 1047 Global Positioning System GPS GPS units are generally used in mobile robots and navigation systems to determine the current position of the device relative to a global reference frame GPS is based on a radionavigation system for civilian use freely available to anyone With a GPS receiver we can determine a global position and time that can be used for navigation and mapping The system includes many satellites orbiting the Earth at about 20 000 km a control and monitoring station on Earth and the GPS receivers The receiver uses the transmitted data from the satellites to calculate its position This information can be sent directly to the control system of a mobile robot for positioning purposes and navigation Each satellite sends signals at precise intervals with information about the time the signal was sent and location of the satellite The GPS unit reads the signals sent by four satellites and using the difference between the current time and the time at which each signal was sent which is contained in the message received calculates the distance to the satellite Each distance forms a sphere centered at the satellite on which the GPS unit resides The intersection between these spheres is the location of the GPS unit In theory signals from only three satellites should suffice the GPS unit should be able to determine its location relative to three satellites two spheres intersect at a circle and the circle generally intersects the third sphere at two points the one closer to the Earths surface is the desired location However because the signals move at the speed of light the accuracy of the system is greatly dependent on the accuracy of the GPS units clock The commercially massproduced GPS clocks are not accurate enough to yield precise positioning Therefore the signal from a fourth satellite is also used to increase the accuracy of the system from about 100 meters to about 20 meters Military devices use a more accurate clock and highperformance signals for improved positional accuracy A GPS unit can be integrated into a robotic system for navigation and positioning The position information is fed into the microprocessor which uses it to decide the succeeding actions or motions A 3D rollpitchyaw compass may also be used for global direction and navigation Although this compass is not a GPS system it can provide directional information about the three axes of motion and therefore aid in controlling a robots position and orientation A GPS system can also determine speed of the device by calculating the change in position versus time as well as a time stamp from the signal Magnets Tubes Figure 1010 IBM 7565 magnetostrictive displacement transducers Introduction to Robotics 384 1048 Other Devices Many other devices can be used as position sensors some novel and hightech some simple and old For example in order to measure the angles of finger joints in a glove such as in a virtualreality glove conductive elastomer strips were attached to the glove above the fingers Conductive elastomer is a urethanebased synthetic rubber filled with conductive carbon particles Its electrical resistance decreases as the tension on it increases Therefore as the finger bends within the glove it stretches the strip changing its resistance which can be measured and converted to a position signal 2 In another device onehalf side of a nonconductive shaft is coated with a conducting material Two half cylinder conductive electrodes with radii slightly larger than the shafts are mounted concentrically over the shaft creating a capacitor between the shaft and the stationary electrodes Figure 1011 As the shaft rotates the capacitance changes too Used as a capacitor within a tunneldiode oscillator circuit the output frequency varies as the capacitance varies relative to the shaft position Therefore by measuring the frequency of the oscillation the position of the shaft can be measured 3 An inductive noncontact position sensor developed for measuring defects in space shuttle windows has an accuracy of better than 400 nanometers and a range of 200 microns 4 105 Velocity Sensors The following are the more common velocity sensors used in robotics Their application is very much related to the type of position sensor used Depending on the type of position sensor used there may not even be a need to use a velocity sensor 1051 Encoders If an encoder is used for displacement measurement there is in fact no need to use a velocity sensor Since encoders send a known number of signals for any given angular displacement by counting the number of signals received in a given length of time dt velocity can be calculated A typical number for dt may be 10 ms However if the encoder shaft rotates slowly the number of signals received may be too small for an accurate calculation of velocity On the other hand if the time is increased in order to increase the total number of signals per cycle the rate at which velocity is updated and sent to the controller decreases diminishing the accuracy and effectiveness of the controller In some systems the cycle time dt is varied depending on the angular velocity of the encoder shaft A smaller number is used if it rotates fast increasing the effectiveness of the controller and a larger number is used otherwise to gather enough data 1052 Tachometers A tachometer is in fact a mechanicaltoelectrical energy converter Its output is an analog voltage propor tional to the input angular speed Tachometers are generally inaccurate at very low speeds Shaft Conducting coating Two stationary conductive electrodes Figure 1011 Shaftangle measuring device based on a tunneldiode oscillator and capacitance between a shaft and stationary electrodes Sensors 385 1053 Differentiation of Position Signal If the position signal is clean it is possible and simple to differentiate the position signal and convert it to velocity signal For this it is necessary that the signal be as continuous as possible to prevent large impulses in the velocity signal Therefore it is recommended that a resistor with conductive polymer film be used for position measurement as a wirewound potentiometers output is piecewise and unfit for differentiation Regardless differentiation of a signal is always noisy and should be done very carefully Figure 1012 shows a simple RC circuit with an opamp that can be used for differentiation where the velocity signal is Vout RC dVin dt 104 Similarly the velocity or acceleration signal can be integrated to yield position or velocity signals as Vout 1 RC Vindt 105 106 Acceleration Sensors Accelerometers are very common sensors for measuring accelerations but generally not used with industrial robots Regardless acceleration measurements have been used for highprecision control of linear actuators 5 and for joint feedback control of robots 6 107 Force and Pressure Sensors 1071 Piezoelectric Piezoelectric material compresses with a voltage across it and produces a voltage if compressed This was used in devices such as the phonograph to create a voltage from the variable pressure caused by the grooves in the record Similarly a piece of piezoelectric can be used to measure pressures or forces in robotics The analog output voltage must be conditioned and amplified for use In one application 7 intended for an arti ficial skin for prosthetic devices and robots piezoelectric sensors were embedded in stretchable substrates in the shape of a thumb 6 sensors and a hand 30 sensors to measure the force exerted on the skin at different locations 1072 ForceSensing Resistor The forcesensing resistor FSR is a polymer thickfilm device that exhibits a decreasing resistance with increasing force applied perpendicular to its surface 8 9 10 In one particular model the resistance changes Position signal Velocity signal Position signal Velocity signal R C C R Figure 1012 Schematics of differentiating and integrating RC circuits with an opamp Introduction to Robotics 386 from about 500 kΩ to about 1 kΩ for forces of 10 to 10 000 gr See Figure 1013 In another application an RFID pressure sensor wirelessly sends signals to its controller based on changes in pressure 11 1073 Strain Gauge A strain gauge can also be used to measure force The output of the strain gauge is a variable resistance proportional to the strain which itself is a function of applied forces Therefore measuring the resistance we can determine the applied force Strain gauges are used to determine the forces at the end effector and the wrist of a robot Strain gauges can also be used for measuring the loads on the joints and links of the robot but this is not very common Figure 1014a is a simple schematic drawing of a strain gauge Strain gauges are used within a Wheatstone bridge as shown in Figure 1014b A balanced Wheatstone bridge would have similar potentials at points A and B When the resistance in any of the four resistors changes there is a current flow between two junctions A and B Consequently it is necessary to first calibrate the bridge for zero flow in the galvanometer By carefully adjusting the resistance of one of the other resistors until the current flow becomes zero the change in the resistance of the strain gauge can be determined from R1 R4 R2 R3 106 Strain gauges are sensitive to changes in temperature To remedy this problem a dummy strain gauge can be used as one of the four resistors in the bridge to compensate for temperature changes V A B R1 R2 R3 R4 G a b Figure 1014 a A strain gauge and b a Wheatstone bridge Figure 1013 A typical forcesensing resistor FSR The resistance of this sensor decreases as the force acting on it increases Sensors 387 1074 Antistatic Foam The antistatic foam used for transporting IC chips is conductive and its resistance changes due to an applied force It can function as a crude and simple yet inexpensive force and touch sensor To use a piece of anti static foam insert a pair of wires into two sides of it and measure the voltage or resistance across it 108 Torque Sensors Torque can be measured by a pair of strategically placed force sensors Suppose that two force sensors are placed on opposite sides of a shaft A torque applied to the shaft generates two opposing forces on the shafts body causing strains in opposite directions The two force sensors can measure the forces which can be converted to a torque To measure torques about different axes three pairs of mutually perpendicular sensors must be used However since forces can also be measured with the same sensors a total of six force sensors can generally report forces and torques about three axes independent of each other as depicted in Figure 1015 Pure forces generate similar signals in a pair while a torque generates pairs of signals with oppo site signs Figure 1016 shows typical industrial forcetorque sensors Fx Mx Fy My Fz Mz Figure 1015 Arrangement of three pairs of strain gauges along the three major axes for force and torque measurements Figure 1016 Typical industrial forcetorque sensors Source Reproduced with permission from ATI Industrial Automation Introduction to Robotics 388 Miniature load sensors designed to be used as fingertips for anthropomorphic robot hands use a spring instrumented with at least six strain gauges The wires are attached to a small interface board at the base of the spring The sensor is attached to an AD converter as close to the sensor as possible The data is trans mitted to the controller by wires routed at the neutral axis of the fingers 12 Figure 1017 shows a schematic depiction of a system in which flexural springs attached to a shaft form a pair of capacitors used as part of a tunneldiode oscillator circuit As the shaft rotates slightly under the load the capacitance of each pair changes causing a change in the oscillation frequency of the circuit By measur ing the frequency of oscillations the torque can be determined 13 109 Microswitches Microswitches although extremely simple are very useful and common in all robotic systems They cut off the electrical current and therefore can be used for safety purposes for determining contact for sending signals based on displacements and many other uses Microswitches are robust simple and inexpensive 1010 Visible Light and Infrared Sensors These sensors react to the intensity of light that is projected onto them by changing their electrical resistance If the intensity of light is zero the resistance is at maximum As the light intensity increases the resistance decreases and consequently the current increases These sensors are inexpensive and very useful They can be used for making optical encoders and other devices as well They are also used in tactile sensors as will be discussed later A phototransistor can also be used as a light sensor where in the presence of a certain intensity of light it turns on otherwise it is off Phototransistors are usually used in conjunction with an LED light source A light sensor array can be used with a moving light source to measure displacements as well This has been used to measure deflections and small movements in robots and other machinery 14 Light sensors are sensitive to the visible light range Infrared sensors are sensitive to the infrared range Since infrared is invisible to human eyes it does not disturb humans For example if a device needs light to measure a large distance for navigation purposes infrared can be used without attracting attention or dis turbing anyone Shaft Housing Flexural springs Figure 1017 The torque can be found by measuring the changes in the frequency of oscillation of a tunnel diode oscillator when the capacitance of the flexural springs changes due to the applied torque Sensors 389 1011 Touch and Tactile Sensors Touch sensors are devices that send a signal when physical contact has been made The simplest form of a touch sensor is a microswitch which either turns on or off as contact is made The microswitch can be set up for different sensitivities and ranges of motion As an example a strategically placed microswitch on a mobile robot can send a signal to the controller if it reaches an obstacle during navigation More sophisticated touch sensors may send additional information For example a force sensor used as a touch sensor may not only send touch information but also report the magnitude of the contact force A tactile sensor is a collection of touch sensors which in addition to determining contact can also provide additional information about the object This additional information may be about the shape size or type of material In most cases a tactile sensor is a collection of many touch sensors arranged in an array or matrix form as shown in Figure 1018 In this design an array of six touch sensors is arranged on each side of a tactile sensor Each touch sensor is made up of a plunger an LED and a light sensor As the tactile sensor closes and each plunger moves in or out it blocks the light from the LED projecting onto the light detector The output of the light sensor is proportional to the displacement of the plunger As you can see these touch sensors are in fact displacement sensors Similarly other types of displacement sensors may be used for this purpose from microswitches to LVDTs pressure sensors magnetic sensors and so on As the tactile sensor comes in contact with an object depending on the shape and size of the object dif ferent touch sensors react differently in a different order This information is used by the controller to deter mine the size and the shape of the object Figure 1019 shows three simple setups one touching a cube one touching a cylinder and one touching an arbitrary object As can be seen each object creates a different unique signature that can be used for detection Attempts have also been made to create somewhat of a continuous skinlike tactile sensor that could func tion similarly to human skin In most cases the design revolves around a matrix of sensors embedded between layers of polymertype material 7 15 16 17 Touch sensor Light sensor LED Plunger Figure 1018 Tactile sensors are generally a collection of simple touch sensors arranged in an array form with a specific order to relay contact and shape information to the controller Figure 1019 A tactile sensor can provide information about the object Introduction to Robotics 390 1012 Proximity Sensors A proximity sensor is used to determine that an object is close to another object before contact is made This noncontact sensing can be useful in many situations from measuring the speed of a rotor to navigat ing a robot There are many different types of proximity sensors such as magnetic eddy current and Hall effect optical ultrasonic inductive and capacitive The following is a short discussion of some of these sensors 10121 Magnetic Proximity Sensors A magnetic sensor activates when it is close to a magnet It can be used in applications such as turning a circuit on and off or for measuring rotational speeds and the number of rotations of a shaft of a motor or a wheel and therefore can be used in calculating positional changes Imagine a mobile robot where the total displacement of the robot is calculated by counting the number of times a particular wheel rotates multi plied by the circumference of the wheel A magnetic proximity sensor can be used to track wheel rotations by mounting a magnet on the wheel or its shaft and the sensor on the chassis Similarly the sensor can be used for other applications including for safety For example many devices have a magnetic proximity sensor that sends a signal to stop the rotating or moving parts when the door is open 10122 Optical Proximity Sensors Optical proximity sensors consist of an emitting light source either internal to the sensor or external to it and a receiver which senses the presence or absence of light The receiver is usually a phototransistor and the emitter is usually an LED The combination of the two creates a light sensor and is used in many applications including optical encoders As a proximity sensor it is set up such that the light emitted by the emitter is not reflected to the receiver unless an object is within range Figure 1020 is a schematic drawing of an optical proximity sensor Unless a reflective object is within the range of the switch the light is not seen by the receiver and therefore there is no signal Figure 1021 shows another variation of an optical proximity sensor In this simple system that can deter mine both proximity as well as shortrange distance and therefore act as a range finder for short distances a beam of light is passed through a prism that refracts the light into its constituent primary colors Depend ing on the distance of the object from the sensor one particular color of light is reflected back to the sen sors photodetector By measuring the energy of the reflected light the distance can be determined and reported Emitter Receiver In range Emitter Receiver Out of range too far Emitter Receiver Out of range too close Figure 1020 Optical proximity sensor Sensors 391 10123 Ultrasonic Proximity Sensors In these sensors an ultrasonic emitter emits frequent bursts of high frequency sound waves There are two modes of operation for ultrasonic sensors opposed mode and echo diffused mode In opposed mode a receiver is placed in front of the emitter whereas in echo mode the receiver is either next to or integrated into the emitter and receives the reflected sound wave If the receiver is within range or if the sound is reflected by a surface close to the sensor it is sensed and a signal is produced Otherwise the receiver does not sense the wave and there is no signal All ultrasonic sensors have a blind zone near the surface of the emitter in which the distance and presence of an object cannot be detected Ultrasonic sensors cannot be used with surfaces such as rubber and foam that do not reflect the sound waves in echo mode Refer to Section 10131 for more information about ultrasonic sensors Figure 1022 is a schematic drawing of this type of sensor 10124 Inductive Proximity Sensors Inductive sensors are used to detect metal surfaces The sensor is a coil with a ferrite core an oscillatordetec tor and a solid state switch In the presence of a metal object in the close vicinity of the sensor the amplitude of the oscillation diminishes The detector senses the change and turns off the solid state switch When the part leaves the range of the sensor it turns on again Emitter Prism Photodetector Figure 1021 An alternative optical proximity sensor Emitter Receiver Emitter Receiver Echo Mode Object Opposed Mode Figure 1022 Ultrasonic proximity sensors Introduction to Robotics 392 10125 Capacitive Proximity Sensors The capacitive sensor reacts to the presence of any object that has a dielectric constant more than 12 In that case when within range the materials capacitance raises the total capacitance of the circuit This triggers an internal oscillator to turn on the output unit which will send out an output signal Consequently the sensor can detect the presence of an object within a range Capacitive sensors can detect nonmetal materials such as wood liquids and chemicals 10126 Eddy Current Proximity Sensors As we discussed in Chapter 9 when a conductor is placed within a changing magnetic field an elec tromotive force emf is induced in it that causes a current to flow in the material This current is called eddy current An eddy current sensor typically has two coils where one coil generates a changing mag netic flux as reference In the close proximity of conducting materials an eddy current is induced in the material which in turn creates a magnetic flux opposite to that of the first coil effectively reducing the total flux The change in the total flux is proportional to the proximity of the conducting material and is measured by the second coil Eddy current sensors are used to detect the presence of conductive materials as well as the nondestructive testing of voids and cracks thickness of materials and so on 1013 Range Finders Unlike proximity sensors range finders are used to find larger distances to detect obstacles and to map the surfaces of objects Range finders are meant to provide advance information to the system Range finders are generally based on light visible light infrared light or laser and ultrasonics Two common methods of meas urement are triangulation and timeofflight or lapsed time Triangulation involves illuminating the object by a single beam of light that forms a spot on the object The spot is seen by a receiver such as a camera or photodetector The range or depth is calculated from the tri angle formed between the receiver the light source and the spot on the object as shown in Figure 1023 As is evident from Figure 1023a the particular arrangement between the object the light source and the receiver only occurs at one instant At this point the distance d can be calculated by tanβ d l1 tanα d l2 and L l1 l2 a b Rotating emitter Receiver l1 l2 L d α l1 Rotating emitter Receiver l2 L β Figure 1023 Triangulation method for range measurement The receiver will only detect the spot on the object when the emitter is at a particular angle which is used to calculate the range Sensors 393 Substituting and manipulating the equations yields d L tanα tanβ tanα tanβ 107 Since L and β are known if α is measured d can be calculated Except for this instant as shown in Figure 1023b the receiver does not see the reflected light Consequently it is necessary to rotate the emitter and as soon as the reflected light is observed by the receiver record the angle of the emitter and use it to calculate range In practice the emitters light such as laser is rotated continuously by a rotating mirror and the receiver is checked for signal As soon as the light is observed the angle of the mirror is recorded Time of flight or lapsed time ranging consists of sending a signal from a transmitter that bounces back from an object and is received by a receiver The distance between the object and the sensor is half the distance traveled by the signal which can be calculated by measuring the time of flight of the signal and by knowing its speed of travel This time measurement must be very fast to be accurate For small distance measurements the wavelength of the signal must be very small 10131 Ultrasonic Range Finders Ultrasonic systems are rugged simple inexpensive and low powered They are readily used in cameras for focusing in alarm systems for motion detection in helping the visually impaired by mapping what is in front of them on a tactile navigation device or by vocalizing a printed newspaper 18 and in robots for navigation and range measurement Their disadvantage is in their limited resolution which is due to the wavelength of the sound and natural variations of temperature and velocity in the medium and in their maximum range which is limited by the absorption of the ultrasound energy in the medium Typical ultrasonic devices have a frequency range of 20 kHz to above 2 MHz Most ultrasonic devices measure the distance using the timeofflight technique in which a transducer emits a pulse of high frequency ultrasound that is reflected back when it encounters a separation in the medium and a receiver that receives the reflected signal The distance between the transducer and the object is half the distance traveled which is equal to the time of flight multiplied by the speed of sound Of course the accuracy of the measurement depends on the wavelength of the signal and the accuracy of the time meas urement and the speed of sound The speed of sound in a medium is dependent on the frequency of the wave at above 2 MHz level and the density and temperature of the medium To increase the accuracy of the meas urement a calibration bar is usually placed about an inch in front of the transducer which is supposed to calibrate the system for varying temperatures This is only good if the temperature is uniform throughout the traveled distance which may or may not be true Time measurement accuracy is also very important for accurately measuring distance Usually the worst case error in time measurement is 12 wavelength if the clock is stopped as soon as the receiver receives the returned signal at a minimum threshold Therefore higherfrequency ultrasound devices yield better accu racy For example for 20 kHz and 200 kHz systems the wavelengths will respectively be about 067 and 0067 inches 17 and 17 mm yielding a minimum worstcase accuracy of 034 and 0034 inches 85 and 085 mm Crosscorrelation phasecomparison frequencymodulation and signalintegration methods have been used to increase the resolution and accuracy of ultrasonic devices However although higher frequencies yield a better resolution they attenuate much faster than the lowerfrequency signals which severely limits their range On the other hand the lowerfrequency transducers have wide beam angles and a severely dete riorated lateral resolution Consequently there is a tradeoff between the lateral resolution and signal atten uation in relation with the beam frequency Background noise is another problem with ultrasonic sensors Many different industrial and manufacturing operations and techniques produce sound waves that contain ultrasonics as high as 100 kHz which can inter fere with the ultrasonic device operation As a result it is recommended that frequencies above 100 kHz be utilized in industrial environments Introduction to Robotics 394 Ultrasonics can be used for distance measurement mapping and flaw detection A singlepoint distance measurement is called spot checking versus range array acquisition for multiple datapoint acquisition tech niques used for 3D mapping In this case a large number of distances to different locations on an object are measured The collection of distance data provides a 3D map of the surface of the object It should be noted that since only half the surface area of a 3D object can be ranged these measurements are also referred to as 25D The backside of the object or areas obscured by other parts cannot be ranged Many mobile robots and autonomous vehicles use similar devices to map the area in front of the robot or vehicle and determine distance to objects obstacles or drop off 10132 LightBased Range Finders Lightbased including infrared and laser range finders measure the distance from an object by three differ ent methods direct timedelay measurement indirect amplitude modulation and triangulation The direct timedelay measurement method measures the time required for a collimated beam of light usually laser since it does not divert to travel to an object and back similar to an ultrasonic sensor Since the speed of light in air is 186 000 milessec 300 000 kmsec it travels about 1 ft 30 cm in 1 ns Therefore extremely high speed electronics and high resolutions are required to use this method In one indirect method the time delay is measured by modulating a long burst of light with a lowfrequency sinusoidal wave timetoamplitude converter TAC and measuring the phase difference between the mod ulations between the emitted light and the backscattered light This in effect is slowing down the wave speed to measurable scales by substituting the speed of light with lowspeed modulations but still taking advantage of the long travel range of laser lights Triangulation is the common technique used in range finding using light beams For shorter distances encountered in navigation triangulation yields the most accurate and best resolution among the three dif ferent techniques Another technique for measuring range with light sources is stereo imaging which we will discuss in Chapter 11 A variation of this technique involves the use of a small laser pointer along with a single camera 19 In this technique the location of the laser light within the camera image is measured relative to the center of the image Since the laser light and the axis of the camera are not parallel the location of the laser dot within the image is a function of the distance between the object and the camera LiDAR light detection and ranging is similar to radar but uses light instead of radio waves A beam of light laser or infrared is fired toward the target and the properties of scattered light are measured to find the range andor other information about a distant target To gather information on a continuous basis thou sands of pulses of light are reflected by a rotating mirror For example in a system developed by Velodyne LiDAR Figure 1024 a set of laser emitters fire thousands of pulses per second while the unit rotates It can collect data about the environment at 360 azimuth and 15 to 25 elevation with a range of 200 meters Figure 1024 A commercial LiDAR device and a scene captured by it Source Reproduced with permission from Velodyne LiDAR The original picture is in color Sensors 395 20 at nearly 12 million points per second These range finders are very popular in mobile robots in auton omous vehicles and in security arrangements 1014 Sniff Sensors Sniff sensors are similar to smoke detectors They are sensitive to particular gases and send a signal when they detect the gas They are used for safety purposes as well as for search and detection purposes 21 22 23 When appropriate a sniff sensor may be incorporated in a robot for enhanced capability and for operations such a search and rescue 1015 Vision Systems Vision systems are perhaps the most sophisticated sensors used in robotics Due to their importance and complexity they will be discussed separately in Chapter 11 Note that vision systems are in fact sensors and that they relate the function of a robot to its environment as do all other sensors 1016 VoiceRecognition Devices Voice recognition involves determining what is said and taking an action based on the perceived information Voicerecognition systems generally work on the frequency content of spoken words As you may remember from other courses any signal may be decomposed into a series of sines and cosines of different frequencies at different amplitudes which when combined reconstruct the original signal We will discuss this in more detail in Chapter 11 However it is useful to realize that signals have certain major frequencies that constitute a signature spectrum and that this spectrum differs from other signals spectrum The signature spectrums of particular words or sentences are used in voicerecognition systems to recognize the spoken words Voice recognition systems may be trained individually for specific applications such as speaking to a robot or be designed for public applications such a telephone systems To do this the system is trained by speaking the words a priori to allow it to create a lookup table of the major frequencies that represent the expected spoken words Later when a word is spoken and its frequen cies are determined the result is compared to the lookup table If a close match is found the word is recog nized For better accuracy it is necessary to train the system with more repetitions On the other hand a moreaccurate list of frequencies reduces allowable variations in the way the word is spoken such as accents This means that if the system tries to match a larger number of frequencies for better accuracy in the pres ence of any noise or any variations in the spoken words the system does not recognize the word On the other hand if limited number of frequencies is matched in order to allow for variations the system may recognize a similar but incorrect word A universal system that recognizes all accents and variations in speaking may not be either possible or useful Many robots are equipped with voicerecognition systems in order to commu nicate with the users In most cases the robot is trained by the user and can recognize words that trigger a certain action in response For example a particular word may be programmed to relate to a certain position and orientation When the voicerecognition system recognizes the word it sends a signal to the controller which in turn runs the robot to the desired location and orientation This has been particularly useful with robots that aid the disabled as well as for medical robots Humanoid robots would require a much larger collection of words and understanding of the spoken language and grammar to be able to communicate and understand a dialogue Introduction to Robotics 396 1017 Voice Synthesizers Voice synthesis although not truly a sensor is included in this chapter because it is directly related to voice recognition and to a robots ability to communicate with the outside world For example in an animatronic face that mimics speaking lips a voicesynthesis system was used to recreate typed words by reproducing the sounds through a speaker while the artificial lips moved accordingly 24 This would enable a robotic face to read from books read emails for the blind or speak to humans Voice synthesis is accomplished in two different ways One way is to recreate the words by combining phonemes and vowels In this case each word is recreated when the phonemes and vowels are combined This can be accomplished with commercially available phoneme chips and a corresponding program Although this type of system can reproduce any word it sounds unnatural and machinelike As an example of the difficulty encountered by this kind of system consider the two words power and mower Although both these words are written very similarly they are pronounced differently This kind of a system will not be able to recognize this unless every conceivable exception is programmed into the chip The alternative is to record the words that the system may need to synthesize and to access them from memory as needed Telephone announcements video games and many other machine voices are prere corded and accessed as needed Although this system sounds very natural it is limited As long as all the words the machine needs to say are known a priori this system can be used We should expect to see sig nificant advances in this area in the future 1018 Remote Center Compliance RCC Device Although a remote center compliance RCC device is not an actual sensor it is discussed here because it acts as a sensing device for misalignments and provides a means of correction for robots However RCC devices also called compensators are completely passive and there are no input or output signals An RCC device is an attachment added to the robot between the wrist and the end effector It is designed to provide a means of correction for misalignments between the end effector and a part Suppose a robot is to push a peg into a hole in a part as shown in Figure 1025 If the hole and the peg are exactly the right sizes and if they are exactly aligned both laterally and axially the robot may push the peg into the hole However this is often impossible to achieve Imagine the hole is slightly off such that the cen terline of the hole and the peg are a small distance apart as in Figure 1025b a c d b Figure 1025 Misalignment of assembling elements Sensors 397 If the robot is in positioncontrol mode it can attempt to push the peg into the hole even if there is a mis alignment As a result either the robot or the part will deflect or break A stiffer robot a sign of a good robot worsens this problem If the robot has some compliance it is actually possible to cut a chamfer Figure 1025c around the hole or the peg or both to allow the robot to move laterally to align itself with the hole and prevent deflections or breakage Alternately it is possible to allow the part to move to align itself with the robot Now assume that instead of an axial misalignment there is an angular cocking misalignment between the two centerlines as in Figure 1025d In this case even if the peg and the hole are exactly aligned at the mouth of the hole if the peg is pushed in one of the two has to either deflect or break unless one is allowed to move However a compliant robot that gives enough to prevent breakage will probably have unacceptable accuracy Imagine that in order to resolve these problems a spring is used to connect the end effector to the robot wrist In this case the misalignment can be overcome but the compliant connection between the robot and the part does not allow insertion of the peg into the hole the spring simply compresses instead Therefore a device is needed that can provide selective compliance to the end effector to allow the robot to correct itself in directions where correction is needed but without affecting its accuracy in other directions A remote center compliance device provides this selective compliance through simple 4bar mechanisms To understand how the RCC device works consider a simple 4bar mechanism as shown in Figure 1026 In a mechanism there are a total of M n n1 2 instantaneous centers of zero velocity where n is the num ber of links including the ground Each instantaneous center of zero velocity is a point where the instanta neous velocity of one body relative to another is zero In a 4bar mechanism there are a total of six such centers Each of the two pin joints O1 and O2 attached to the ground is a center of rotation for the two links attached to the ground The other two pin joints A and B are centers of rotation or zero velocity of the coupler AB relative to links O1A and O2B and vice versa However in addition to these there are two more centers of instantaneous zero velocity one between the ground and the coupler and one between the two links O1A and O2B To find the instantaneous center of zero velocity for the coupler in which we are interested for this subject we need to find the velocities of two arbitrary points on it The instantaneous center of zero velocity for the coupler will be at the intersection of two lines perpendicular to the velocities of the two points on the coupler such as points A and B This is true because since V ω ρ the velocity of any point is normal to its radius of curvature ρ As a result the instantaneous center of zero velocity must be somewhere on the normalto velocity line which is along the length of each link where two such lines intersect Since this point has O1 O2 A B IC1 VA VB Figure 1026 Instantaneous centers of zero velocity for a 4bar mechanism Introduction to Robotics 398 a zero instantaneous velocity it means that at this instant it is not moving and consequently the body must be rotating about it Therefore at the instant shown the coupler link AB is rotating about point IC1 This point will be at another location in the next instant and as a result its acceleration cannot be zero Now consider a parallelogram 4bar mechanism as shown in Figure 1027a Since the two normals to the two velocities at A and B are parallel the instantaneous center of zero velocity for the coupler is at infinity indicating that the coupler is not rotating but is in pure translation This means that the coupler always trans lates to the left or right without any rotation although its motion is curvilinear Figure 1027b shows an isosceles trapezoid 4bar mechanism and the instantaneous center of zero velocity for its coupler which allows an instantaneous rotation of the coupler link about the IC These two mechanisms can provide simple translation or rotation about a remote center when needed An RCC device is a combination of these two mechanisms such that when needed it can provide slight translation or rotation of the object about a distant point therefore remotecenter compliance The distant point is the point of contact between the two parts such as the peg and the hole which is remote from the robot However notice that this compliance is only lateral or angular where it is needed The robot is still axially stiff since the mechanism does not provide any motion in the direction normal to the coupler As a result it provides a selective compliance in the direction needed without reducing the robots stiffness and consequently its accuracy Figure 1028 is a schematic drawing of how an RCC device works In reality each device provides a certain stiffness or compliance in lateral and axial directions or in bending and cocking directions and must be picked based on need Each device also has a given centertocenter distance which determines its remote b a A B IC B A Figure 1027 Special 4bar mechanisms the basis for a remotecenter compliance device RCC device The part Robots wrist Figure 1028 Schematic depiction of how an RCC device operates Sensors 399 center location relative to the center of the device Therefore there may be a need for multiple RCC devices if more than one part or operation is performed and must be picked accordingly 25 Figure 1029 shows a commercial RCC device 1019 Design Project At this point you may want to incorporate into your robots as many sensors as you want or have available to you Some of the sensors are necessary for feedback that is essential if you are to control the robots Others are added based on need and availability This is a very interesting part of any robotic project You may exper iment with different sensors for different applications and even come up with your own You may experiment with other sensors that have not been mentioned here but are available from electronic warehouses You may integrate sensors to a mobile robot of your choice for control and added intelligence too For example a visible light or infrared sensor located on the platform of the mobile robot allows you to com municate with it by projecting a visible or infrared light beam Proximity sensors and range finders as well as a GPS positioning system can also be used to determine proximity or distance to walls and other obsta cles and for navigating in different environments 1020 Summary In this chapter we discussed a variety of different sensors that are used in conjunction with robots and robotic applications Some of these sensors are used for internal feedback Others are used for communica tion between the robot and the environment Some sensors are easy to use and inexpensive while others are expensive difficult to use and require a lot of support circuitry Each sensor has its own advantages and dis advantages As an example an incremental encoder can provide simple digital position and velocity infor mation with minimum input requirements However the absolute position cannot be measured with it An absolute encoder provides absolute position information in digital form but requires many input port to the controller that may not be available A potentiometer can also provide absolute position information is very simple to use and is very inexpensive but its output is in analog form and therefore must be digitized before a microprocessor can use it However in some applications an encoder and a potentiometer are used together one to report the absolute position at wakeup and one to accurately report the changes in the posi tion Together they provide all the information needed to run the system It is the role of the design engineer to decide what type of sensor is needed or is best suited for a particular application Figure 1029 A commercial RCC device Source Reproduced with permission from ATI Industrial Automation Introduction to Robotics 400 References 1 Encyclopedia of Sensors edited by Craig A Grimes EC Dickey and MV Pishko httpwwwaspbscom eoshtml 2 Glove Senses Angle of Finger Joints NASA Tech Briefs April 1998 3 ShaftAngle Sensor Based on TunnelDiode Oscillator NASA Tech Briefs July 2008 pp 2224 4 Inductive NonContact Position Sensor NASA Tech Briefs December 2018 p 31 5 Tan KK SY Lim TH Lee H Dou High Precision Control of Linear Actuators Incorporating Acceleration Sensing Journal of Robotics and Computer Integrated Manufacturing vol 16 no 5 October 2000 pp 295305 6 Xu WL JD Han Joint Acceleration Feedback Control for Robots Analysis Sensing and Experiments Journal of Robotics and Computer Integrated Manufacturing vol 16 no 5 October 2000 pp 307320 7 Miller Ross Artificial Skin Tactile Sensor for Prosthetic and Robotic Applications masters thesis mechanical engineering Cal Poly San Luis Obispo California 2010 8 Interlink Electronics Santa Barbara California 9 Force Imaging Technologies Chicago Illinois 10 Jameco Electronics catalog Belmont California 11 Pressure Sensor Mechanism NASA Tech Briefs April 2018 p 18 12 Miniature SixAxis Load Sensor for Robotic Fingertips NASA Tech Briefs July 2009 p 25 13 Torque Sensor Based on TunnelDiode Oscillator NASA Tech Briefs July 2008 p 22 14 Puopolo Michael G Saeed B Niku Robot Arm Positional Deflection Control with a Laser Light Proceedings of the Mechatronics 98 Conference Skovde Sweden Adolfsson and Karlsen editors Pergamon Press Sep 98 pp 281286 15 Hillis Daniel A High Resolution Imaging Touch Sensor Robotics Research 12 MIT Press Cambridge MA 16 Flexible Circuit Boards for Modular ProximitySensor Arrays NASA Tech Briefs January 1997 p 36 17 Feeling in a Second Skin Mechanical Engineering Magazine January 2016 p 12 18 Kosowatz John High Tech Eyes New Independence for People with Visual Impairment Mechanical Engineering Magazine March 2017 pp 3641 19 Niku SB Active Distance Measurement and Mapping Using Non Stereo Vision Systems Proceedings of Automation 94 Conference July 1994 Taipei Taiwan ROC vol 5 pp 147150 20 wwwvelodynecomlidar 21 Sensors That Sniff High Technology February 1985 p 74 22 Electronic Noses Made From Conductive Polymer Films NASA Tech Briefs July 1997 pp 6061 23 NASAs Robotic Sniffer Finds Space Station Leak NASA Tech Briefs September 2018 p 60 24 Jones Adam Animatronics Lips with Speech Simulation ALiSS masters thesis Cal Poly San Luis Obispo California 2002 25 ATI Industrial Automation catalogs for remote center compliance devices Sensors 401 Avaliação Final xx 1 Modelar e Simular a Cinemática direta e inversaDeslocamento Velocidade aceleração dos seguintes exercícios a Cap 6 NIKU Robótica 3rd Edição b Manipulador SCARA c Plataforma de Stewart 2 Modelar e Simular a Dinâmica Inversa e Direta dos itens abc NEWTONEULER e LAGRANGE 11 Image Processing and Analysis with Vision Systems 111 Introduction Vision systems have become an integral part of many robotic systems regardless of type allowing the robot to see the environment in which it is and to gather necessary information to do its job In such systems either a commercially available vision system is integrated to work with the robot or an original vision system is developed specifically for it There is a huge body of vision routines available and many more are created every year A large subset is also developed for use with autonomous vehicles and mobile humanoid robotic systems Obviously it is only possible to discuss vision systems in this chapter as an introduction into some basics of how vision systems work and on what they are based Commercially available vision systems and programs including Photoshop MATLAB Image Processing Toolbox Optimas and many other educational and industrial systems may be used to learn from practice with or use with robotic systems In this chapter we study some fundamental techniques for image processing and image analysis with a few examples of routines developed for certain purposes If interested it is recommended that you continue studying about the subject through other references 112 Basic Concepts The following sections include some fundamental definitions of terms and basic concepts that we will use throughout the chapter 1121 Image Processing vs Image Analysis Image processing relates to the preparation of an image for later analysis and use Images as captured by a camera or other similar techniques such as a scanner are not necessarily in a form that can be used by imageanalysis routines Some may need improvement to reduce noise some may need to be simplified others may need to be enhanced altered segmented filtered or modified Image processing is the collection of routines and techniques that improve simplify enhance and otherwise alter an image Image analysis is the collection of processes by which a captured and processed image is analyzed to extract information about the content and to identify objects or other related facts about the objects within the image or the environment 1122 Two and ThreeDimensional Image Types Although the real world is threedimensional 3D images can either be twodimensional 2D lacking depth information or 3D containing depth information Most images with which we normally deal obtained by 403 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed cameras are 2D However other systems such as Computed Tomography CT and CAT scans create 3D images that contain depth information Therefore these images can be rotated about different axes in order to better visualize the depth information Stereo vision systems also contain depth information A 2D image is extremely useful for many applications even though it has no depth information This includes feature extrac tion inspection navigation parts handling and many more Threedimensional images are used with applications that require motion detection depth measurement remote sensing relative positioning and navigation CADCAMrelated operations also require 3D image processing as do many inspection and object recognition applications For 3D images one slice of the object at a time is scanned and later all images are put together to create a 3D image representation of the internal characteristics of the object All 3D vision systems share the problem of coping with manytoone mapping of scenes to images To extract information from these scenes imageprocessing techniques are combined with artificial intelligence techniques When the system is working in environments with known characteristics eg controlled light ing it functions with high accuracy and speed On the other hand when the environment is unknown or noisy and uncontrolled eg underwater operations the systems are not very accurate and require additional processing of the information and therefore operate at lower speeds 1123 The Nature of an Image An image is a representation of a real scene either in black and white or in color and either in print or in digital form Printed images may be reproduced either by multiple colors and grays such as CMYK in color print or halftone black and white print or by a single ink source For example to reproduce a photograph with real halftones we use multiple gray inks which when combined produce a somewhat realistic image How ever in most print applications only one ink color is available such as black ink on white paper in a news paper or copier In this case all gray levels must be produced by changing the ratio of black versus white areas the size of the black dot Imagine that a picture to be printed is divided into small sections In each section if the ink portion of the section is smaller than the white the section will look a lighter gray Figure 111 If the black ink area is larger than the white area it will look a darker gray By changing the size of the printed dot many gray levels may be produced Similar to printed images electronic and digital images are also divided into small equal sections called picture cells or pixels in 3D images they are called volume cells or voxels To capture an image the intensity of each pixel is measured and recorded and similarly to recreate an image the intensity of light at each pixel location is varied Therefore an image file is the collection of the data representing the light intensities of a large number of pixels This file can be recreated processed modified or analyzed A color image is essen tially the same except that the original image is separated by filters into three images of red green and blue Figure 111 Examples of how gray intensities are created in printed images In print only one color ink is used while the ratio of black to white in each small section is changed to create different gray levels Introduction to Robotics 404 colors before capturing and digitization When the three colors with different intensities at each pixel loca tion are superimposed color images are recreated 1124 Acquisition of Images All digital still and video cameras are practically similar A digital video camera takes multiple still images every second and rapidly records or saves them in a file The image data is ultimately stored in binary form Therefore weultimatelydealwithafileofahugesequenceofnumbers0and1fromwhichweextractinformationandmake decisionsAppendixB contains a short discussionabout digital cameras and how theimage is captured The final outcome is a file that contains sequential pixellocation and pixelintensity data that we use in our discussions 1125 Digital Images The light intensities at each pixel location are measured and converted to digital form regardless of the type of camera or imageacquisition system The data is stored in memory in a file or in recording devices with an image format such as TIFF JPG bitmap and so on or displayed on a monitor If stored the file can be accessed and read by a program duplicated and manipulated or rewritten in a different form Vision routines too may access this information to perform functions on the data and either display the result or store the manipulated result in a new file A fundamental need is to be able to extract information or manipulate this collection of 0 and 1 values in a meaningful way To understand this better consider the simple lowresolution image in Figure 112 Each pixel is referred to by row and column numbers Assuming the system is digitized with only 4 bits we will further discuss this shortly there will be up to 24 16 distinct light intensities possible The sequence of 0 and 1 numbers repre senting the tenth row of the image looks as shown in the figure all with only 4 bits per pixel Different file formats list these numbers differently In a simple portable gray map PGM format the intensities are listed sequentially as shown A header at the beginning of the file indicates the number of pixels in each row and column in this case it is 12 12 The program knows that every 4 bits is one pixel Therefore it can access intensity of each pixel directly However as you notice the file is reduced to a string of 0 and 1 values to which imageprocessing routines are applied and from which information is extracted Now imagine the size of the string of 0 and 1 values that represents a large image sometimes in megapixel range at up to 24 bits per pixel for three primary colors RGB in color images Intensity values Row 10 0 1 1 1 0 0 1 1 0 0 0 1 1 1 1 0 0 1 1 0 1 0 0 0 1 1 0 0 1 1 0 0 0 0 0 0 7 3 1 0 3 9 10 3 3 11 14 10 1 0 1 0 1 1 1 0 1 0 1 1 0 0 1 0 0 1 0 0 1 2 3 4 5 6 7 8 9 10 11 12 7 3 1 0 3 9 10 3 3 10 14 11 a b c d e f g h i j k l Figure 112 An image and the binary representation of its first row using 4 bits per pixel Image Processing and Analysis with Vision Systems 405 An image with only shades of gray is called a gray image A color image results by superimposing three images of red green and blue hues RGB each with varying intensities Therefore when the image is digi tized it has three strings of 0s and 1s for the three hues an alternative way is to assign a number to each color all declared in a header at the beginning of the image file Then the number representing the pixel represents the color reference and intensity A binary image is an image where each pixel is either fully light or fully dark either a 0 or a 1 To achieve a binary image in most cases a gray image is converted using the histogram of the image and a cutoff value called a threshold A histogram of the pixel gray levels shows the distribution of the different gray levels We can pick a value that best determines a cutoff level with the least loss of information and use this value as a threshold to assign a 0 or off to all pixels whose gray levels are below the threshold and to assign a 1 or on to all pixels whose gray values are above the threshold Changing the threshold changes the binary image The advantage of a binary image is that it requires far less memory and it can be processed much faster than gray or colored images 1126 Frequency Domain vs Spatial Domain Many processes used in image processing and analysis are based on either the frequency domain or the spatial domainInfrequencydomainprocessingthefrequencyspectrumoftheimageisusedtoalteranalyzeorprocess theimageInthiscasetheindividualpixelsandtheircontentsarenotusedInsteadafrequencyrepresentationof thewholeimageisusedfortheprocessInspatialdomainprocessingtheprocessisappliedtotheindividualpixel values As a result each pixel is affected directly by the process Both techniques are equally important and pow erful and are used for different purposes It should be noted here that although spatial and frequencydomain techniques are used differently they are both related For example suppose a spatial filter is used to reduce noise in an image As a result of this noise reduction the frequency spectrum of the image is also affected The following sections discuss some fundamental issues about frequency and spatial domains This discus sion although general helps us throughout the entire chapter 113 Fourier Transform and Frequency Content of a Signal As you may remember from your mathematics or other courses any periodic signal may be decomposed into a collection of sines and cosines of different amplitudes and frequencies called Fourier series as follows f t a0 2 n 1 an cos nωt n 1 bn sin nωt 111 When these sines and cosines are combined the original signal is reconstructed This conversion to fre quency domain results in a Fourier series and the collection of different frequencies present in the equation yields the frequency spectrum or frequency content of the signal Of course although the original signal is in the timeamplitude domain the frequency spectrum is in the frequencyamplitude domain To understand this better lets look at an example Consider a signal in the form of a simple sine function like f t sin t Since this signal consists only of one frequency and a constant amplitude the frequency spectrum representing it consists of a single value at the given frequency as shown in Figure 113 Obviously if we plot the function represented by the arrow in Figure 113b with the given frequency and amplitude we have the same sine function reconstructed Sim ilarly the plots in Figure 114 represent f t n 13 15 1 n sin nt The frequencies are also plotted in the fre quencyamplitude domain As you see when the number of frequencies contained in ft increases the summation gets closer to a square function Figure 115a shows a signal from a sensor and its frequency content Although the signal is not a true sine function the dominant frequency is 075 Hz However due to the discrepancies and the variations in the Introduction to Robotics 406 Time Amplitude ftsint13sin3t 1 Amplitude Frequency 08 1 06 04 02 0 02 04 06 08 1 3 Amplitude ftsint13sin3t15sin5t 1 Amplitude Frequency Time 08 1 06 04 02 0 02 04 06 08 1 5 3 Amplitude ftsint13sin3t115sin15t Amplitude Frequency Time 08 1 06 04 02 0 02 04 06 08 1 15 13 11 9 1 3 5 7 Figure 114 Sine functions in the time and frequency domains for a successive set of frequencies As the number of frequencies increases the resulting signal gets closer to a square function a b 1 Amplitude Frequency Time Amplitude ft sint 08 1 06 04 02 0 02 04 06 08 1 Figure 113 Timedomain and frequencydomain plots of a simple sine function signal the frequency spectrum contains many other frequencies Figure 115b shows a signal with larger var iations and its frequency spectrum Clearly many more sine and cosine functions must be added in order to reconstruct this signal therefore the spectrum contains many more frequencies Theoretically to reconstruct a square wave from sine functions an infinite number of sines must be added together Since a square wave function represents a sharp change this means that rapid changes such as impulses pulses square waves or other similar functions decompose into a large number of frequencies The sharper the change the higher the number of frequencies needed to reconstruct it Therefore any video or other signal that contains sharp changes such as noise edges high contrasts impulse and step functions or has detailed information such as highresolution signals will have larger number of frequencies in its fre quency spectrum a b Frequency 10 Hz 15 075 Arbitrary Units 1 Sec 70 Target Arbitrary Units 10 Hz 1 Sec 100 Figure 115 Two signals and their frequency spectrums Introduction to Robotics 408 A similar analysis can be made on nonrepeating signals too called the Fourier transform particularly fast Fourier transform FFT Although we will not discuss the details of the Fourier transform in this book suf fice it to say that an approximate frequency spectrum of any signal can be found Although theoretically there are infinite frequencies in the spectrum generally there are some major fre quencies within the spectrum with larger amplitudes called harmonics These major frequencies or harmo nics are used in identifying and labeling a signal including recognizing voices shapes objects and the like Additionally depending on needs the frequency spectrum may be manipulated to obtain the desired results 114 Frequency Content of an Image Noise and Edges Figure 116 shows a lowresolution artificial image and a graph of its pixel intensities versus their positions for one row The intensity of pixel number 9h is very different from the ones before and after it and may indicate noise which is generally information that does not belong to the surrounding environment The intensities of pixels 9k9m are also different from the neighboring pixels and may indicate an edge Although this is a discrete digitized signal as discussed earlier it may be transformed into frequency domain as a large number of sines and cosines with different amplitudes and frequencies which if added reconstruct the signal As discussed earlier portions of the signal that change slowly such as small changes between succeeding pixel gray values will require fewer sines and cosines to be reconstructed and conse quently contribute more low frequencies to the spectrum On the other hand parts of the signal that vary quickly or significantly such as large differences between pixel gray levels at edges or noise require a large number of higher frequencies to be reconstructed and as a result contribute more high frequencies to the spectrum Both noises and edges are among cases where one pixel value is substantially different from the neighboring pixels Therefore noises and edges contribute to the higher frequencies of a typical frequency spectrum whereas slowly varying gray level sets of pixels representing the object contribute to the lower frequencies of the spectrum If a highfrequency signal is passed through a lowpass filter a filter that allows lower frequencies through without much attenuation in amplitude but which severely attenuates the amplitudes of the higher frequen cies in the signal it reduces the influence of all high frequencies including the noises and edges This means Row of interestext Intensity Pixel p Possible noise Possible edge 10 50 100 9a 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a b c d e f g h i j k l m n o p h k m Figure 116 Noise and edge information in an intensity diagram of an image The pixels with intensities that are much different from the neighboring pixels can be considered to be edges or noise Image Processing and Analysis with Vision Systems 409 that although a lowpass filter reduces noise it also reduces the clarity of an image by attenuating the edges and softening the image throughout A highpass filter on the other hand increases the apparent effect of higher frequencies by severely attenuating the lowfrequency amplitudes In such cases noise and edges will be left alone but slowly changing areas will disappear from the image The application of different methods for noise reduction and edge detection is discussed further in later sections of this chapter 115 Resolution and Quantization Two measures significantly affect the usefulness of an image and the data contained within it The first one is resolution which is affected by how often a signal is measured and read or sampled Higher number of sam ples at equally spaced periodic times result in higher resolution and therefore more data The resolution of an analog signal is a function of sampling rate The resolution of a digital system is a function of how many pixels are present Fundamentally these two are the same measure reading the light intensity of the image at more pixel locations is in fact the same as sampling more often Figure 117 shows an image sampled at a 480 320 b 240 160 c 120 80 and d 60 40 pixels The clarity of the image is lost when the sampling rate decreases a b c d Figure 117 Effect of different sampling rates on an image at a 480 320 b 240 160 c 120 80 and d 60 40 pixels As the resolution decreases the clarity of the image decreases accordingly Introduction to Robotics 410 The second issue is how accurately the value of the signal at any given point is converted to digital form This is called quantization a function of how many bits are used to represent the digitized magnitude of the sampled signal Depending on the number of bits used for quantization the grayness variations of the image will change The total number of gray level possibilities is 2n where n is the number of bits For a 1bit analogtodigital converter ADC there are only two possibilities on and off black and white or 0 and 1 called a binary image For quantization with an 8bit ADC the maximum number of gray levels is 256 Therefore the image will have 256 different gray levels 0255 Quantization and resolution are completely independent of each other For example a highresolution image may be converted into a binary image where there are only on and off pixels 0 and 1 or dark and light or the same image may be quantized into 8 bits which can yield a spectrum of 256 different shades of gray Figure 118 shows the same image quantized at a 2 levels 1 bit b 4 levels 2 bits c 8 levels 3 bits and d the original 256 levels 8 bits Both the resolution and quantization must be sufficiently high in order to provide adequate information for a specific task A lowresolution image may not be adequate for recognition of parts with high detail but enough for distinguishing between a bolt and a nut Low bitcount quantization may be enough for many applications where binary images are adequate but not in others where different objects must be distin guished from each other For example a highresolution image is necessary for reading the license plate of a car or recognition of faces with a security camera However because the license plate consists of primarily a b c d Figure 118 An image at different quantization levels of 2 4 8 and 256 gray levels As the quantization resolution increases the image becomes smoother Image Processing and Analysis with Vision Systems 411 dark letters on a light background even a binary image only one bit per pixel may be sufficient with good lighting A similar image must be quantized at a higher bitcount in order to allow face recognition When choosing a camera both these values must be considered The sampled light at a pixel when quantized yields a string of 0 and 1 values representing the light at that pixel location The total memory required to store an image is the product of the memory needed for the total number of samples pixels and the memory needed for each digitized sample A larger image with higher resolution total number of pixels and a higher number of gray levels requires a larger memory size The total memory requirement is a function of both values Example 111 Consider an image that is 256 by 256 pixels The total number of pixels in the image is 256 256 65536 If the image is binary it will require 1 bit to record each pixel as 0 or 1 Therefore the total memory needed to record the image is 65 536 bits or with 8 bits to a byte 8192 bytes If each pixel were to be digitized at the rate of 8 bits for 256 shades of gray it would require 65536 8 524288 bits or 65 536 bytes For a color video clip changing at the rate of 30 images per second the memory requirement is 65536 30 1966080 bytes per second per color channel RGB Of course this is only the memory requirement for recording the image pixels and does not include index information and other bookkeeping requirements The actual memory requirement may be lower depending on data compression and the format in which the image is recorded 116 Sampling Theorem Can you tell what the image in Figure 119 represents Of course since this is a very lowresolution 16 16 image it is difficult to guess what the content is This simple illustration signifies the relationship between sampling rate and the information obtained from it To understand this lets first discuss some fundamental issues about sampling Consider a simple sinusoidal signal with frequency f as shown in Figure 1110a Suppose the signal is sampled at the rate of fs The arrows in 1110b show the corresponding sampled amplitudes Now suppose we want to use the sampled data to reconstruct the signal This would be similar to sampling a sound source such as a CD and trying to reconstruct the sound from the sampled data through a speaker One possibility would be that by chance the same signal might be reconstructed However as you can see in Figure 1111 it is very possible that another signal with a different frequency matches the sampled data Figure 119 A lowresolution 16 16 image Introduction to Robotics 412 exactly the same way Both and in fact many others are valid and match the sampled data Therefore it is unclear what the reconstructed signal might be This loss of information is called aliasing of the sampled data and it can be a very serious problem So how do we make sure that the original signal can be reconstructed as closely as possible In order to prevent aliasing according to what is called sampling theorem the sampling frequency ωs must be at least twice as large as the largest frequency present in the signal or at least twice as large as the highest desired frequency of interest ωd In that case we can reconstruct the original signal up to the frequency of interest without aliasing The highest frequency present in the signal can be determined from the frequency spectrum of the signal If a signals frequency spectrum is found using the Fourier transform it theoretically contains infinite frequencies However as we have seen the higher frequencies have smaller amplitudes We can always pick a maximum frequency that may be of interest while assuming that the frequencies with very low amplitudes beyond that point can be ignored without much effect in the signals total representation The sampling rate of the signal must be at least twice as large as this frequency In practice the sampling rate is zero Sampling period a zero Sampling period b Figure 1110 a Sinusoidal signal with a frequency of f b sampled amplitudes at the rate of fs Second signal Original signal Figure 1111 Reconstruction of signals from the sampled data too More than one signal may be reconstructed from the same sampled data Image Processing and Analysis with Vision Systems 413 generally chosen to be larger than this minimum to further ensure that aliasing of the signal will not occur Frequencies four to five times as large as the desired maximum frequency are common For example human ears can theoretically hear frequencies up to about 20000 Hz If a CD player is to reconstruct the digitized sampled music the sampling rate of the CD must be at least twice as large namely 40 000 Hz In practice CD players sample at the rate of about 44100 Hz At lower sampling rates the sound may become distorted In reality if a signal changes more quickly than the sampling rate the details of the change will be missed and therefore the sampled data will be inadequate For example it has been shown that the resulting vibra tion from a rotating gear with a broken tooth is distinctly different from a regular gear Figure 1112 How ever at a low sampling rate the sampled data may be completely void of this important information Similarly in Figure 1113 the sampling rate is lower than the higher frequencies of the signal As shown although the lower frequencies of the signal are reconstructed the signal does not contain the higher fre quencies of the original signal The same is true with sound and image signals If a sound signal is sampled at a low rate the highfrequency information will be lacking and the reconstructed sound will lack high frequency sounds The output of the system even if the best speakers are used will be distorted and different from the real signal For images too if the sampling rate is low resulting in a lowresolution image the sampled data may be lacking in adequate information to reconstruct the image with adequate detail In general the number of pixels needed is such that the size of the pixel is at least half the size of the smallest detail needed in the image Figure 119 is sampled at a very low rate and the information is lost not adequate for the details we need This is why you cannot decipher the image However when the sampling rate is increased there is eventually enough information to recognize the image The stillhigher resolutions or sampling rates will transfer more information and therefore increasingly more detail can be recognized Figure 1114 is the same image as in Figure 119 but at 2 4 and 16 times higher resolutions Now suppose you need to recognize the difference between a bolt and a nut in a vision system in order to direct a robot to pick up the parts Because the infor mation representing a bolt and a nut is very different a lowresolution image still enables you to determine what the part is as shown in Figure 1114de However in order to determine if a part is assembled correctly a highresolution image is needed to extract enough information about the details Amplitude Time Figure 1112 An inappropriate sampling rate may completely miss important data within a signal Time Amplitude Time Amplitude a b Figure 1113 The original signal in a is sampled at a sampling rate that is lower than the higher frequencies of the signal The reconstructed signal in b does not contain the higher frequencies of the original signal Introduction to Robotics 414 117 ImageProcessing Techniques As mentioned earlier imageprocessing techniques are used to enhance improve or otherwise alter an image and to prepare it for image analysis During image processing information is usually not extracted from an image Instead the intention is to remove faults or trivial information or information that may be important but not useful to improve the image As an example suppose an image was obtained while the object was moving and as a result the image is not clear It would be desirable to see if the blurring in the image could be reduced or removed before the information about the object such as its nature shape location orientation and so on could be determined Also consider an image corrupted by reflections due to direct lighting or an image that is noisy because of low light In all these cases it is desirable to improve the image and prepare it before imageanalysis routines are used Similarly consider the image of a section of a city fully detailed with streets cars shadows and so on It may actually be more difficult to extract information from this image than if all unnecessary detail except for edges were removed Image processing is divided into many sections including histogram analysis thresholding masking fil ters edge detection segmentation region growing modeling and many more In the next sections we will study some of these techniques and their applications 118 Histograms of Images A histogram is a representation of the total number of pixels of an image at each gray level Histogram infor mation is used in a number of different processes including thresholding For example histogram informa tion can help in determining a cutoff point for converting the image into binary form It can also be used to a b c d e Figure 1114 The image in Figure 119 presented at higher resolutions of a 32 32 b 64 64 c 256 256 and a bolt and a nut at resolutions of d 32 32 and e 256 256 Image Processing and Analysis with Vision Systems 415 decide if there are any prevalent gray levels in an image For instance consider a systematic source of noise in an image that causes many pixels to have one noisy gray level A histogram can be used to determine the noisy gray level in order to attempt to remove or neutralize the noise The same may be used to separate an object from the background as long as they have distinctly different colors or gray values Figure 1115a shows a lowcontrast image that has all its pixel gray levels clustered between two relatively close values In this image all pixel gray values are 80150 as shown by the histogram in Figure 1115c As a result the image is not very clear and details are not visible Now suppose that we equalize the histogram such that the same 32 gray levels are spread out between 0255 gray levels As a result of this histogram equal ization the image is vastly improved as shown in Figure 1115b with its corresponding histogram in d Notice that the number of pixels at each gray level is the same in both cases but the gray levels are spread out Example 112 Assume the histogram of an image is spread between 100 and 150 out of the maximum grayness level of 255 What is the effect of multiplying the range by 15 or by 2 What is the effect of adding 50 to all gray values Solution The two operations mentioned here are common in formatting images and in many vision systems When all gray values are increased by the same amount the image becomes brighter but the contrast does not change As long as the added value does not increase the grayness level of any pixel beyond the 255 level no information is lost and the original image may be regained by decreasing all pixel values by the same amount If the pixel grayness levels are multiplied by a number as long as the maximum available gray levels are not exceeded the histogram range is extended and contrast is increased In this example since the range is between 100 and 150 equalizing the histogram by 15 increases the range to between 150 and 225 However multiplying the pixel levels by 2 extends the histogram to between 200 and 300 therefore saturating the image beyond 255 and changing its nature Unless the original image is saved dividing the pixel values by 2 yields an image with a histogram between 100 and 127 a c d b 80 of pixels of pixels 150 0 255 Gray level intensity Gray level intensity Figure 1115 Effect of histogram equalization in improving an image Introduction to Robotics 416 Figure 1116a shows an original image that was later altered by an imageformatting routine for increased brightness Figure 1116c and increased contrast Figure 1116e As is evident in the histo grams 1116bd when an image is brightened its histogram distribution simply shifts in this case by 30 points When the contrast of the image is increased in this case by 50 the distribution of pixel gray levels is expanded although the relationship remains the same However unlike the previous example the distribution of gray levels is different because new gray values are introduced Level Count Percentile Mean Std Dev Median Pixels Level 174 5503 Count Percentile 8208 13416 4427 139 786432 a b c d e f Mean Std Dev Median Pixels 13407 2220 136 786432 Mean Std Dev Median Pixels Level 190 7212 Count Percentile 8915 16407 2220 166 786432 Figure 1116 Increasing the contrast in an image expands the histogram to include new gray values Image Processing and Analysis with Vision Systems 417 119 Thresholding Thresholding is the process of dividing an image into different portions or levels by picking a certain gray ness level as a threshold comparing each pixel with the threshold value and assigning the pixel to the dif ferent portions or levels of interest depending on whether the pixels grayness level is below the threshold off zero or not belonging or above the threshold on 1 or belonging Thresholding can be performed either at a single level or with multiple thresholding values where the image is processed by dividing the image into layers each layer with a selected threshold To aid in choosing an appropriate threshold many different techniques have been suggested These techniques range from simple routines for binary images to sophisticated techniques for complicated images Early routines were used for a binary image where the object was bright and the background was completely dark This condition can be achieved in controlled lighting in industrial situations but may not be available in other environments In binary images the pixels are either on or off therefore choosing a threshold is simple and straightforward In other situations the histogram may be a multimodal distribution In this case the valleys are chosen as the threshold value More advanced techniques use statistical information and distribution characteristics of the image pixels to develop a threshold value For example the lowest value between two peaks the midpoint between two peaks the average of two peaks and many other scenarios may be used As the threshold value changes so does the image Figure 1117a shows an original image with 256 gray levels and the result of thresholding at grayness levels of Figure 1117b 40 and Figure 1117c 190 Thresholding is used in many operations such as converting an image into binary form filtering operations masking and edge detection Example 113 Figure 1118a shows the image of a bolt and a washer The histogram shows the con centration of pixels at three different levels emphasizing the bolt the washer and the background Figures 1118bc show how the bolt and the washer can be isolated by selecting threshold levels at 30 and 190 out of 255 Example 114 Figure 1119a shows an image of a cutting board and its histogram Due to the nature of this image there are four peaks in the histogram Figures 1118bd show the effect of thresholding at different levels In fact in this case different types of wood can be identified and separated from each other due to their colors a b c Figure 1117 Thresholding an image a with 256 gray levels at two different values of b 40 and c 190 Introduction to Robotics 418 1110 Spatial Domain Operations Convolution Mask Spatial domain processes access and operate on the individual pixel information As a result the image is directly affected by the operation Many processes used in vision systems are in the spatial domain One of the most popular and most common techniques in this domain is convolution which can be adapted to many different activities such as filters edge finders morphology and many more Many processes in com mercial vision systems and photography software are based on convolution too The following is a discussion of basic principles behind convolution Later we will apply the convolution idea to different purposes Imagine an image composed of pixels each with a particular gray level or color information as symbolically depicted by letters A B C in Figure 1120 as part of a larger image Lets also assume that there is a 3 3 kernel or mask as shown which has values in its cells as indicated by m1 through m9 a b c Figure 1118 An image and its histogram binarized at different threshold levels of 30 and 190 Image Processing and Analysis with Vision Systems 419 a b c d Figure 1119 Images and histograms for Example 114 Introduction to Robotics 420 Applying the mask onto the image involves superimposing convolving the mask first on the upperleft corner of the image and taking the summation of the product of the value of each pixel multiplied by the corresponding mask value and dividing the summation by a normalizing value We get please follow carefully R A m1 B m2 C m3 E m4 F m5 G m6 I m7 J m8 K m9 S 112 where S is the normalizing value This is usually the summation of the values in the mask or S m1 m2 m3 m9 113 If the summation is zero substitute S 1 or choose an alternate number The result R is substituted for the value of the pixel in the center of the block that was superimposed In this case R will replace the pixel value of F R Fnew Usually the substitution takes place into a new file in order to not alter the original file The mask is then moved one pixel to the right and the same is repeated for a new R that will replace G as follows R Gnew B m1 C m2 D m3 F m4 G m5 H m6 J m7 K m8 L m9 S The result is now substituted for G in a new file The mask is then moved over one more pixel and the operation is repeated until all the pixels in the row are changed Then the operation continues in a raster scan fashion with the following rows until the image is completely affected The resulting image will show characteristics that may be slightly or very severely affected by the operation all depending on the m values in the mask The first and last rows and columns are not affected by this operation and therefore are usually ignored Some systems insert zeros for the first and last rows and columns or retain the original values Another alternative is to copy the first and last rows and columns into an additional layer of rows and col umns around the image in order to calculate new values for these pixels A B C D E F G H m1 m2 m3 I J K L m4 m5 m6 M N O P m7 m8 m9 Figure 1120 When a convolution mask kernel is superimposed on an image it can change the image pixel by pixel Each step consists of superimposing the cells in the mask onto the corresponding pixels multiplying the values in the masks cells by the pixel values adding the numbers and normalizing the result The result is substituted for the pixel in the center of the area of interest The mask is moved over pixel by pixel and the operation is repeated until the image is completely processed Image Processing and Analysis with Vision Systems 421 For an image IRC with R rows and C columns of pixels and for a mask Mnn with n rows and columns in the mask as shown in Figure 1121 the value for the pixel Ixynew as the center of a block can be calculated by Ixy new 1 S n i 1 n j 1 Mij I x n 1 2 i y n 1 2 j 114 S n i 1 n j 1 Mij if S 0 S 1or largest number if S 0 115 Note that the normalizing or scaling factor S is arbitrary and is used to prevent saturation of the image The user can always adjust this number to get the best image without saturation Example 115 Consider the pixels of an image with values as shown in Figure 1122 as well as a con volution mask with the given values Calculate the new values for the given pixels Solution We substitute zeros for the first and last columns and rows because they are not affected by this proc ess For the remaining pixels we superimpose the mask on the remaining cells of the image and use Eqs 112 and 113 to calculate new pixel values as shown in Figure 1123a with the result shown in Figure 1123b Superimposing the mask on the image as shown for each remaining element we get 22 5 0 6 0 2 1 3 1 3 1 5 1 4 1 3 0 2 0 5 3 4 23 6 0 2 0 8 1 3 1 5 1 6 1 3 1 2 0 6 0 5 5 32 3 0 3 0 5 1 4 1 3 1 2 1 8 1 6 0 5 0 5 4 4 33 3 0 5 0 6 1 3 1 2 1 6 1 6 1 5 0 9 0 5 4 6 In reality grayness levels are integers and therefore all numbers are rounded to whole numbers I11 I12 I13 I14 I15 I21 I22 I23 I24 I25 M11 M12 M13 I31 I32 I33 I34 I35 M21 M22 M23 I41 I42 I43 I44 I45 M31 M32 M33 Figure 1121 The representation of an image and a mask 5 6 2 8 3 3 5 6 0 0 1 4 3 2 6 1 1 1 8 6 5 9 1 0 0 Figure 1122 An example of a convolution mask Introduction to Robotics 422 Example 116 Apply the 7 7 mask shown to the image in Figure 1124 Solution Applying the mask to the image results in Figure 1125 As you notice in Figure 1125 the oncells in the mask have convolved into the same shape within the image albeit upside down and mirror image when applied to a single onpixel in the image assuming that the summation of the numbers in the mask is 1 it results in the same image intensity This in fact demonstrates the real meaning of the convolution mask Any set of numbers used in the mask will convolve into the image and will affect it accordingly Therefore the choice of numbers in the mask can have a significant effect on the image Also notice that for a 7 7 convolution mask the first and last three rows and columns remain unaffected Note that whenever the result is 1 it replaces the pixel located where the center of the mask is 22 23 32 33 50 60 21 8 31 31 51 6 41 30 20 6 8 6 5 9 0 0 1 1 1 1 1 0 0 5 60 20 81 3 31 51 61 4 31 20 60 8 6 5 9 0 0 1 1 1 1 1 0 0 5 6 2 8 30 30 51 6 41 31 21 6 81 60 50 9 0 0 1 1 1 1 1 0 0 5 6 2 8 3 30 50 61 4 31 21 61 8 61 50 90 0 0 1 1 1 1 1 0 0 and and a 0 0 0 0 0 3 5 0 0 4 5 0 0 0 0 0 b Figure 1123 a Convolving the mask onto the cells of the image b the result of the operation Image Processing and Analysis with Vision Systems 423 1111 Connectivity During the application of many vision routines we need to decide whether neighboring pixels are somehow connected or related to each other This connectivity establishes whether they are of the same properties such as being of the same region or object similar textures or colors and so on To establish this connectivity of neighboring pixels we first have to decide a connectivity path or connectivity rule For example we need to decide whether only pixels on the same column and row are connected or diagonally situated pixels are also accepted as connected There are three fundamental connectivity paths for 2D image processing and analysis 4 or 4 connectivity H6 or V6connectivity and 8connectivity In 3D connectivity between voxels volume cells can range from 6 to 26 Referring to Figure 1126 we define the following 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 1 1 0 0 0 0 0 0 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 1124 The mask and image for Example 116 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 Figure 1125 The result of convolving the mask on the image from Example 116 Introduction to Robotics 424 4connectivity A pixel ps relationship is only considered with respect to the four pixels immediately above below to the left and to the right of the pixel bdeg 4connectivity A pixel ps relationship is only considered with respect to the four pixels diagonally across from it on four sides acfh For pixel pxy these are defined as For 4connectivity x 1 y x1 y x y 1 x y1 116 For 4connectivity x 1 y 1 x 1 y1 x1 y 1 x1 y1 117 H6connectivity A pixel ps relationship is only considered with respect to the six neighboring pixels on two rows immediately above and below the pixel abcfgh V6connectivity A pixel ps relationship is only considered with respect to the six neighboring pixels on two columns immediately to the right and to the left of the pixel adfceh For pixel pxy these are defined as For H6connectivity x1y 1 xy 1 x 1y 1 x1y1 xy1 x 1y1 118 For V6connectivity x1y 1 x1y x1y1 x 1y 1 x 1y x 1y1 119 8connectivity A pixel ps relationship is considered with respect to all eight pixels surrounding it abcdefgh For pixel pxy this is defined as x1y1 xy1 x 1y1 x1y x 1y x1y 1 xy 1 x 1y 1 1110 Example 117 In Figure 1127 starting with pixel 4c find all succeeding pixels that can be consid ered connected to each other based on 4 4 H6 V6 and 8connectivity rules a b c d p e f g h Figure 1126 Neighborhood connectivity of pixels x a b c d e f 2 3 4 5 6 1 Figure 1127 The image for Example 117 Image Processing and Analysis with Vision Systems 425 Solution Figure 1128 shows the results of the connectivity search Please follow each one You must take one pixel find all others connected to it based on the applicable connectivity rule and search the pixels found to be connected to the previous ones for additional connected pixels until done The remain ing pixels are not connected We use the same rules later for other purposes such as region grow ing The H6 V6 and 8connectivity search is left for you to do as an exercise So far we have studied general issues and fundamental techniques used in image processing and analysis Next we discuss particular techniques that are used for specific applications 1112 Noise Reduction Similar to all other information mediums images contain noise Some noise is systematic and comes from dirty lenses faulty electronic components bad memory chips and low resolution Other noises are random and are caused by environmental effects or bad lighting The net effect is a partially corrupted image that needs to be preprocessed to reduce or eliminate the noise In addition some images have low quality due to hardware and software inadequacies and therefore have to be enhanced and improved before other ana lyses can be performed on them For example at the hardware level an onchip correction scheme was devised for defective pixels in an image sensor 1 In this scheme readouts from the nearest neighbors were x x 4 x 4 H 6 x 2 3 4 5 6 1 a b c d e f x V 6 2 3 4 5 6 1 a b c d e f x 8 2 3 4 5 6 1 a b c d e f 2 3 4 5 6 1 a b c d e f 2 3 4 5 6 1 a b c d e f Figure 1128 The results of the connectivity searches for Example 117 Introduction to Robotics 426 substituted for identified defective pixels However in general software schemes are used for most filtering operations Filtering techniques are divided into two categories of frequency domain and spatial domain Frequency related techniques operate on the Fourier transform of the signal whereas spatialdomain techniques operate on the image at the pixel level either locally or globally The following is a summary of a number of different operations for reducing noise in an image 11121 Neighborhood Averaging with Convolution Masks As discussed in Section 1110 a mask may be used for many different purposes including filtering operations and noise reduction In Section 114 it was also discussed that noise along with edges creates higher fre quencies in the spectrum It is possible to create masks that behave like lowpass filters such that the higher frequencies of an image are attenuated while the lower frequencies are not changed much and thereby reduce the noise Neighborhood averaging with a convolution mask can be used to reduce the noise in images but it also reduces the sharpness of an image Consider the 3 3 mask in Figure 1129a with its corresponding values as well as a portion of an imaginary image with its gray levels shown We assume all the pixels but one are at a gray value of 20 The pixel with a gray level of 100 may be con sidered noise since it is different from the pixels around it Applying the mask starting at the corner of the image with a normalizing value of 9 summation of all values in the mask and continuing with the next pixels yields R 20 1 20 1 20 1 20 1 100 1 20 1 20 1 20 1 20 1 9 29 for the pixels shown in Figure 1129b As shown the pixel with a value of 100 causes the surrounding pixel values to all change to 29 Consequently the large difference between the noisy pixel and the sur rounding pixels 100 versus 20 becomes much smaller 29 versus 20 thus reducing the noise while 20 20 20 20 20 20 20 20 20 20 20 20 1 1 1 20 20 100 20 20 20 1 1 1 20 20 20 20 20 20 1 1 1 20 20 20 20 20 20 a 20 20 20 20 20 20 20 29 29 29 20 20 20 29 29 29 20 20 20 29 29 29 20 20 20 20 20 20 20 20 b Figure 1129 Neighborhood averaging mask Image Processing and Analysis with Vision Systems 427 increasing the neighboring pixel values The operation has no effect on the remaining pixels Notice how the noise and the clarity of the images are both reduced With this characteristic this mask acts as a low pass filter because it attenuates the sharp differences between neighboring pixels but has little effect on pixels whose intensities are similar Notice that this routine introduces new gray levels in the image 29 and therefore changes the histogram of the image Figure 1130 shows a an original image b an image corrupted with noise c the image after a 3 3 averaging filter application and d the image after a 5 5 averaging filter application The 5 5 filter is more effective in reducing both the noise and the sharpness There are other averaging filters such as Gaussian also called mild isotropic lowpass shown in Figure 1131 This filter similarly improves the image but with a slightly different result 11122 Image Averaging In this technique a number of images of the exact same scene are averaged together Since the camera has to acquire multiple images of the same scene all actions in the scene must completely stop As a result in addi tion to being time consuming this technique is not suitable for operations that are dynamic and change rap idly Image averaging is more effective at increased numbers of images and is fundamentally useful for random noise If the noise is systematic image averaging has no effect on the image If we assume that a b c d Figure 1130 Neighborhood averaging of an image 1 4 6 4 1 1 2 1 4 16 24 16 4 2 4 2 6 24 36 24 6 1 2 1 4 16 24 16 4 1 4 6 4 1 55 33 Figure 1131 5 5 and 3 3 Gaussian averaging filters Introduction to Robotics 428 an acquired image Axy has random noise Nxy then the desired image Ixy can be found by averaging the images because the summation of random noises approaches zero or A xy I xy N xy n A xy n n I xy N xy n n I xy n n N xy n 0 I xy 1111 Although image averaging reduces random noise unlike neighborhood averaging it does not blur the image or reduce its focus 11123 Frequency Domain When the Fourier transform of an image is calculated the frequency spectrum might show a clear frequency for the noise which in many cases can be selectively eliminated by proper filtering 11124 Median Filters One of the main problems in using neighborhood averaging is that along with removing noise the filter also blurs the edges and reduces sharpness of the image A variation to this technique is to use an n n median filter in which the value of the pixel is replaced by the median of the values of the pixels within the area of the mask around the pixel sorted in ascending order The median of a set of numbers is the value where half of the values in the set are below and half are above the median also called the 50th percentile Since unlike an average the medians final value is independent of the value of any single pixel in the set the median filter will be much stronger in eliminating spikelike noises with less blurring of the image Suppose we apply a 3 3 median filter to pixel number 33 of the image in Figure 1129a The sorted values in ascending order will be 20 20 20 20 20 20 20 20 100 The median is 20 the fifth one from the left Replacing the center pixels value with 20 completely eliminates the noise Of course noise is not always this easily removed But this example shows how the effect of median filters can be very different from averaging Notice that median filters do not create any new gray levels but they do change the histogram of the image Figure 1132 shows a an original image b the image corrupted with random noise c the image improved with a 3 3 median filter and d the image improved with a 7 7 median filter Generally larger size median filters are more effective in reducing noise but make the image less sharp a b c d Figure 1132 a The original image b is the same image corrupted with a random noise c the image improved by a 3 3 median filter and d the same image improved with a 7 7 median filter Image Processing and Analysis with Vision Systems 429 Median filters tend to make the image grainy especially if applied more than once Consider the image in Figure 1133a The values in ascending order for the topleft corner are 1 2 3 4 5 6 7 8 9 The middle value is 5 resulting in the image in Figure 1133b The values for the second set of 9 pixels are 1 2 2 3 4 5 6 7 9 and the median is 4 As you can see the image has become grainy because the pixel sets with similar values appear longer as in 5 and 5 or 4 and 4 Figure 1133c shows the effect of a 3 3 median filter applied once versus Figure 1133d when it is applied three times The image is grainier 1113 Edge Detection Edge detection is a general name for a class of routines and techniques that operate on an image and result in almost a line drawing of the image The lines represent changes in values such as crosssections of planes textures lines and colors differences in light intensities between parts and backgrounds or features such as holes and protrusions as well as differences in shading and textures Some techniques are mathematics oriented some are heuristic and some are descriptive techniques They generally oper ate on the differences between the gray levels of pixels or groups of pixels through masks or thresholds The final result is a line drawing or similar representation that requires much less memory can be pro cessed more easily and saves in computational and storage costs Edge detection is also necessary for some other processes such as segmentation and object recognition Without edge detection it may be impossible to find overlapping parts calculate features such as diameter and area or determine parts by region growing Different techniques of edge detection yield slightly different results and therefore should be chosen carefully and used wisely Except in binary images edges are generally not ideal This means that instead of a clear distinction between two neighboring pixels gray levels the edge is spread over a number of pixels as shown in Figure 1134 A simple comparison between two neighboring pixels may be inadequate for edge detection The first and second derivatives of the graph are also shown It is possible to assume that the edge is at the peaks 2 1 3 2 8 9 4 7 7 5 6 2 2 1 3 2 8 5 4 4 7 5 6 2 a b c d Figure 1133 Application of a median filter Introduction to Robotics 430 of the first derivative or at the zero crossing of the second derivative and to use these values to detect the edges The problem is exacerbated when the image is noisy and therefore the derivatives have excessive numbers of peaks or zero crossings Generally the edges are at regions of rapid intensity change Referring to Figure 1135 the magnitude and direction of the gradient of image intensity can be calculated as I I xI y I magnitude I x 2 I y 2 1112 I direction tan1 Iy Ix 1113 Ideal edge x 255 0 fx Real edge x 255 0 fx x f x Edgemin peak x f x Edgezero crossing Figure 1134 Edge detection with first and second derivatives I y I x Intensity gradient Figure 1135 Gradient of image intensity Image Processing and Analysis with Vision Systems 431 Similarly the second gradient of the intensity called the Laplacian is shown as Eq 1114 The magnitude and orientation of the second gradient can be calculated in a similar fashion 2I 2I x22I y2 1114 Digital Implementation Since images are discrete a finite difference approach is taken to calculate the gradients For a one dimensional system the finite difference between successive elements is f x lim dx 0 f x dx f x dx 1115 In an image dx is one pixel wide Therefore the finite difference for an image can be simplified to F x F x 1 F x and be implemented by kernel 1 1 For a 2D system the same is applied in both x and y directions Referring to Figure 1136 notice that when the finite difference is calculated it does not relate to the center of the pixel of interest rather there are two midpoints between successive pixels to which the gradients apply To remedy this the finite difference can be calculated between the pixels before and after the point of interest and averaged using the modified kernel mask 1 2 1 0 1 yielding dF dx F x 1 F x1 dF dy F y 1 F y1 1116 Similarly the second derivative of the image intensities can be calculated with finite difference as F x 2F x2 F x 1 F x F x 1 F x F x F x1 F x1 2F x F x 1 1117 which can be implemented by a kernel 1 2 1 Therefore the approximate magnitude of the Laplacian for a 2D image can be calculated by applying the following kernel mask x x1 Location of the gradient Figure 1136 Intensity gradient between successive pixels Introduction to Robotics 432 Laplacian 090 0 1 0 1 4 1 0 1 0 Laplacian 45 1 0 1 0 4 0 1 0 1 1118 As we will soon see this is a common way of detecting edges In fact many other common masks used for edge detection are variations of the gradient scheme As discussed earlier like noise edges are high frequency and therefore can be separated by highpass fil ters Masks can be designed to behave like a highpass filter reducing the amplitude of the lower frequencies while not affecting the amplitudes of the higher frequencies as much and thereby separating noises and edges from the rest of the image Consider the image and the Laplacian kernel mask in Figure 1137 As you see this mask has negative numbers Applying the mask to the image at the corner yields R 20 1 20 0 20 1 20 0 100 4 20 0 20 1 20 0 20 1 1 320 The normalizing factor is 1 because we do not divide by zero resulting in the value of 320 replacing the 100 comparatively accentuating the original difference from 100 versus 20 to 320 versus 20 while applying the mask to the set of pixels in columns 3 4 5 yields zero indicating that the difference between pixels is not changed Since this mask accentuates largeintensity variations higher frequencies while ignoring similar intensities lower frequencies it is a highpass filter This also means that the noise and edges of objects in images will be accentuated As a result this mask acts as an edge detector Some highpass filters act as an image sharpener Figure 1138 shows some other highpass filters 20 20 20 20 20 20 100 20 20 20 1 0 1 20 20 20 20 20 0 4 0 20 20 20 20 20 1 0 1 Figure 1137 The Laplacian1 highpass edge detector mask 1 8 1 1 1 6 1 1 5 1 1 1 1 0 1 0 0 1 0 Laplacian2 Sharpen Low Sharpen Medium 1 1 1 0 0 1 0 0 Figure 1138 Other highpass filters Image Processing and Analysis with Vision Systems 433 The three masks 2 3 4 5 6 called the Sobel operator Roberts edge and Prewitt shown in Figure 1139 effectively do the same gradient differentiation with somewhat different results and are very common When applied to an image the two pairs of masks calculate the gradients in the x and y directions which are added and compared to a threshold Notice how these follow the gradient equations developed earlier Figure 1140 shows a an original image and the image with its edges detected by b a Laplacian1 c Laplacian2 d Sobel operator and e Roberts edge You must realize that although in this example the results are as shown the result for other images may be different This is because the histogram of the image and the chosen thresholds have great effects on the final outcome Some routines allow the user to change the thresholding values and some do not In each case the user must decide which routine performs the best a d e b c Figure 1140 a An image and its edges from b Laplacian1 c Laplacian2 d Sobel operator and e Roberts edge 1 0 a Sobel Roberts Prewitt b c 0 1 1 2 1 1 0 1 1 1 1 1 0 1 0 1 1 0 0 0 0 2 0 2 0 0 0 1 0 1 1 2 1 1 0 1 1 1 1 1 0 1 Figure 1139 The Sobel Roberts and Prewitt edge detectors Introduction to Robotics 434 Other methods can be used for binary images that are simple to implement and yield continuous edges In one example 7 a search technique dubbed leftright LR in this book is used to quickly and efficiently detect edges in binary images of single objects that look like a blob Imagine a binary image as shown in Figure 1141 Lets assume that gray pixels are on or the object and white pixels are off background Assume a pointer is moving from one pixel to another in any direction up down right left Any time the pointer reaches an on pixel it turns left Any time it reaches an off pixel it turns right Of course as shown depending on the direction of the pointer left and right might mean different directions Starting at pixel 11 moving to 12 to the end then row 2 and then row 3 the pointer finds the first on pixel at 33 turns left and encounters an off pixel turns right twice then left and goes on The process continues until the first pixel is reached The collection of the pixels on the pointers path is one continuous edge Other edges can be found by continuing the process with a new pixel In this example the edge is pixels 3c 3d 3e 3f 3i 4i 4j 4k Table 111 shows how a simple computer program can be developed to do the search U and V are pixel coordinates Left Right Left Right Left Right Left Right Rows 1 2 3 Columns a b c 4 l j k i f g h e d 5 Figure 1141 Leftright search technique for edge detection 7 Table 111 Possible LR schemes based on the direction of search If VpresentVprevious 0 left Unext Upresent 1 right Unext Upresent 1 if VpresentVprevious 0 right Unext Upresent 1 left Unext Upresent 1 If UpresentUprevious 0 right Vnext Vpresent 1 left Vnext Vpresent 1 If UpresentUprevious 0 right Vnext Vpresent 1 left Vnext Vpresent 1 Image Processing and Analysis with Vision Systems 435 Masks may also be used for the intentional emphasis of some characteristic of the image For example a mask may be designed to emphasize horizontal lines vertical lines or diagonal lines Figure 1142 shows three such masks Figure 1143 shows a an original image along with the effects of b a vertical mask c a hor izontal mask and d a diagonal mask Notice how the lines are emphasized in each one 1114 Sharpening an Image Image sharpening can be accomplished in many different ways The simplest is to apply a mild highpass filter to the image that increases the sharpness of the image by eliminating some of the lower frequencies from the edges However in sharpening operations noise is increased too therefore as the level of sharpening increases so does the noise level Figure 1138 partially repeated here shows two simple sharpening masks Multiple applications of sharpening filters will quickly ruin the image as noise increases and is emphasized during each application 3 6 3 3 3 3 3 3 6 3 6 3 6 6 6 3 6 3 3 6 3 3 3 3 6 3 3 Vertical emphasis mask Horizontal emphasis mask Diagonal emphasis mask Figure 1142 These masks emphasize the vertical horizontal and diagonal lines of an image a b c d Figure 1143 a An original image with effects of b a vertical emphasis mask c a horizontal emphasis mask and d a diagonal emphasis mask 0 1 0 0 0 1 1 1 1 1 1 6 5 0 1 0 0 0 Sharpen Low Sharpen Medium Figure 1138 Repeated Introduction to Robotics 436 Figure 1144 shows a moresophisticated method to sharpen images In this case b a 3 3 mask was applied to the original image to decrease noise followed by c a lowsharpening mask followed by d a Sobel edge detector e The result was added to the original image As you can see the image shows more detail and is somewhat sharpened but there is also more noise present 1115 Hough Transform As you have probably noticed in most edgedetection techniques the resulting edges are not continuous However there are many applications where continuous edges are either necessary or preferred For exam ple as we will see later in region growing edges that define an area or region must be continuous and com plete before a region growing routine can detect and label it Additionally it is desirable to be able to calculate the slope of detected edges in order to either complete a broken line or to detect objects The Hough trans form 8 is a technique used to determine the geometric relationship between different pixels on a line including the slope of the line For example we can determine whether a cluster of points is on a straight line or not This also aids in the further development of an image in preparation for object recognition since it relates individual pixels into recognizable forms The Hough transform is based on transforming the image space xy into either r θ or mc space The normal from the origin to any line will have an angle of θ with respect to the xaxis and a distance of r from the origin The transformation into the r θplane also called the Hough plane showing these values is called the Hough transform Figure 1145a Note that since all the points constituting the line in xyplane have the same r θ values they are all represented by the same point A in the r θplane Therefore all points on a straight line are represented by a single point in the Hough plane a b d e c Figure 1144 a The original image b after an averaging mask was applied to it c the result of sharpening with a lowsharpening mask d Sobel edge e the result of adding the Sobel edge to the original image Image Processing and Analysis with Vision Systems 437 Similarly a line in the xyplane with a slope m and intercept c can be transformed into a Hough plane of mc with x and y as its slope and intercept Figure 1145b Therefore a line in the xyplane with a particular slope and intercept will transform into a point in the Hough plane Since all points on this line have the same m and c they are all represented by the same point in the Hough plane Now consider the line in Figure 1146a described by its slope m and intercept c as y mx c 1119 Equation 1119 can also be written in terms of m and c as variables as c xm y 1120 where in the mcplane the x and y are the slope and the intercept As discussed earlier the line of Eq 1119 with m and c converts to a single point A in the mcplane Whether the line is drawn with this equation or in polar coordinates with r θ the result is the same Thus a line and all the points on it are represented by a point in the Hough plane The opposite is also true As shown in Figure 1147 an infinite number of lines may go through a point in the xyplane all intersecting at the same location Although these lines have different slopes m and intercepts c x θ θ y r Hough plane r A a b x y m Hough plane c m c A Figure 1145 The Hough transformation from the xyplane into the r θplane or mcplane a b m c m1 c1 A Line 1 Line 2 Line 3 x y x1 x2 y1 y2 m c B C D Figure 1146 Hough transform Introduction to Robotics 438 they all share the same point xy which become the slope and intercept in the Hough plane Therefore the same x and y values represent all these lines and consequently a point in the xyplane is represented by a line in the Hough plane The Hough transform converts the pixels edges within an image into lines in the Hough plane If a group of points are colinear their Hough transforms will all intersect at one point By checking this it can be deter mined whether a cluster of pixels is on a straight line or not Hough transforms can also be used in deter mining the angle or orientation of a line This application has found use in determining the orientation of an object in a plane by calculating the orientation of a particular line in the object Since the intercept and slope of the line are now known a broken line can easily be completed by additional points Example 118 The x and y coordinates of five points are given as 154 0634 152 23 and 31 Using the Hough transform determine which points are on the same line Find the slope and intercept of the line Solution Of course any two points form a line So we will look for at least three points that will be on the same line Clearly looking at the graph of the points it is a trivial matter to answer the questions However in com puter vision since the computer does not have the intelligence to understand an image it must be cal culated Imagine having thousands of points in a computer file representing an image It is impossible whether for a computer or a human to tell which points are on the same line and which ones are not We will perform a Hough transform to determine which points fall on the same line Table 112 summarizes the lines formed in the mcplane that correspond to the points in the xyplane Figure 1148 shows the five corresponding lines drawn in the mcplane As you see four lines inter sect at the same location while line 4 does not indicating that all points except 23 are on the same line The slope and intercept of the line are 067 and 3 respectively Of course any two points are on a line as well consequently line 4 intersects with all other lines This shows how the Hough transform x x y Line 1 Line 2 Line 3 y A x y m c Figure 1147 Transformation of a point in the xyplane into a line in the Hough plane Table 112 Lines formed in the mcplane corresponding to the points in the xyplane y x xy mc 1 4 15 4 m15 c c 15 m 4 2 34 06 34 m06 c c 06 m 34 3 2 15 3 m2 c c 2 m 3 4 3 2 2 m15 c c 15 m 2 5 1 3 1 m3 c c 3 m 1 Image Processing and Analysis with Vision Systems 439 can be cluttered with an exceeding number of intersecting lines Determining which lines are intersect ing is the main issue in Hough transform analysis The equation representing the line is y 0 67x 3 Using this equation additional points lying on the line can be assigned to the group therefore completing broken lines Coincidentally the same analogy may be made for circles and points instead of lines and points All points on a circle will correspond to intersecting circles in the Hough plane and vice versa For more information refer to 3 The Hough transform has many desirable features For example since each point in the image is treated independently all points can be processed simultaneously with parallel processing methods This makes the Hough transform a suitable candidate for realtime processing It is also insensitive to random noise since individual points do not greatly contribute to the final count of the part itself However the Hough transform is computationally intensive To reduce the number of calculations needed to determine whether lines are actually intersecting with each other at the same point we may use a circle within which if the lines approx imately intersect with each other they are assumed to be intersecting Many variations to the Hough trans form have been devised to increase its efficiency and utility for different tasks including object recognition 9 1116 Segmentation Segmentation is a generic name for a number of different techniques that divide the image into segments or constituents The purpose is to separate the information contained in the image into smaller entities that can be used for other purposes For example an image can be segmented by the edges in the scene or by division into small areas blobs and so on Each of these entities can subsequently be used for further processing representation or identification Segmentation includes but is not limited to edge detection region growing and texture analysis The early segmentation routines were all based on edge detection of simple geographic models such as polyhedrons In 3D analysis of objects models such as cylinders cones spheres and cubes were used as well Although these shapes and figures did not necessarily match any real objects they provided a means for early developmental work that evolved into more sophisticated routines and techniques They also 1 2 3 4 5 m c 4 lines intersect here Figure 1148 Hough transform for Example 118 Introduction to Robotics 440 provided a means to develop schemes that could process complicated shapes and recognize objects As an example the routines could model a tree as a cone or sphere mounted on a cylinder Figure 1149 and could match it with a model of a tree requiring very little processing power the tree could be expressed with only a few pieces of information such as the diameters of the cone and cylinder and their heights while representing all the information pertaining to a tree could be enormous in comparison Similarly a house could be represented with a few pieces of information regarding width length and height of cubes or prisms Imagine the information needed by an autonomous vehicle or a drone to avoid a tree or a house Does it need to know all the details or just enough to avoid it Figure 1150 shows an image captured by a LiDAR A similar approach can be taken to segment the information into areas or objects and even rep resent them with similar known objects 1117 Segmentation by Region Growing and Region Splitting In addition to edgedetection routines region growing and image splitting are other common techniques of segmentation Through these techniques an attempt is made to separate the different parts of an image into segments or components with similar characteristics that can be used in further analysis such as in object detection Edges found by an edge detector are lines of textures colors planes and gray levels and therefore may or may not be continuous However segmentation by regions naturally results in complete and closed boundaries For a survey of other segmentation techniques see 10 Two approaches are used for region segmentation One is to grow regions by similar attributes such as a range of gray levels or other similarities The other is region splitting which will split images into smaller areas using their finer differences Figure 1149 Representation of objects such as a tree or a house with models such as cones spheres cylinders cubes and prisms can reduce processing requirements Figure 1150 An image captured by a LiDAR Source Reproduced with permission from Velodyne LiDAR Company The original image is in color Image Processing and Analysis with Vision Systems 441 One technique of region splitting is thresholding The image is split into closed areas of neighboring pixels by comparing them to a thresholding value or range Any pixel that falls below a threshold or between a range of values will belong to a region and otherwise to another This splits the image into a series of regions or clusters of pixels that have common or similar attributes Generally although this is a very simple tech nique it is not very effective since choosing an appropriate threshold is difficult The results are also highly dependent on the threshold value and change accordingly when the thresholds change Still it is a useful technique under certain conditions such as silhouettes and for images with relatively uniform regions In region growing first nuclei pixels or regions are formed based on some specific selection law Regions nuclei are the clusters of pixels that are formed at the beginning of segmentation They are usually small and act as a nucleus for subsequent growing and merging as in alloys The result is a large number of little regions Successively these regions are combined into larger regions based on some other attributes or rules Although these rules can merge many smaller regions to create a smoother set of regions they may unnec essarily combine certain features that should not be merged such as holes smaller but distinct areas or dif ferent distinct areas with similar intensities The following is a simple search technique for growing regions for a binary image or with the application of thresholding for gray images as well that uses a bookkeeping approach to find all pixels that belong to the same region 11 Figure 1151 shows a binary image Each pixel is referred to by a pair of index numbers Assume a pointer starts at the top and searches for a nucleus to start a region As soon as a nucleus is found which does not already belong to another region the program assigns a region number to it All pixels con nected to it receive the same region number and are placed in a stack The search continues with all the pixels in the stack until the stack is emptied The pointer will then continue searching for a new nucleus and a new region number 1 2 3 4 4connectivity Search Next 2d 3d Regionn Regionn Search Next 2d 3d 3c 3e 4d Regionn Regionn Search Next 2d 3d 3c 3e 4d 3b Regionn Regionn Stack Stack Stack Round 1 Round 2 Round 3 Continue until stack is empty Rows Columns a b c d e f g h 1 2 3 4 5 6 7 8 9 Figure 1151 Region growing based on a search technique With a 4connectivity search regionn is as shown Introduction to Robotics 442 It is important to decide what form of connectivity is to be used in growing regions as this will change the final outcome As discussed in Section 1111 4 4 H6 V6 and 8connectivity can be used for region growing In Figure 1151 the first nucleus is found at pixel 2d Suppose we have chosen 4connectivity The program will check the four corresponding pixels around the nucleus to determine connectivity If there is an on pixel its location index numbers are placed in a stack the cell is given the region number n and the pointer is moved down in the stack to the next cell 3d At this location the connectivity of pixels around the cell is checked again the on pixel index numbers are placed in the search stack the cell is given the regionn designation and the process is repeated for the next index number on the stack 3c The process continues until the stack is empty Notice that this is nothing more than a bookkeeping technique to make sure the computer program can find all connected pixels in the region without missing any Example 119 Using 4connectivity the first region that results from a search in Figure 1151 is shown in Figure 1152 There are many other segmentation schemes that apply to different situations For example in one tech nique the following is done 1 Assign the image to k clusters 2 Calculate the mean of each cluster 3 If the mean of a token area or pixel is closer to its clusters mean keep it 4 If the mean of a token area or pixel is closer to another clusters mean reassign it to the other cluster 5 Continue until no changes are made Once again as you notice a bookkeeping and comparison routine is applied to the image in order to segment it based on a desired characteristic in this case the mean of each area Other schemes can be found in other references 2 12 13 14 Figure 1152 The result of a search for 4connectivity for Example 119 Image Processing and Analysis with Vision Systems 443 1118 Binary Morphology Operations Morphology operations refer to a family of operations performed on the shape therefore morphology of subjects in an image They include many different operations both for binary and gray images such as thick ening dilation erosion skeletonization opening closing and filling These operations are performed on an image in order to aid in image analysis as well as for reducing the extra information that may be present in the image For example consider the binary image in Figure 1153a and the stick figure representing one of the bolts in Figure 1153b As we will see later a moment equation may be used to calculate the orientation of the bolts However the same moment calculation can also be performed on the stick figure of the bolt but with much less effort As a result it would be desirable to convert the bolt to its stick figure or skeleton In the following sections we discuss a few of these operations Morphology operations are based on set theory For example in Figure 1154 the union between the two lines creates the parallelogram apply the first line to the second line while the union between the two smal ler circles is the larger circle In this case the radius of the first circle is added to the second one enlarging it This is called dilation shown with the symbol and as we will soon discuss it can be as little as one pixel added to the perimeter of a part in an image Similarly in Figure 1155 subtracting the second set from the first results in an eroded shape therefore erosion shown with the symbol which as will be discussed later may be as small as one pixel around the object Similar combinations of dilation and erosion create other effects as follows a b Figure 1153 The binary image of a bolt and its stick skeleton representation Figure 1154 The union between two geometries creates dilation Introduction to Robotics 444 Example 1110 Figure 1156 shows the effect of a union operation between two shapes As shown this union reduces the appearance of the peaks and valleys in the original shape This is used for smoothing the jagged edges of shapes such as a bolt or gear Example 1111 Figure 1157 shows the image of a plate with a small protrusion in it In order to locate the protrusion we may subtract erode a circle from the plate with a diameter slightly larger than the protrusion add the circle to the result and subtract the result from the original image The remaining object is only the protrusion Figure 1155 The subtraction of two geometries creates erosion Figure 1156 The result of the union of the two shapes reduces the appearance of the peaks and valley Protrusion Figure 1157 The application of union and subtraction operations for locating the protrusion Image Processing and Analysis with Vision Systems 445 The following are all based on the previously mentioned operations 11181 Thickening Operation A thickening operation fills the small holes and cracks on the boundary of an object and can be used to smooth the boundary In the example shown in Figure 1158 the thickening operation reduced the appear ance of the threads of the bolts This is a very useful operation when we try to apply other operations such as skeletonization to the object The initial thickening prevents the creation of whiskers caused by the threads as we will see later Figure 1158 shows the effect of three rounds of thickening operations on the threads of the bolts 11182 Dilation In dilation the background pixels that are 8connected to the foreground object are changed to foreground As a result effectively a layer is added to the object every time the process is implemented Due to the fact that dilation is performed on pixels that are 8connected to the object repeated dilations can change the shape of the object Figure 1159b is the result of five dilation operations on the objects in Figure 1159a As you see due to this dilation the four objects have bled into one piece With additional applications of dilation the four objects as well as the disappearing hole can become one solid piece which can no longer be recognized Figure 1158 The threads of the bolts are removed by a triple application of a thickening operation resulting in smooth edges a b Figure 1159 Effect of dilation operations Here the objects in a were subjected to five rounds of dilation b Introduction to Robotics 446 11183 Erosion In this operation foreground pixels that are 8connected to a background pixel are eliminated This effec tively eats away a layer of the foreground the object each time it is performed Figure 1160b shows the effect of three repetitions of the erosion operation on the binary image in Figure 1160a Since erosion removes one pixel from around the object the object becomes increasingly thinner with each pass However erosion dis regards all other requirements of shape representation It removes one pixel from the perimeter and holes of the object even if the shape of the object is eventually lost as in Figure 1160c with seven repetitions where one bolt is completely lost and the nut will soon disappear Erosion can eventually remove all objects This means that if the reverse operation of dilation is used adding one pixel to the perimeter of the object with each pass the dilated object may not resemble the original object at all In fact if the object is totally eroded to one pixel dilation will result in a square or circle As a result erosion can irreparably damage the image However it can also be successfully used to eliminate unwanted objects in an image For example if we want to identify the largest object in an image successive erosions eliminate all other smaller objects before the largest object is eliminated Therefore the object of interest can be identified 11184 Skeletonization A skeleton is a stick representative of an object where all thicknesses have been reduced to one pixel at any location Skeletonization is a variation of erosion Whereas in erosion the thickness may go to zero and the object may be totally lost in skeletonization as soon as the thickness of the object becomes one pixel the operation at that location stops Although in erosion the number of repetitions are chosen by the user in skeletonization the process automatically continues until all thicknesses are 1 pixel the program stops when no new changes are made as a result of the operation The final result of skeletonization is a stick figure skeleton of the object which is a good representation of the object sometimes much better than the edges Figure 1161b shows the skeleton of the original objects in Figure 1161a The whiskers are created because the objects were not smoothed by thickening As a result all threads are reduced to one pixel creating the whiskers Figure 1162 shows the same objects that are thickened to eliminate the threads resulting in a clean skeleton Figure 1162c is the result of dilating the skeleton seven times As can be seen the dilated objects are not the same as the original objects Notice how the smaller screw appears as big as the bigger bolts Although dilation of a skeleton will also result in a shape different from the original object skeletons are very useful in object recognition since they are generally a better representation of an object than others The stick representation of an object can be compared to the available a priori knowledge of the object for matching a b c Figure 1160 Effect of erosion operation on objects in a with b 3 and c 7 repetitions Image Processing and Analysis with Vision Systems 447 11185 Open Operation Opening is an erosion operation followed by dilation This causes a limited smoothing of convex parts of the object and can be used as an intermediate operation before skeletonization 11186 Close Operation Closing is a dilation operation followed by erosion This causes a limited smoothing of concave parts of the object and like opening can be used as an intermediate operation before skeletonization 11187 Fill Operation Filling fills the holes in the foreground object In Figure 1163 the hole in the nut is filled with foreground pixels until it is eliminated For information on other operations refer to vision systems manufacturers references Different compa nies include other operations to make their software unique These operations can be used as available a b Figure 1161 The effect of skeletonization on an image without thickening The threads of the bolts have resulted in whiskers a b c Figure 1162 The skeleton of the objects in a after b the application of thickening operation results in a clean skeleton c The dilated image of the skeletons Introduction to Robotics 448 1119 Gray Morphology Operations Gray morphology operations are similar to binary morphology operations except that they operate on a gray image Usually a 3 3 mask is used to apply the operations where each cell in the mask may be either 0 or 1 Imagine a gray image is a multilayer 3D image where the light areas are peaks and the dark areas are valleys The mask will be applied to the image by moving it from pixel to pixel Where the mask matches the gray values in the image there are no changes made If the gray values of the pixels do not match the mask they will be changed according to the selected operation as described in the following sections 11191 Erosion In this case each pixel will be replaced by the value of the darkest pixel in its 3 3 neighborhood known as a min operator effectively eroding the object Of course the result is dependent on which cells in the mask are 0 or 1 It removes light bridges between dark objects 11192 Dilation In this case each pixel will be replaced by the value of the lightest pixel in its 3 3 neighborhood known as a max operator effectively dilating the object Of course the result is dependent on which cells in the mask are 0 or 1 It removes dark bridges between light objects 1120 Image Analysis Image analysis is a collection of operations and techniques used to extract information from images This includes object recognition feature extraction analysis of position size orientation and other properties of objects and extraction of depth information Some techniques may be used for multiple purposes as we will see later For example moment equations may be used for object recognition as well as calculation of position and orientation of objects Generally it is assumed that imageprocessing routines have already been applied to the image or that they are available for further use when needed to improve and prepare the image for analysis Imageanalysis rou tines and techniques may be used on both binary and gray images In the following sections some of these techniques are discussed Figure 1163 As a result of a fill operation the hole in the nut is filled with foreground pixels thus eliminating the hole Image Processing and Analysis with Vision Systems 449 1121 Object Recognition by Features Objects in an image may be recognized by their features These features may include but are not limited to gray level histograms morphological features such as area perimeter number of holes and others eccentricity chord length and moments In many cases the information extracted is compared to a priori information about the object which may be in a lookup table For example suppose two objects are present in the image one with two holes and one with one hole Using previously discussed routines it is possible to determine how many holes each part has and by comparing the two parts lets say they are assigned regions 1 and 2 to a lookup table it is possible to determine what each of the two parts are In another example assume a moment analysis is performed for a known object and the moment relative to an axis is calculated at many angles and the data is stored in a lookup table Later when the moment of the part in the image is calculated relative to the same axis and is compared to the lookup table the angle of the part in the image can be estimated The following is a discussion of a few techniques and different features that may be used for object recognition 11211 Basic Features Used for Object Identification The following morphological features may be used for object recognition and identification Gray levels Average maximum or minimum gray levels may be used to identify different parts or objects in an image As an example assume there are three parts in an image each one with a different color or texture The colors and textures will create different gray levels in the image If the average maximum or minimum gray levels of the objects are found eg through histograms mapping the objects can be recognized by comparison of this information In other cases even the presence of one particular gray level may be enough to recognize a part See Example 113 on how the histogram is used to identify a bolt and a nut at different grey levels Perimeter area diameter number of holes and other similar morphological characteristics These characteristics may be used for object identification The perimeter of an object may be found by first applying an edgedetection routine and subsequently by counting the number of pixels on the perimeter The LR search technique from Section 1113 can also be used to calculate the perim eter by counting the pixels that are on the path in an accumulator Area can be calculated by region growing techniques Moment equations can also be used as will be discussed later Diameter for noncircular objects is the maximum distance between any two points on any line that crosses the identified area of the object Aspect ratio Aspect ratio is the widthtolength ratio of an enclosing rectangle about the object as shown in Figure 1164 All aspect ratios are sensitive to orientation except the minimum aspect ratio Therefore the minimum aspect ratio is usually used to identify objects a b w L w L Figure 1164 a Aspect ratio of an object b minimum aspect ratio Introduction to Robotics 450 Thinness Thinness is defined as one of the two following ratios 1 Thinness perimeter 2 area 1121 2 Thinness diameter area 1122 Moments Due to their importance moments are discussed in the next section 11212 Moments The moment of an object within an image is defined as Mab xy xaybIxy 1123 where Mab is the moment of the object with a and b indices x and y are the coordinates of each pixel raised to the power of a and b and Ixy is the intensity of the pixel as in Figure 1165 If the image is binary the inten sities are either 1 or on for the object and 0 off for the background therefore only the pixels that are turned on are considered In gray images the intensities may vary greatly and consequently the value of the moment may be exceedingly influenced by gray values As a result although it is mathematically possible to apply moment equations to a gray image it is not practical or useful unless other additional rules are applied For binary images Ixy is either 0 or 1 therefore considering only the onpixels in the image Eq 1123 simplifies to Mab xy xayb 1124 a b c d e f g h 1 2 3 4 5 6 7 8 9 x y y1 x1 Figure 1165 Calculation of the moment of an image For each pixel that belongs to the object the coordinates of the pixel are raised to the powers indicated by the moments indices The summation of the values is the particular moment of the image Image Processing and Analysis with Vision Systems 451 To calculate the moments first determine whether or not each pixel belongs to the object is turned on if so raise the coordinates of the location of the pixel to the given values of a and b The summation of this operation over the entire image is the particular moment of the object with a and b indices M00 is the moment of the object with a 0 and b 0 This means the x and y coordinate values of all on pixels are raised to a power of 0 M02 means all x values are raised to the power of 0 and all y values are raised to the power of 2 and so on All combinations of values between 0 and 2 are common A value of 3 may be used in special cases Distances x and y are measured either from fictitious reference axes located at the edge of the image xy or are measured from reference axes formed by the first row and column of the image Since the distances are measured by counting the number of pixels the use of the first row and column as the reference axes is more logical However note that in this case all distances should be measured to the centerline of the pixel row or column As an example the first onpixel on the second row is pixel 2d The x distance of the pixel from the x1y1 coordinate frame is 3 whereas the same coordinate from the xy coordinate is 4 or more accurately 35 pixels As long as the same distances are used consistently the choice is not important Based on this since all numbers raised to the power of 0 are equal to 1 all x0 s and y0 s are equal to 1 Therefore the M00 moment is the summation of all onpixels which is the area of the object This moment can be used to determine the nature of an object and to distinguish it from others that have a different area Obviously the M00 moment can also be used to calculate the area of an object within an image Similarly M01 is x0y1 for all onpixels or the summation of 1 y values which is the summation of the ycoordinates of all onpixels from the xaxis This is similar to the first moment of the area relative to the x axis Therefore the location of the center of the area relative to the xaxis can be calculated by y y area M01 M00 1125 So by simply dividing the two moments you may calculate the y coordinate of the center of the area of the object Similarly the location of the center of the area relative to the yaxis is x x area M10 M00 1126 This way the geometric center of an object may be located within an image regardless of its orientation the orientation will not change the location of the center of an area Of course this information can be used to locate an object say for grabbing by a robot M02 is x0y2 and represents the second moment of the area relative to the xaxis Similarly M20 is the second moment of the area relative to the yaxis As you can imagine the moment of inertia of an object such as the one in Figure 1165 varies significantly as the object rotates about its center Suppose we calculate the moments of the area about an axis say the xaxis at different orientations Since each orientation creates a unique value a lookup table that contains these values can later be used to identify the orientation of the object Of course if the object translates within an image its moments of inertia also change rendering it impossible to determine the orientation except in known locations However with a simple application of the parallel axes theorem the second moments about axes at the center of the area can be calculated Since this measure is independent of the location it can be used to determine the orientation of the object regardless of its location To calculate the second moments of the area of the object relative to axes through the centroid of the object Ixx and Iyy knowing the second moments relative to the reference axes Ixx and Iyy we can write Ixx IxxA y 2 and Iyy IyyA x 2 1127 Introduction to Robotics 452 Substituting Eqs 1125 and 1126 into Eq 1127 we get M02 M02M00 M01 M00 2 1128 and M20 M20M00 M10 M00 2 1129 Using the moment equations as described allows us to identify an object its location and its orientation In addition to identification of the part the information can also be used in conjunction with a robot controller to direct the robot to pick up the part andor operate on it Other moments can also be used similarly For example M11 represents the product of inertia of the area and can also be used for object identification Higherorder moments such as M03 M30 M12 and so on can also be used to identify objects and their orientation Imagine two objects relatively similar in shape as in Figure 1166a It is possible that the second moments areas perimeters or other morphological character istics of the two objects may be similar or close to each other such that they may not be useful in object iden tification In this case a small difference between the two objects may be exaggerated through higherorder moments making object identification possible The same is true for an object with a small asymmetry Figure 1166b The orientation of the object may be found by higherorder moments A moment invariant is a measure of an object based on its different moments and is independent of its location orientation and scale factor Therefore the moment invariants may be used for object recognition and parts identification without regard to camera setup location or orientation There are seven different moment invariants such as MI1 M00M20 M2 10 M00M02 M2 01 M3 00 1130 See 2 for the other six moment invariants Example 1112 For the simple object in a lowresolution image in Figure 1167 calculate the area center of the area and second moments of area of the object relative to the x1 y1axes a b Figure 1166 Small differences between objects or small asymmetry in an object may be detected using higherorder moments Image Processing and Analysis with Vision Systems 453 Solution Measuring the distances of each onpixel from the x1 y1axes and substituting the measurements into the moment equations will yield the following results M00 x0y0 12 1 12 M10 x1y0 x 2 1 1 2 3 3 3 4 1 5 2 6 42 M01 x0y1 y 1 1 5 2 5 3 1 4 30 x M10 M00 42 12 3 5 and y M01 M00 30 12 2 5 M20 x2y0 x 2 2 1 2 1 2 2 3 3 2 3 4 2 1 5 2 2 6 2 178 M02 x0y2 y2 1 1 2 5 2 2 5 3 2 1 4 2 82 The same procedure may be used for an image with much higher resolution There will just be many more pixels to deal with A computer program can handle as many pixels as necessary without difficulty Example 1113 In a certain application a vision system looks at an 8 8 binary image of rectangles and squares The squares are either 3 3pixel solids or 4 4 hollow while the rectangles are 3 4 solids Through guides jigs and brackets we can be certain the objects are always parallel to the ref erence axes as shown in Figure 1168 and that the lowerleft corners of the objects are always at pixel 1a We want to only use the moment equations to distinguish the parts from each other Find one set of lowest values a and b in the moment equation that would be able to do so with corresponding values for each part For this example use the absolute coordinates of each pixel for distances from the cor responding axes 1 a b c d e f g h 2 3 4 5 6 7 8 9 x y y1 x1 Figure 1167 Image used for Example 1112 Introduction to Robotics 454 Solution Using the moment equations we calculate the different moments for all four until we find one set that are all unique for each object Square with hole Solid square Wide rectangle Tall rectangle M00 12 M00 9 M00 12 M00 12 M01 30 M01 18 M01 24 M01 30 M10 30 M10 18 M10 30 M10 24 M11 75 M11 36 M11 60 M11 60 M02 94 M02 42 M02 56 M02 90 As shown the lowest set of moment indices that yields a unique solution for each object is M02 Of course M20 would result in similar numbers x y x y x y x y a b c d e f g h a b c d e f g h a b c d e f g h a b c d e f g h Square with hole 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 1 2 3 4 5 6 7 8 Solid square Wide rectangle Tall rectangle Figure 1168 Image used for Example 1113 Figure 1169 Image used for Example 1114 Image Processing and Analysis with Vision Systems 455 Example 1114 For the image of the screw in Figure 1169 calculate the area xy M02M20M11M20 M02 and the moment invariant Solution A computer program was used to calculate the moments In this program distances used for moments are all in terms of the number of pixels and not in units of length The values were calculated for five separate caseshorizontal30 45 60 and vertical Small variations in the results are due to rotation operations Every time a part of an image is rotated since every point in the image must be converted with a sine or cosine function it changes slightly Otherwise as you can see the results are consistent For example as the part is rotated in place the location of its center of area does not change You also can see that the moment invariant is constant and from the moment of inertia information about the centroid the orientation can be estimated This information can now be used to identify the object or to direct a robot controller to send the robot arm at the proper orientation to the location to pick up the part Horizontal 30 45 60 Vertical Area 3713 3747 3772 3724 3713 xbar 127 123 121 118 113 ybar 102 105 106 106 104 M02 388 E6 436 E6 464 E6 476 E6 478 E6 M20 676 E6 626 E6 59 E6 539 E6 478 E6 M11 481 E6 518 E6 52 E6 4975 E6 4375 E6 Moment invariant 748 75 74 73 748 M20 75 E6 57 E6 394 E6 207 E6 0264 E6 M02 0264 E6 209 E6 377 E6 57 E6 75 E6 11213 Template Matching Another technique for object recognition is model or template matching If a suitable line drawing of the scene is found the topological or structural elements such as total number of lines sides vertices and inter connections can be matched to a model Coordinate transformations such as rotation translation and scal ing can be performed to eliminate the differences between the model and the object resulted from position orientation or depth differences between them This technique is limited by the fact that a priori knowledge of the object models is needed for matching Therefore if the object is different from the models they will not match and the object will not be recognized Another major limitation is that if one object is occluded by other objects it will not match a model 11214 Discrete Fourier Descriptors Similar to a Fourier transform calculated for an analog signal a discrete Fourier transform DFT of a set of discrete points such as pixels can also be calculated This means that if the contour of an object within an image is found such as in edge detection the discrete pixels of the contour can also be used for DFT cal culations The result of DFT calculation is a set of frequencies and amplitudes in frequency domain that describe the spatial relationship of the points in question 14 To calculate the DFT of a set of points in a plane assume the plane is a realimaginary plane such that each point is described by an x iy relationship If the contour is completely traced around starting from any pixel Introduction to Robotics 456 and the locations of the points are measured the information can be used to calculate the corresponding frequency spectrum of the set Matching these frequencies with the frequencies found for possible objects in a lookup table may be used to determine the nature of the object In one unpublished experiment match ing eight frequencies yielded enough information about the nature of the object an airplane Matching 16 frequencies could determine the type of an airplane from a large class of planes An advantage of this technique is that the Fourier transform can very simply be normalized for size position and orientation A disadvantage of the technique is that it requires a complete contour of the object Of course other tech niques such as the Hough transform can be used to complete broken contours of the object 11215 Computed Tomography CT Tomography is a technique of determining the distribution of material density in the examined part In com puted tomography CT a 3D image of the objects density distribution is reconstructed from a large number of 2D images of the density taken by different scanning techniques such as Xrays or ultrasonics In CT it is assumed that the part consists of a sequence of overlaying slices Images of density distribution of each slice are taken repeatedly around the object Although partial coverage of the part has been used as well a com plete coverage of 360 is preferred The data is stored in a computer and subsequently is reduced to a 3D image of the parts density distribution that is shown on a monitor Although this technique is completely different from the other techniques discussed earlier it is a viable technique for object recognition In many situations either alone or in conjunction with other techniques CT may be the only way to recognize an object or to differentiate it from other similar objects Specifically in medical situations CT scans can be used in conjunction with medical robots where the 3D mapping of the internal organs of the human body may be used to direct the robot for surgical operations In general the images formed by this technique can still be processed like any other image Therefore the same routines and procedures are viable Similarly as shown earlier in Figure 1150 LiDAR can also be used to form images which can also be pro cessed and analyzed like other images 1122 Depth Measurement with Vision Systems Extracting depth information from a scene is performed using two basic techniques One is the use of range finders in conjunction with a vision system and imageprocessing techniques In this combination the scene is analyzed in relation to the information gathered by range finders about the distances of different portions of an environment or the location of particular objects or sections of the object Second is the use of binocular or stereo vision similar to humans and animals In this technique either simultaneous images from multiple cameras or multiple images from one camera that moves on a track are used to extract depth information As long as the scene does not change during this operation the results will be the same as the use of multiple cameras Since the location of the multiple usually two cameras in relation to any particular point in the scene is slightly different each camera develops a slightly different image By analyzing and measuring the differences between the two scenes depth information can be extracted 11221 Scene Analysis vs Mapping Scene analysis refers to the analysis of images developed by a camera or other similar devices in which a complete scene is analyzed In other words the image is a complete replica of the scene within the reso lution limit of the device where all the details of the scene are included in the image In this case more processing is generally required to extract information from the image but more information can be extracted For instance in order to identify an object within a scene the image may have to be filtered and enhanced segmented by edge detection or thresholding the part isolated by region growing and then Image Processing and Analysis with Vision Systems 457 identified by extracting its features and comparing them to a template or lookup table On the other hand mapping refers to drawing the surface topology of a scene or object where the image consists of a set of discrete distance measurements usually at low resolutions The final image is a collection of lines that relate to the relative position of points on the object at discrete locations see Figure 1150 Since the image is already sliced less processing is required in analysis of mapped images but less information can be extracted from the scene Each technique has its own merits benefits and limitations and is used for dif ferent purposes including navigation 11222 Range Detection and Depth Analysis Range measurement and depth analysis are performed using many different techniques such as active ran ging 20 stereo imaging scene analysis and specialized lighting Humans use a combination of techniques to extract information about the depth and positional relationship between different elements of an image Even in a 2D image humans can extract useful information using details such as the changing size of similar ele ments and vanishing lines perspective shadows and changing intensity of textures and shades Since many artificial intelligence techniques are based on and are studied for understanding of the way humans do things a number of depthmeasurement techniques are designed after similar human operations 15 11223 Stereo Imaging An image is the projection of a scene into the image plane through an ideal lens Therefore every point in the image corresponds to a certain point in the scene However the depth information of the point is lost in this projection and cannot simply be retrieved from a single image When two images of the same scene are taken the relative depth of different points from the image plane can be extracted by comparing the two images the differences represent the spatial relationship between different points 16 17 Humans do the same auto matically by combining the two images and forming a 3D image 18 19 21 41 The stereo image used for depth measurement is considered a 25dimensional image Many more images are required to form a true 3D image Depth measurement using stereo images requires two operations 1 Determine the pointpairs in the two images that correspond to the same point in the scene This is called correspondence or disparity of the pointpair This is a difficult operation since some points in one image may not be visible in another or due to perspective distortion sizes and spatial relationships may be different in the two images 2 Determine the depth or location of the point on the object or in the scene by triangulation or other techniques Generally if the two cameras or the relative locations of a single camera used twice to get two images of a nonmoving static scene are accurately calibrated triangulation is relatively simple as long as enough cor responding points can be found Correspondence points can be determined by matching specific features such as corners or small segments from the two images However correspondence points can create matching problems depending on their locations Consider the two marks A and B in Figure 1170 In each case the two cameras see the marks as shown in Figure 1170ab Although the locations of the two marks are different the cameras see them similarly As a result the marks may be located wrongly unless additional information such as vanishing lengths are also considered The accuracy of depth measurement in stereo imaging is dependent on the angle between the two images and therefore the disparity However larger disparities require more searching over larger areas To improve the accuracy and reduce computation time multiple images of the same scene can be used 18 23 Introduction to Robotics 458 11224 Scene Analysis with Shading and Sizes Humans use the details contained in a scene to extract information about the locations of objects their sizes and their orientations One detail is the shading on different surfaces Although the smoothly changing inten sity of shades on surfaces is a source of difficulty in some other operations such as segmentation it can be indirectly used in extracting information about the depth and shape of objects Shading is the relationship between the orientation of the object and the reflected light If this relationship is known it can be used to derive information about the objects location and orientation Depth measurement using shades requires a priori knowledge of the reflectance properties of the object and exact knowledge of the light source As a result its utility is limited Another source of information for depth analysis is the use of texture gradients or the changes caused in textures as a result of depth changes These variations are due to changes in the texture itself which is assumed to be constant or due to changes in the depth or distance scaling gradient or due to changes in the orientation of the plane foreshortening gradient An example of this is the perceived change in the size of bricks on a wall By calculating the gradient of the brick sizes on the wall depth may be estimated 1123 Specialized Lighting Another possibility for depth measurement is utilizing special lighting techniques that yield specific results The specialized result can be used for extracting depth information Most of these techniques are designed for industrial applications where specialized lighting is possible and the environment is controlled The fol lowing is the theory behind one technique If a strip narrow plane of light is projected over a flat surface it generates a straight line However if the plane is not flat and an observer looks at the light strip in a plane other than the plane of light a curved or broken line will be observed Figure 1171 By analyzing the reflected light we can extract information about the shape of the object its location and orientation The same can be done with two planes of light such that in the absence of any object on the table the two strips intersect exactly on the surface but when an object is present the two strips of light develop two reflections The reflections are picked up by a camera and depth information is calculated and reported A commercial system based on this technique is called CONSIGHT a b A B Camera 2 Camera 1 A B B A Camera 1 Camera 2 A B A B A B Camera 1 Camera 2 Camera 1 Camera 2 Figure 1170 Correspondence problem in stereo imaging Image Processing and Analysis with Vision Systems 459 A disadvantage of this technique is that only information about the points that are lit can be extracted Therefore in order to have information about the complete image it is necessary to scan the entire object or scene 1124 Image Data Compression Electronic images contain large amounts of information and therefore require datatransmission lines with large bandwidth capacity The requirements for spatial resolution number of images per second and number of gray levels or colors for color images are determined by the required quality of the images Recent data transmission and datastorage techniques have significantly improved imagetransmission capability includ ing transmission over the Internet The following are some techniques that accomplish this task Although there are many different techniques of data compression only some of them directly relate to vision systems The subject of data transmission in general is beyond the scope of this book and will not be discussed here Image datacompression techniques are divided into intraframe within frame and interframe between frames methods 11241 Intraframe Spatial Domain Techniques In a technique called pseudorandom quantization dithering 22 random noise is added to the pixels gray values in order to maintain the same quality while reducing the number of bits This is done to prevent contouring which happens when the number of bits of a quantizer is reduced see Section 115 and Figure 118 These contours can be broken up by adding a small amount of broadband pseudorandom uniformly distributed noise called dither to the signal prior to sampling The dither causes the pixel to oscillate about the original quantization level removing the contours In other words the contours are forced to randomly make small oscillations about their average value A proper amount of noise will enable the system to have the same apparent resolution while the number of bits is reduced significantly Predictive coding refers to a class of techniques based on the theory that in highly repetitive images only the new information innovations need be sampled quantized and transmitted In these types of images many pixels remain without change in multiple images eg TV news sets Therefore the data transmission can be significantly reduced if only the changes between successive images are transmitted To do this a predictor is used to predict an optimum value for each pixel based on the information obtained from the previous images The update is the difference between the actual value of the pixel and the predicted value This value is Plane of light The image as seen by the camera Camera Light source Figure 1171 Application of specialized lighting in depth measurement A plane of light strikes the object The camera located at an angle other than the plane of light will see the reflection of the light plane on the object as a curved line The curvature of the line is used to calculate depth Introduction to Robotics 460 transmitted by the system to renew the previous image If in an image many pixels remain the same the innovations are few and transmission is reduced Example 1115 In a similar attempt to reduce the amount of data transmission in space by the Voy ager 2 spacecraft its computers were reprogrammed while in space to use a differential coding tech nique At the beginning of its space travel Voyagers system was designed to transmit information about every pixel at a 256 gray level scale This took 5120000 bits to transmit a single image not including error detection and correction codes which were about the same length Beginning with the Uranus flyby the system was reprogrammed to only send the difference between successive pixels rather than the absolute brightness of the pixels Consequently if there were no differences between successive pixels no information would be transmitted In scenes such as in space were the back ground is essentially black there are many pixels that are similar to their neighbors This reduced data transmission by about 60 23 Other examples of fixedbackground information include theatrical sets and industrial images In constant area quantization CAQ 24 25 data transmission is reduced by transmitting fewer pulses at lower resolution in lowcontrast areas compared to highcontrast areas This in effect is taking advantage of the fact that highercontrast areas have higherfrequency content and require more infor mation transmission than the lowercontrast areas 11242 Interframe Coding These methods take advantage of the redundant information that exists between successive images The dif ference between these and the intraframe methods is that rather than using the information within one image a number of different images are used to reduce the amount of information to be transmitted A simple technique to achieve this is to use a frame memory at the receiver The frame memory will hold an image and continually show it at the display When information about any pixel is changed the correspond ing location in the frame memory is updated As a result the rate of transmission is significantly reduced The disadvantage of this technique is that in the presence of rapidly moving elements flickering may happen 11243 Compression Techniques Two general methods are used for data compression In one method such as in zip archives called lossless compression codes are assigned to repetitive words phrases or values to reduce the size of the data file As the name implies in these methods no data is lost and consequently the original file may be reconstructed without any change or loss However the level of savings or compression in chromatic or achromatic gray images is not large because in these images pixels rarely have repeating patterns These methods however are more useful in particular situations For example in a binary file large areas blobs have similar values If the data is presented line by line such as in a facsimile scanned line by line the data may be compressed by coding the length of onoff sets of pixels rather than the value of each individual pixel Therefore many pixels with similar values can be represented by only specifying the starting point of each section and its length The second category covers methods that compress image data by reducing the information and therefore are called lossy compression including the popular JPEG Joint Photographers Expert Group compression 13 Although we will not discuss the elaborate sequence of steps taken in order to compress the data it should be mentioned that a lot of information is lost during this process although a much smaller file is generated when an image is saved or converted to JPEG format However unless the original detailed data is needed for other purposes or a picture must be zoomed in to extract information the human eye may not recognize the difference as much Image Processing and Analysis with Vision Systems 461 1125 Color Images White light can be decomposed into a rainbow of colors that span the range of 400700 nm wavelengths Although it is rather difficult to subscribe an exact value to any particular hue the primary colors of light are thought to be red green and blue RGB Theoretically all other hues and color intensities can be re created by mixing varying levels of the primary color lights although in reality the recreations are not truly accurate However in images most colors can be recreated using RGB colors To recreate color images the screen is composed of three sets of pixels interlaced sequentially RGBRGB Each set of pixels is recreated individually but simultaneously Due to the limited spatial res olution of our eyes we tend to mix the three images together and perceive color images However as far as image processing is concerned a color image is in fact a set of three images each representing the intensities of the three primary colors of the original image To convert a color chromatic image into a black and white achromatic image the intensities of the indi vidual colored files must be converted into gray values One method to do this is to take the average values of the three files for the same pixel location and to use that as a substitute for the gray value Therefore the histogram of a gray image shows the same exact values for all three channels of RGB For more information about the image processing of colored images refer to other resources such as 2 13 1126 Heuristics Heuristics is a collection of rules of thumb developed for semiintelligent systems in order to enable them to select a predetermined decision from a list based on the current situation Heuristics is used in conjunction with mobile robots but has applications in many fields Consider a mobile robot that is supposed to navigate through a maze Imagine the robot starts at a point and is equipped with a sensor that alerts its controller that the robot has reached an obstacle such as a wall At this point the controller has to decide what to do next Lets say the first rule is that when encountering an obsta cle the robot should turn left As the robot continues it may reach another wall turn left again and continue Suppose that after three left turns the robot reaches the starting point In this case should it continue to turn left Obviously this will result in a neverending loop The second rule may be to turn right if the first point is encountered Now imagine that after a left turn the robot gets to a dead end Then what A third rule may be to trace back the path until an alternate route can be found As you can see there are many different situations the robot may encounter Each one of these situations must be considered by the designer and a decision must be provided The collection of these rules is the heuristics rule base for the controller to intelligently decide how to control the motions of the robot However it is important to realize that this is not true intel ligence since the controller is not really making decisions but merely selecting from a set of decisions that have already been made If a new situation is encountered that is not in the rules base the controller will not know how to respond 26 1127 Applications of Vision Systems Vision systems may be used for many different applications including in conjunction with robots and robotic operations collaborative robots autonomous vehicles warehouses and many more Vision systems are com monly used for operations that require information from the work environment and include inspection nav igation part identification assembly operations surveillance control and communication Suppose that in an automatic manufacturing setting a circuit board is to be manufactured One important part in this operation is the inspection of the board at different states before and after certain operations A common method is to set up a cell where an image of the part is taken and subsequently modified improved and altered The processed image is compared to a lookup image If there is a match the part Introduction to Robotics 462 is accepted Otherwise the part is either rejected or repaired These imageprocessing and analysis operations are generally made up of the processes discussed earlier Most commercial vision systems have embedded routines that can be called from a macro program making it very easy to set up a system Vision systems are also used with collaborative robots to detect the presence of humans near the robot and to either change the mode to collaborative mode slowing down or to stop the robot when the arm is near a human In most cases the camera is mounted on the lower part of the arm to see the individuals body parts closer to the end of the robot The vision system may be part of the larger slew of sensors that together create a safe collaborative environment Vision systems have been used for many applications for example for locating radioactive pucks 27 ran dom bin picking 28 creating an automated brake inspection system 29 measuring robotic motions and external objects 30 food inspection such as texture of cookies and consistency of packaging 31 creating adaptive behavior for mobile robots 32 analyzing the health of agricultural crops 33 and many others In navigation the scene is usually analyzed for finding acceptable pathways obstacles and other elements that confront the robot 34 In some operations the vision system sends its information to an operator who controls the motions from a distance This is very common in telerobotics as well as in space applications 35 In some medical applications the surgeon guides the device through its operations whether a surgical robot or a small investigative exploratory device such as an angiogram 36 Autonomous navigation requires the integration of depth measurement with the vision system either by stereo vision analysis or by range finders It also requires heuristic rules of behavior for the robotic device to navigate around an environment 37 38 In another application 39 40 an inexpensive laser diode was mounted next to a camera The projected laser light was captured by the camera and was used to both measure the depth of a scene as well as to cal ibrate the camera In both cases due to the brightness of the laser light and bleeding effects the image con tained a large bright circular spot To identify the dot and separate it from the rest of the scene a histogram and thresholding operation were used Subsequently the circle was identified and skeletonized until only the center of the circle remained The location of the pixel representing the center of the circle was then used in a triangulation method to calculate the depth of the image or to calibrate the camera These simple examples are all related to what we have discussed Although many other routines are avail able the fundamental knowledge about vision systems enables you to proceed with an application and adapt to your application what vision systems have to offer 1128 Design Project There are many inexpensive digital cameras on the market that can be used to create a simple vision system They are simple small and lightweight and provide a simple image that can be captured by computers and be used to develop a vision system In fact many cameras come with the software to capture and digitize an image Standard still and video cameras can also be used for capturing images In this case although you can capture an image for later analysis due to the additional steps of downloading the image from the camera to the computer the image is not available for immediate use Additionally many programs such as Adobes Photoshop have many routines similar to what we have dis cussed in this chapter Additional routines may be developed using common computer languages such as C Many other routines may be downloaded from the public domain The final product will be a simple vision system that can be used to perform vision tasks This may be done independently or in conjunction with your 3axis robot and can include routines for parts identification and pick up the development of mobile robots and many other similar devices Most images shown in this chapter were captured and processed by standard digital cameras and the vision systems in the Mechanical Engineering Robotics laboratory at Cal Poly including MVS909 and Optimas vision systems and Photoshop Image Processing and Analysis with Vision Systems 463 1129 Summary In this chapter we studied the fundamentals of image processing to modify alter improve or enhance an image as well as image analysis through which data can be extracted from an image for subsequent applica tions This information may be used for a variety of applications including manufacturing surveillance nav igation and robotics Vision systems are very powerful tools that can be used with ease They are flexible and inexpensive There are countless routines that can be used for a variety of different purposes Most of these types of routines are created for specific operations and applications However certain fundamental techniques such as convolution masks can be applied to many classes of routines We have mostly concentrated on these types of techniques which enable you to adopt develop and use other routines and techniques for other applica tions The advances in technology have also created tremendous opportunities in this area There is no doubt that this trend will continue in the future as well References 1 Doudoumopoulos Roger OnChip Correction for Defective Pixels in an Image Sensor NASA Tech Briefs May 2000 p 34 2 Gonzalez RC Richard Woods Digital Image Processing PrenticeHall New Jersey 2002 3 Low Adrian Introductory Computer Vision and Image Processing McGraw Hill 1991 4 Horn BKP Robot Vision McGraw Hill 1986 5 Hildreth Ellen Edge Detection for Computer Vision System Mechanical Engineering August 1982 pp 4853 6 Olson Clark Image Smoothing and Edge Detection Guided by Stereoscopy NASA Tech Briefs September 1999 pp 6869 7 Groover M P et al Industrial Robotics Technology Programming and Applications McGraw Hill 1986 p 177 8 Hough PVC A Method and Means for Recognizing Complex Patterns US Patent 30696541962 9 Illingworth J J Kittler A Survey of the Hough Transform Computer Vision Graphics and Image Processing vol 44 1988 pp 87116 10 Kanade T Survey Region Segmentation Signal vs Semantics Computer Graphics and Image Processing vol 13 1980 pp 279297 11 Snyder Wesley Industrial Robots Computer Interfacing and Control Prentice Hall 1985 12 Haralick Robert M LG Shapiro Computer and Robot Vision Volume I Addison Wesley MA 1992 13 Russ John C J C Russ Introduction to Image Processing and Analysis CRC Press 2008 14 Gonzalez Rafael P Wintz Digital Image Processing Second Edition AddisonWesley Reading Mass 1987 15 Liou SP RC Jain Road Following Using Vanishing Points Proceedings of IEEE Computer Society Conference on Computer Vision and Pattern Recognition 1986 pp 4146 16 Nevatia R Machine Perception PrenticeHall New Jersey 1982 17 Fu KS Gonzalez RC Lee CSG Robotics Control Sensing Vision and Intelligence McGraw Hill 1987 18 Marr D T Poggio A Computational Theory of Human Stereo Vision Proceedings of the Royal Society London B204 1979 pp 301328 19 Marr D Vision Freeman and Co 1982 20 Pipitone Frank TG Marshall A Widefield Scanning Triangulation Rangefinder for Machine Vision The International Journal of Robotics Research vol 2 no 1 Spring 1983 pp 3949 Introduction to Robotics 464 21 Moravec HP Obstacle Avoidance and Navigation in the Real World by Seeing Robot Rover Stanford Artificial Intelligence Laboratory Memo AIM340 Sep 1980 22 Thompson JE A 36Mbits Television Coder Employing Pseudorandom Quantization IEEE Transactions on Communication Technology COM19 no 6 December 1971 pp 872879 23 Goldstein Gina Engineering the Ultimate Image The Voyager 2 Mission Mechanical Engineering December 1989 pp 3036 24 Pearson JJ RM Simonds Adaptive Hybrid and MultiThreshold CAQ Algorithms Proceedings of SPIE Conference on Advanced Image Transmission Technology vol 87 August 1976 pp 1923 25 Arnold JF MC Cavenor Improvements to the CAQ Bandwidth Compression Scheme IEEE Transactions on Communications COM29 no 12 December 1981 pp 18181822 26 Chattergy R Some Heuristics for the Navigation of a Robot The International Journal of Robotics Research vol 4 no1 Spring 1985 pp 5966 27 Wilson Andrew Editor Robot Vision System Locates Radioactive Pucks Vision Systems Design May 2002 pp 78 28 Using Vision to Enable Robotic Random Bin Picking Imaging Technology June 2008 pp 8486 29 Creating an Automated Brake Inspection System with Machine Vision Imaging Technology June 2008 pp 8890 30 Vision System Measures Motions of Robots and External Objects NASA Tech Briefs November 2008 pp 2426 31 Thilmany Jean Accessible Vision Mechanical Engineering July 2009 pp 4245 32 Adaptive Behavior for Mobile Robots NASA Tech Briefs August 2009 pp 5253 33 Imaging System Analyzes Crop Health Defense Tech Briefs August 2009 pp 3233 34 VisionBased Maneuvering and Manipulation by a Mobile Robot NASA Tech Briefs March 2002 pp 5960 35 Ashley Steven associate editor Roving Other Worlds by Remote Mechanical Engineering July 1997 pp 7476 36 Hallett Joe contributing editor 3D Imaging Guides Surgical Operations Vision Systems Design May 2001 pp 2529 37 SuperResolution Image Reconstruction SRIR NASA Tech Briefs November 2018 p 46 38 LiDAR New Eyes for Vehicle Autonomy Automotive Engineering JulyAugust 2018 pp 2428 39 Niku SB Active Distance Measurement and Mapping Using Non Stereo Vision Systems Proceedings of Automation 94 Conference July 1994 Taipei Taiwan ROC vol 5 pp 147150 40 Niku SB Camera Calibration and Resetting with Laser Light Proceedings of the 3rd International Conference on Mechatronics and Machine Vision in Practice September 1996 Guimaraez Portugal vol 2 pp 223226 41 Kulkarni Arun Computer Vision and Fuzzy Neural Systems Prentice Hall NJ 2001 Problems Please note If you do not have access to an image simulate the image by creating a file called Imn where m and n are the row and column indices of the image Then using the following image matrix create an image by substituting numbers 0 and 1 or graylevel numbers in the file In a binary image 0 represents off dark or background pixel while 1 represents on light or object pixels In gray images each pixel is represented by a corresponding grayness level value A computer routine can then be written to access this file for image data The result of each operation can be written to a new file such as Rmn where R represents result of the oper ation and m and n are the row and column indices of the resulted file Alternately you may use your own graphics system or any commercially available graphics language to create access and represent an image Image Processing and Analysis with Vision Systems 465 111 Calculate the necessary memory requirement for a still color image from a camera with 10 mega pixels at 8 bits per pixel 256 levels 16 bits per pixel 65536 levels 112 Consider the pixels of an image with values as shown in Figure P112 as well as a convolution mask with the given values Calculate the new values for the given pixels 113 Consider the pixels of an image with values as shown in Figure P113 as well as a convolution mask with the given values Calculate the new values for the given pixels Substitute 0 for negative grey levels What conclusion can you make from the result 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 a c d e f g h i j k l m n o p b Figure 1172 A blank image grid 4 7 1 8 3 4 8 6 1 0 1 6 3 2 3 1 1 1 8 7 5 9 1 0 1 Figure P112 5 5 5 7 7 8 5 5 5 8 8 9 10 10 10 10 10 10 0 4 0 5 5 5 9 9 8 1 0 1 8 8 8 9 9 10 1 0 1 Figure P113 Introduction to Robotics 466 114 Repeat Problem 113 but substitute the absolute value of negative grey levels What conclusion can you make from the result 115 Repeat Problem 113 but apply the mask shown in Figure P115 and compare your results with Problem 113 Which one is better 116 Repeat Problem 113 but apply the mask shown in Figure P116 and compare your results with Prob lem 113 Which one is better 117 Repeat Problem 113 but apply the mask shown in Figure P117 and compare your results with Prob lem 113 Which one is better 118 An image is represented by the values shown a Find the value of pixel 2d when mask 1 is applied b Find the value of pixel 3c when mask 2 is applied c Find the values of pixels 2b and 3c when a 3 3 median filter is applied d Find the area of the major object that results when a threshold of 45 is applied based on 4 connectivity start at the first onpixel 1 0 1 0 4 0 1 0 1 Figure P115 0 1 0 1 4 1 0 1 0 Figure P116 1 1 1 1 8 1 1 1 1 Figure P117 a b c d e 1 4 9 6 2 6 1 1 1 0 1 0 2 4 4 7 8 6 1 1 1 1 4 1 3 5 2 6 5 3 1 1 1 0 1 0 4 1 6 5 9 2 Mask 1 Mask 2 5 3 8 4 4 7 Figure P118 Image Processing and Analysis with Vision Systems 467 119 An image is represented by the values shown a Find the value of pixel 3b when mask 1 is applied b Find the values of pixels 2b 2c 2d when mask 2 is applied c Find the value of pixel 3c when a 5 5 median filter is applied d Find the area of the major object that results when a threshold of 45 is applied based on 4 connectivity start at the first onpixel 1110 Write a computer program for the application of a 3 3 averaging convolution mask unto a 15 15 image 1111 Write a computer program for the application of a 5 5 averaging convolution mask unto a 15 15 image 1112 Write a computer program for the application of a 3 3 highpass convolution mask unto a 15 15 image for edge detection 1113 Write a computer program for the application of an n n convolution mask unto a k k image You should write the routine such that the user can choose the size of the mask and the values of each mask cell individually 1114 Write a computer program that will perform the LR search routine for a 15 15 image 1115 Using the LR search technique find the outer edge of the object in Figure P1115 a b c d e 1 8 9 6 2 5 0 1 0 1 1 1 2 4 6 2 4 6 1 4 1 2 2 2 3 6 7 5 6 5 0 1 0 1 1 1 4 1 10 5 9 4 Mask 2 5 2 8 4 3 2 Mask 1 Figure P119 2 3 4 5 6 7 8 9 10 11 12 13 1 h i j k l m a b c d e f g Figure P1115 Introduction to Robotics 468 1116 Using the LR search technique find the outer edge of the object in Figure P1116 1117 The x and y coordinates of five points are given as 25 0 42 54 76 and 858 Using the Hough transform determine which of these points form a line and find its slope and intercept 1118 The x and y coordinates of five points are given as 012 510 75 108 and 156 Using the Hough transform determine which of these points form a line and find its slope and intercept 1119 Write a computer program that will perform a regiongrowing operation based on 4connectivity The routine should start at the 11 corner pixel search for a nucleus grow a region with a chosen index number and after finishing that region continue searching for other nuclei until all object pixels have been checked 1120 Write a computer program that will perform a regiongrowing operation based on 4connectivity The routine should start at the 11 corner pixel search for a nucleus grow a region with a chosen index number and after finishing that region continue searching for other nuclei until all object pixels have been checked 1121 Using 4connectivity logic and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1121 2 3 4 5 6 7 8 9 10 11 12 13 1 h i j k l m a b c d e f g Figure P1116 1 3 4 4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1121 Image Processing and Analysis with Vision Systems 469 1122 Using 4connectivity logic and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1122 1123 Using 4connectivity and starting from pixel 1a write the sequence of pixels in correct order that will be detected by a regiongrowing routine for the object in Figure P1123 1124 Find the union between the two objects in Figure P1124 The union should start when the center of the mask matches the first 1 starting from top left 1 3 4 x4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1122 1 3 4 x4connectivity 2 9 8 7 6 5 4 3 2 1 f g h a b c d e Figure P1123 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 1 1 1 0 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 Figure P1124 Introduction to Robotics 470 1125 Apply a singlepixel erosion based on 8connectivity on the image in Figure P1125 1126 Apply a onepixel dilation to the result of Problem 1125 and compare your result to Figure P1125 1127 Apply an open operation to Figure P1127 1128 Apply a close operation to Figure P1127 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1125 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1127 Image Processing and Analysis with Vision Systems 471 1129 Apply a skeletonization operation to Figure P1129 1130 Write a computer program in which different moments of an object in an image can be calculated The program should ask you for moment indices The results may be reported to you in a new file or may be stored in memory 1131 Calculate the M02 moment for the result of Problem 118d based on 4connectivity 1132 For the binary image of a key in Figure P1132 calculate the following Perimeter based on the LR search technique Thinness based on P2 Area Center of gravity Moment M01 about the origin pixel 11 and about the lowest pixel of a rectangular box around the key 22 2 3 4 5 6 7 8 9 10 11 12 13 1 a b c d e f g h i j k l m Figure P1129 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1132 Introduction to Robotics 472 1133 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1133 1134 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1134 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1133 1 2 3 4 5 6 7 8 9 10 1 2 3 4 5 6 7 8 9 10 x y Figure P1134 Image Processing and Analysis with Vision Systems 473 1135 Using moment equations calculate M02 and M20 about the centroidal axes of the part in Figure P1135 a b c d e f g h i j 1 2 3 4 5 6 7 8 9 10 x y Figure P1135 Introduction to Robotics 474 12 Fuzzy Logic Control 121 Introduction The robot picks up a small component and moves it slowly until it is pretty close to another part where they are to be assembled It then moves slightly until they are almost aligned inserts the part into the base and presses with some force until they are fully assembled It then moves relatively fast toward a third component to finish assembly This description of a task is an example of what fuzzy logic is about Lets look at the statement again noti cing the underlined words The robot picks up a small component and moves it slowly until it is pretty close to another part where they are to be assembled It then moves slightly until they are almost aligned inserts the part into the base and presses with some force until they are fully assembled It then moves relatively fast toward a third com ponent to finish assembly As you see a number of descriptors are used in this statement to describe certain conditions that are not very clear For example when we state that the robot picks up a small component what does small mean What do you consider to be small How slow is moving slowly These descriptions are in fact fuzzy And the statement continues to be fuzzy We also dont know exactly what is meant by pretty close or slightly or almost Obviously fuzzy statements are very common in everyday speech and they are constantly used in all matters of conversation We may have an understanding of the relative values but it is not clear what the actual values are What makes this even more even more interesting is that these fuzzy descriptions of events and other phenomena are context dependent Moving slowly means a different thing if it refers to a car compared to a robot A warm day in Alaska is very different from a warm day in Dallas or Rio de Janeiro and a warm day in Dallas means something entirely different if it happens in the summer or in winter As another example consider the description of pain by a patient to a doctor If a young child has just fallen and it really hurts the understanding of the doctor will be different than for someone who has had a serious accident and it really hurts The meaning of fuzzy values and how others interpret it is different and contextual We have learned to associate a certain range of meanings to particular descriptions and are capable of mak ing inferences related to the fuzzy descriptions In everyday conversations this seems to work However lets consider some simple examples where we need to have a better way of describing the situation Lets assume there is an expert system used to prescribe medicine to patients in remote areas where there is no access to doctors for routine problems The system asks the patient about his or her condition the symptoms pain fever coughing and so on and compares these conditions to a lookup table or bank of possible reasons and from that diagnoses the cause and prescribes a medicine Now suppose a patient is describing a sore throat If the sore throat is really bad or if the fever is about 100 how should the expert system associate meaning to these Now consider an autonomous vehicle that senses its distance to a vehicle ahead and is programmed to apply the brakes when the distance is smaller than a certain value We may use a control statement such as 475 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed IF DISTANCE 5 m APPLY BRAKES 121 This means that as soon as the distance is 5 m or less the system will fully apply the brakes However as you notice the system will not apply the brakes even if the distance is 51 m but will apply it fully as soon as the distance is 5 m Would this be appropriate Next consider a washing machine In most machines except for a simple timeofwash there are no other choices the user can make based on how much fabric is washed and how dirty the clothes are Would it not be better if there were a system where the water is tested for its cleanliness and the wash time is adjusted accord ingly In this case we need to know how to define clean water versus dirty water What is considered to be clean and how clean is clean and what is dirty and how dirty 122 Fuzzy Control What Is Needed Lets reconsider Eq 121 IF DISTANCE 5 m APPLY BRAKES One way to improve the flexibility of this control statement is to add another statement to it that would apply the brakes at a lower rate when the distance is a little larger and harder if it is smaller such as IF DISTANCE 6m APPLY BRAKES at 90 122 IF DISTANCE 5m APPLY BRAKES at 100 123 Now we have added a bit of flexibility to the system as it is not just dependent on a single value to operate but will also react differently depending on the distance Notice that for each statement the controller still reacts to a single threshold value it takes no action if the distance is a little larger than 6 m There are still two major problems with this type of control statement i If we intend to have control over a larger range of values numerous statements will be necessary to accommodate variations on desired values Imagine how many statements we need to have control over every foot of variation in distance ii Even if we do this and write control statements for all possible variations on a variable we still cannot accommodate fuzzy values of everyday spoken words As a result the medical expert system of the previous example would not be able to communicate with the patients and the washing machine would not be able to relate to dirty and clean water This is why we need to find a way of systematically defining fuzzy descriptions into useful engineering descriptions that a system can use This is done using a technique called fuzzy inference control In the next sections we will see how fuzzy inferences can be defined called fuzzy sets and fuzzification how a collection of control laws called fuzzy inference rules can be written and how to convert the results into a useful engi neering output called defuzzification The fuzzy control idea started with the publication of a paper by Lotfi Zadeh 1 Although by now there is much more to fuzzy logic we only discuss some fundamentals in this book related to developing a fuzzy logic controller for simple systems including robots For more informa tion refer to other references 2 3 4 123 Crisp Values vs Fuzzy Values In the previous examples all values mentioned in the statements are called crisp values A crisp value is a clearly defined value with one interpretation A crisp value of 15 ft means the same in any system and it is a clearly defined and measurable value It is also called a singleton value as opposed to a set of values that may be defined by a fuzzy value In contrast a fuzzy value is unclear and may be interpreted differently depending on the circumstances Introduction to Robotics 476 124 Fuzzy Sets Degrees of Truth and Membership To be able to use a fuzzy description in a control setting we define a fuzzy set whose members describe the fuzzy variable at different degrees of membership or truth Each value in the fuzzy set has a degree of mem bership within the set varying from 100 1 to 0 0 This means that in contrast to a crisp value that is the only true value and all other values relative to it are false a fuzzy set has fuzzy values with different degrees of truth varying from 100 to 0 true To understand this lets once again consider a washing machine and the following statement IF WATERSAMPLE CLEANWATER THEN WASHTIME 0 If we assume that CLEANWATER represents a purely clean water sample then as a crisp value when the water sample is purely clean no other material in the water the cleanwater statement is true and otherwise for all other samples even with a slight amount of impurity the statement is false and the water is not clean No deviation is allowed in that definition However in a fuzzy set defining CLEANWATER a purely clean water sample has a degree of membership of 100 or 1 in the set it is purely clean water But water with a slight amount of other material is still somewhat clean perhaps 95 Water with a little more foreign material is not as clean but perhaps 90 clean So every value in the set relates to some definition of clean water with only one single crisp value a singleton but also containing countless other cleanwater possibilities with different degrees of membership and different levels of truth In this case a dirty water sample can still be a part of a CLEANWATER set but may have a very low degree of membership On the other hand if we also define a fuzzy set called DIRTYWATER the purely clean water sample mentioned earlier has a degree of membership or truth of 0 in the DIRTYWATER set while the dirty water sample has a 100 degree of membership in that set The water with a 90 degree of membership in the CLEANWATER set may have a 15 degree of membership in the DIRTYWATER set as well So if we define two sets a water sample will have two defined values one in each set each with a different degree of membership Considering a general crisp rule as IFRULE THEN CONSEQUENCE 124 if RULE is 100 true CONSEQUENCE will be executed However in a fuzzy rule values are not necessarily 100 true although this occasionally happens they have degrees of membership in the set The corresponding defined membership value is used to calculate an output Assuming that two input variables called INPUT1 and INPUT2 are used in a system to control an output variable called OUTPUT we may write a general set of rules as IF INPUT1 degreeof membership in INPUT1SET AND INPUT2 degreeof membership in INPUT2SET THEN OUTPUT degreeof membership in OUTPUTSET In the next sections we discuss the process of fuzzification development of rules and defuzzification 125 Fuzzification Fuzzification is the process of converting input and output values into their membership functions The result of fuzzification is a set of graphs or equations that describe the degree of membership of different values in different fuzzy sets To fuzzify a variable its range of possible values is divided into a number of sets each describing a particular portion of the range Subsequently each range is represented by an equation or a graph that describes the degree of truth or membership of each value within the range The number of sets the range that each set Fuzzy Logic Control 477 represents and the type of representation is arbitrary and a choice of the designer As we see later these can be modified and improved when the system is simulated and analyzed A number of possible representations are available for each set If you create your own fuzzy system you may use any representation you find appropriate However when you use a commercial system you may be limited to what is available The following membership functions are common 5 Gaussian membership function As shown in Figure 121 this is a natural way to represent a distri bution Generally more mathematical operations are needed to use the Gaussian distribution as we will see next the Gaussian representation may be modified into simpler forms for easier application Trapezoidal membership function Figure 122 shows the common trapezoidal membership function used to represent a Gaussian function in a simpler way Here the membership function is repre sented by three simple lines requiring only four points Each section is a straight line and therefore the degree of membership for each value of the variable can easily be calculated from the line equations Triangular membership function This is also a very common membership function that simplifies a Gaussian function requiring only three points As shown in Figure 123 each section is a straight line Degrees of membership for each value of the variable are simply calculated from the line equations 0 1 Variable Figure 121 A Gaussian membership function 0 1 Variable Figure 122 A trapezoidal membership function 0 1 Variable Figure 123 A triangular membership function Introduction to Robotics 478 Zshaped and Sshaped membership functions These secondorder functions depicted in Figure 124 may be used to represent the upper and lower limits of a variable where the degrees of membership may remain the same 0 or 1 for a range of values A trapezoidal membership function with a vertical left or right side may be used as a simple model for S and Zshaped functions Other membership functions such as a πshaped function the product of two sigmoidal functions and the difference between two sigmoidal functions may also be available 5 However in most cases regardless of what representation may be eventually selected the fuzzy sets are initially specified with straight lines To see how these membership functions may be used lets consider an autonomous vehicle in which one variable is speed that may vary between 0 and 120 kmh To define the speed variable in fuzzy form we divide the desired range into a number of sets For the purpose of illustration lets use triangular and trapezoidal functions and assign corresponding speed ranges to sets of VERYFAST FAST MEDIUM and SLOW as shown in Figure 125 Each set contains a range of speeds where each value has a degree of membership As we discussed earlier any speed eg 26 kmh has corresponding membership values in different sets In this case the values are 023 in MEDIUM and 07 in SLOW Obviously the choice of functions ranges and number of sets is ours and may be modified as needed For example as you notice with the choices we made in Figure 125 there are gaps between sets where certain speeds belong only to one set We may later change these ranges and close the gaps to improve the response The membership functions modeled in this manner are easy to formulate by expressing two points on each segment All points on the line can then be easily identified As an example we may use the following arbi trary syntax to express the membership function for VERYFAST and FAST VERYFAST 700 1001 1201 125 FAST 500 701 1000 126 Based on these definitions all membership values on all sets can be calculated from the limits shown 0 1 Variable 0 1 Variable Figure 124 Z and Sshaped membership functions 0 Speed kmh Degree of Membership 0 05 1 023 07 SLOW MEDIUM FAST VERYFAST 20 40 60 80 26 120 100 Figure 125 Fuzzy sets for autonomous vehicle speed variable Fuzzy Logic Control 479 126 Fuzzy Inference Rules Fuzzy inference rules are the controller part of the system consisting of a collection of rules related to the fuzzy sets the input variables and the output variables and are meant to allow the system to decide what to do in each case The rules usually take one of the following forms depending on the number of input and output variables if condition then consequence if condition1 and or condition2 then consequence if condition1 and or condition2 then consequence1 and or consequence2 As an example for a system where the speed is one input variable load is the second input variable and the motor power is the output variable a fuzzy rule may be IF speed is FAST and load is MEDIUM then power is HIGH 127 or IF speed is FAST or load is MEDIUM then power is HIGH 128 Obviously these two rules will behave differently Based on commonly used truth tables in the first case both conditions must be true for the consequence while in the second case either condition results in a consequence However remembering that these are all rather fuzzy not crisp values they do not result in true or false consequences Therefore to evaluate the and and the or rules we use the following The result of an and operation is the minimum of the two values The result of an or operation is the maximum of the two values With this definition the system can check all the rules for the given inputs and calculate a corresponding output The logic system that checks the rules and finds the corresponding output is called a fuzzy inference engine You may write your own fuzzy inference engine or use commercial systems 5 The total number of rules is equal to the product of the numbers of sets of each input variable For example if there are three input variables with m n and p fuzzy sets the total number of rules is R m n p Equation 127 or 128 can also be demonstrated graphically in order to assist the designer in visualizing the relationships Figure 126 is the graphical representation of the equation When all the rules are deter mined they all may be represented together in a similar manner VERYFAST FAST SLOW LARGE RULES and HIGH and MEDIUM MEDIUM Figure 126 Graphical representation of rules Introduction to Robotics 480 127 Defuzzification Defuzzification is the conversion of a fuzzy output value to an equivalent crisp value for actual use As the fuzzy rules are evaluated and corresponding values are calculated the result will be a number related to the corresponding membership values for different output fuzzy sets As an example suppose that the output power setting for a motor is fuzzified into OFF LOW MEDIUM and HIGH The result of evaluating the rules may be say a 25 membership in LOW and a 75 membership in MEDIUM Defuzzification is the process of converting these values into a single number that can be sent to the motor controller A number of different possibilities exist for defuzzification We will consider two common and useful tech niques center of gravity and Mamdani inference method 9 1271 Center of Gravity Method In this method the membership value for each output variable is multiplied by the maximum singleton value of the output membership set to get an equivalent value for the output from the membership set in question These equivalent values for each set are added together and normalized by summation of the output mem bership values The following is a summary of this method 1 Multiply the membership degrees for each output variable by the singleton value of the output set 2 Add all of these together and divide by the summation of output membership degrees As an example suppose the values obtained for the output of a motor controller membership sets are 04 LOW and 06 MEDIUM and further suppose that the singleton value for LOW is 30 and for MEDIUM is 50 of full power The output value for the motor controller would then be Output 0 4 30 0 6 50 0 4 0 6 42 1272 Mamdani Inference Method In this method the membership function of each set is truncated at the corresponding membership value as in Figure 127 The resulting membership functions are then added together as an or function This means that all repeated areas are superimposed over each other as one layer only The result will be a new area that is representative of all areas once each The center of gravity of the resulting area is the equivalent output Mamdanis method can be summarized as follows 1 Truncate each output membership function at its corresponding membership value from the eval uation of rules SET 1 SET 2 SET 3 Variable m1 m2 Membership Functions Resulting Area Figure 127 Defuzzification based on Mamdanis method Fuzzy Logic Control 481 2 Add the remaining truncated membership functions with an or function in order to consolidate them into one area describing the output 3 Calculate the center of gravity of the consolidated area as the crisp output value Through the process of fuzzification evaluation of the rules and defuzzification an output value is calcu lated that can be applied to the output The following example demonstrates this procedure for the calcu lation of an output value Example 121 A semiautonomous wheelchair 7 for use by a blind user is to be designed where a forcefeedback joystick helps the user in navigating the wheelchair Sensors measure the distance between the wheelchair and obstacles or dropoffs as well as its velocity and the controller provides resistive force feedback to the users joystick Design the control system for the wheelchair based on fuzzy logic Solution Notice how this is in fact very similar to an autonomous robot except that the user provides the final actuating decision based on the resistance he or she feels at the joystick Based on the preceding dis cussion we follow the next three steps to design the system The MATLAB Fuzzy Logic Designer Tool box was used for the following simulation 1 Fuzzification In this part we develop the fuzzy sets relating to the two inputs and the output We assume that the range of distances in which we are interested is 010 ft the desired range of speed is 05 fps and the resistance varies between 0100 Figure 128 demonstrates the three fuzzy sets for the two inputs and one output We select four fuzzy sets FAR CLOSE NEAR and ADJACENT to express distances and three fuzzy sets SLOW FAST and VERYFAST to express speeds The out put resistance provided to the joystick is divided into five fuzzy sets of LOW MEDIUM HIGH 1 1 05 0 0 10 20 30 40 50 60 70 80 90 100 065 05 02 0 1 075 05 0 0 05 1 15 2 25 3 35 input variable Speed output variable Resistance 4 45 5 0 1 2 3 4 5 6 input variable Distance ADJACENT NEAR CLOSE FAR SLOW LOW MEDIUM HIGH VERYHIGH FULL FAST VERYFAST 7 8 9 10 Figure 128 Input and output fuzzy sets for Example 121 Introduction to Robotics 482 VERYHIGH and FULL Notice that there are gaps between some fuzzy sets limits Obviously we could have chosen other ranges for each membership function divided the ranges differently decided on different ranges of overlap for the functions or assigned asymmetrical membership functions This as in all design activities is based on the requirements of the system and the expe rience of the designer However we will study the response of the system later and if necessary will make adjustments 2 Development of the rules Since there are four membership functions for distance and three mem bership functions for speed there will be a total of 4 3 12 rules Table 121 and Figure 129 show the symbolic and graphical representations of the rules Notice that in each rule or control law one membership function for every input is considered The consequence for each rule is chosen based Table 121 Symbolic representation of the rules from Example 121 1 If Distance is FAR and Speed is SLOW then Resistance is LOW 2 If Distance is FAR and Speed is FAST then Resistance is LOW 3 If Distance is FAR and Speed is VERYFAST then Resistance is MEDIUM 4 If Distance is CLOSE and Speed is SLOW then Resistance is LOW 5 If Distance is CLOSE and Speed is FAST then Resistance is MEDIUM 6 If Distance is CLOSE and Speed is VERYFAST then Resistance is HIGH 7 If Distance is NEAR and Speed is SLOW then Resistance is MEDIUM 8 If Distance is NEAR and Speed is FAST then Resistance is HIGH 9 If Distance is NEAR and Speed is VERYFAST then Resistance is VERYHIGH 10 If Distance is ADJACENT and Speed is SLOW then Resistance is VERYHIGH 11 If Distance is ADJACENT and Speed is FAST then Resistance is FULL 12 If Distance is ADJACENT and Speed is VERYFAST then Resistance is FULL FAR CLOSE NEAR ADJACENT SLOW FAST VERYFAST R1 R2 R3 R4 R5 R6 R7 R8 R9 R10 R11 R12 LOW MEDIUM HIGH FULL 075 0 0 0 VERYHIGH 02 0 0 0 0 065 065 075 0 0 0 0 02 02 075 075 0 0 02 065 0 0 065 02 065 Figure 129 Graphical representation of some of the rules in Example 121 Remaining rules can be similarly demonstrated but are not shown for clarity Fuzzy Logic Control 483 on the experience of the designer and the necessities of the design For example in Rule 1 if distance is FAR and speed is SLOW the consequence resistance at the joystick based on experience and the desired result of the rule is chosen as LOW However in Rule 11 the consequence for ADJA CENT and FAST is FULL in order to help the user immediately stop the wheelchair We cannot truly guess the consequence yet until the system is simulated and the response is checked If the output is not as desired the rules or membership functions may be adjusted until a satisfactory result is obtained Also notice that some of the rules could have been based on or instead of and To understand how the results are found lets look at some numbers Suppose the present dis tance is 43 ft and speed is 275 fps As shown in Figure 128 the resulting membership values will be 065 NEAR 02 CLOSE and 075 FAST All other membership values are zero Substituting these values into the corresponding rules also shown graphically in Figure 129 yields output membership values of 02 MEDIUM and 065 HIGH Remember that since we are using and logic the minimum value between the two numbers is selected So for example in Rule 5 the smaller of 075 and 02 is chosen 3 Defuzzification Now that we have found the output membership values we have to defuzzify these values to get a crisp power setting for the system We calculate the output value based on both the center of gravity method and the Mamdani inference method For the center of gravity method we multiply the output membership values by their correspond ing singleton values and then divide by the sum of the membership values to get Power 0 2 30 0 65 50 0 2 0 65 45 For the Mamdani inference method we first truncate the MEDIUM and HIGH functions at 02 and 065 values combine the two into a single area and calculate the center of gravity of the result ing area as shown in Figure 1210 The center of gravity of the resulting area can be calculated by taking the first moment of the area and dividing it by the total area and is calculated to be approximately at 55 which is somewhat different from the center of gravity method We will continue with this example later as we simulate and improve the system 1 05 02 065 0 0 10 20 30 40 50 60 70 80 90 100 output variable Resistance LOW MEDIUM HIGH VERYHIGH FULL Figure 1210 Application of the Mamdani inference method Introduction to Robotics 484 128 Simulation of a Fuzzy Logic Controller So far we have made a few somewhat arbitrary choices in the number of sets ranges of variables and rules which can have potentially detrimental effects on the outcome Consequently it is necessary that we simulate the system and analyze the results This is usually done through fuzzy logic programs such as MATLABs Fuzzy Logic Toolbox These systems simulate the fuzzy control system by running a fuzzy inference engine calculating the output for all possible input values and plotting the results The plot is used to check the rules and the membership functions and to see if they are appropriate and whether modifications are necessary to improve the output If necessary the rules or the fuzzy sets are modified until the output curves are as desired Figure 1211 is the 3D depiction of the output of the wheelchair from Example 121 from MATLABs Tool box When a satisfactory system is achieved the fuzzy program is converted to machine language or other realtime code and downloaded into a microprocessor controller The microprocessor runs the machine or the system based on the fuzzy control rules Although the process seems long it is actually relatively easy to do And it does add interesting intelligence to a machine As Figure 1211 shows there are certain areas within the output surface where although the input variables change the output of the system remains flat In certain systems this may be desirable For example for an automobiles transmission unless it is continuously variable CVT the output can only be a few discrete values first second third and so on In that case it is desirable to have a constant output for a range of inputs For systems where the output is continuous a smoothly varying output is more desirable Therefore the designer may choose to modify the input and output membership functions andor the rules to achieve a more continuously varying output surface Example 121 continued To improve the output of Example 121 lets modify the inputs by closing the gaps as shown in Figure 1212 The result of the simulation is shown too The output is much smoother Next we also try to improve the system by changing the membership functions from triangular and trapezoidal to Gaussian and Sshaped or Zshaped as shown in Figure 1213 In this example the out put is slightly smoother and more continuous 80 60 40 20 0 2 4 6 8 10 0 2 4 Speed Distance Resistance 2 4 6 2 4 Spee Figure 1211 The 3D output result of the wheelchair in Example 121 generated by MATLABs Fuzzy Logic Toolbox The graph can be used for modifying and adjusting the fuzzy sets or the rules for best output result Fuzzy Logic Control 485 1 ADJACENT NEAR SLOW FAST VERYFAST CLOSE FAR 05 0 1 05 0 0 05 80 60 40 20 Resistance 0 2 4 6 8 10 0 2 4 Speed Distance 1 15 2 25 3 35 input variable speed 4 45 5 0 1 2 3 4 5 input variable Distance 6 7 8 9 10 Figure 1212 The gaps between different sets of input membership functions are closed therefore improving the output of the system ADJACENT NEAR CLOSE SLOW FAST VERYFAST FAR 1 05 0 0 05 15 25 35 4 5 45 3 2 1 1 05 0 0 1 2 3 4 5 input variable Distance input variable Speed 6 7 8 9 10 LOW MEDIUM HIGH VERYHIGH FULL 1 05 0 0 10 20 30 40 50 output variable Resistance 60 70 80 90 100 80 60 40 20 0 2 4 6 8 0 2 4 10 Distance Resistance Speed Figure 1213 The input and output fuzzy set membership functions were modified to Gaussian and S or Z shaped functions to further improve the output Introduction to Robotics 486 129 Applications of Fuzzy Logic in Robotics Fuzzy logic control systems can be used for both controlling robots as well as adding intelligence to appli cations where other systems may be inadequate or difficult to use For example fuzzy logic was used to directly control the torque output of a switched reluctance motor by a current modulation scheme 8 Although fuzzy logic can be used for controlling robots in lieu of or in conjunction with classical control systems there are many other applications where fuzzy logic may be more appropriate if not the only way to control a function It is for this reason that the discussion of fuzzy logic has been presented here Through these applications a robot can become unique more intelligent and responsive or more useful As an example consider a mobile robot that is designed for rough terrain A fuzzy logic control system can be used to enhance the robot controller in deciding what action to take depending on the speed of the robot the terrain the robots power and so on Or imagine a robot whose end effector exerts a force pro portional to the size and weight of a part or a humanoid robot that shakes a humans hand based on the size and strength of the person Similarly the facial features of a humanoid robot may be modified based on fuzzy inputs received from the human counterpart whether the person is smiling sad frowning or angry or depending on work conditions see Figure 1214 In yet another example suppose that a robot is used to sort a bag of objects based on their colors according to the colors of the rainbow In these and countless other similar examples fuzzy logic may be the best choice to incorporate the intelligence needed to accom plish the task Additionally many peripheral devices are integrated with robots or work with a robot through their own controller In these cases too fuzzy logic may be incorporated into the processor for better performance Finally as has been mentioned previously collaborative robots are meant to work with humans Consequently fuzzy logic may be used to interpret the human interactions with the robot and enhance the relationship Example 122 In a particular application a robot with a vision system is used to sort diamonds by weight and by color and determine a price for the diamonds Design a fuzzy logic system to control the process Solution Diamonds are classified by carat weight color indicated by letters where A is extremely clear and other letters indicate tints of yellow in the diamond and clarity the size of inclusions The clearer the Figure 1214 Rethink Robotics Sawyer robot Source Reproduced with permission from Rethink Robotics GmbH Fuzzy Logic Control 487 diamond the smaller the inclusions and the larger the size the more expensive the diamond is per carat In this example we assume we are sorting the diamond by color and size carat weight only We assume that the vision system can take an image of the diamond and compare its color with a data bank of colors to estimate the color range We also assume that the weight of the diamond is measured by a scale for example the robot places the diamond on the scale and later removes it to an appropriate container depending on its value We further assume that the size of the diamonds falls in Small Medium Large and VeryLarge categories as shown in Figure 1215 The colors of the diamonds are divided into three color ranges D H and L The price per carat of the diamonds will be in the ranges of Ten Fifteen Twenty Thirty Forty and Fifty all times a normalized base price The rules as well as the result of the simulation of this system are shown in Figure 1216 As shown for every color and weight combination there is a corresponding price With this fuzzy logic system and only 12 rules a vision system could estimate the corresponding price range of dia monds automatically 1210 Design Project If you have access to a fuzzy logic control simulator you may want to develop a fuzzy logic control program for a mobile robot a specific task for a vision system or other similar applications The fuzzy logic control program may be written for either controlling the robot motions or other purposes For example you may write a fuzzy control heuristics program such that the robot will follow a certain path based on fuzzy inputs Additionally if you have access to a microprocessor the developed programs can be downloaded to the microprocessor as part of the control program it runs Small Medium Large VeryLarge 0 0 1 05 0 05 1 10 20 30 40 50 input variable Size input variable Color 60 70 80 90 100 0 10 20 30 40 50 60 70 80 90 100 D H L 0 0 05 1 5 10 15 20 25 30 Ten Fifteen Twenty Thirty 35 40 output variable Price 45 50 Forty Fifty Figure 1215 Fuzzy sets showing the input and the output from Example 122 Introduction to Robotics 488 1211 Summary In this chapter we discussed how a fuzzy logic control system may be developed simulated tested and used Fuzzy logic is a very powerful way of including nonexact concepts in everyday systems including definitions eg distance speed feelings eg pain hot cold and adjectives eg much less Although fuzzy logic sys tems may be applied to countless different situations we primarily discussed how they may be used in robot ics Applications in robotics can range from navigation control for mobile robots and telerobotic to expert systems and vision systems Fuzzy logic controllers are generally simulated with a simulator program and when it is verified that a system behaves as intended it is used in conjunction with the remaining control programs References 1 Zadeh Lotfi Fuzzy Sets Information and Control vol 8 1965 pp 338353 2 Cox Earl Fuzzy Logic for Business and Industry Charles River Media 1995 3 McNeill F Martin Ellen Thro Fuzzy Logic a Practical Approach Academic Press 1994 4 Kosko Bart Neural Networks and Fuzzy Systems a Dynamical Systems Approach to Machine Intelligence Prentice Hall 1992 5 MATLAB Fuzzy Logic Toolbox 1 lf Size is Small and Color is L then Price is Ten 2 lf Size is Medium and Color is L then Price is Fifteen 3 lf Size is Large and Color is L then Price is Twenty 4 lf Size is VeryLarge and Color is L then Price is Thirty 5 lf Size is Small and Color is H then Price is Fifteen 6 lf Size is Medium and Color is H then Price is Twenty 7 lf Size is Large and Color is H then Price is Thirty 8 lf Size is VeryLarge and Color is H then Price is Forty 9 lf Size is Small and Color is D then Price is Twenty 10 lf Size is Medium and Color is D then Price is Thirty 11 lf Size is Large and Color is D then Price is Forty 12 lf Size is VeryLarge and Color is D then Price is Fifty 50 40 30 20 10 100 100 50 50 Size Color Price 0 0 Figure 1216 The result of the simulation from Example 122 Fuzzy Logic Control 489 6 Mamdani EH Application of Fuzzy Logic to Approximate Reasoning Using Linguistic Synthesis IEEE Transactions on Computers vol c26 no 12 1977 pp 11821191 7 Sindorf Brent SB Niku Force Feedback Wheelchair Control masters thesis Mechanical Engineering Department Cal Poly San Luis Obispo 2005 8 Sahoo NC SK Panda PK Dash A Current Modulation Scheme for Direct Torque Control of Switched Reluctance Motor Using Fuzzy Logic Mechatronics The Science of Intelligent Machines vol 10 no 3 April 2000 pp 353370 Problems 121 Develop a fuzzy inference system for a robot where the force exerted at the hand and the velocity of the hand are the inputs and the power to the actuators is the output 122 Develop a fuzzy inference system for a humanoid robot in which the inputs may be the facial expres sions of a human counterpart such as angle of eyebrows and the size of the mouth and the output is the facial expression of the robot such as smiling frowning or sad 123 Develop a fuzzy inference system for a washing machine The inputs are how dirty the fabrics are and how many clothes are being washed and the output is the wash time 124 Develop a fuzzy inference system for a barbecue The inputs may be the thickness of the steak and how cooked or rare it is desired to be The output may be the temperature of the flame andor the time of cooking 125 Develop a fuzzy inference system for an automatic gearbox The inputs are the speed of the car and the load on the engine and the output is the gear ratio of the transmission 126 Develop a fuzzy logic system for a vision system in which the inputs are the intensities of the three colors of red green and blue RGB in a color image and the output is the relationship of the com bination to the colors of the rainbow 127 Develop a fuzzy inference system for grading a robotics course The inputs are your effort level in the course and your exam grade and the output is your letter grade Introduction to Robotics 490 Appendix A A1 Matrix Algebra and Notation A Review Throughout this book we use matrices to represent coordinates frames objects and motions In this appen dix certain characteristics of matrices that we need in our calculations are reviewed You must already have an understanding of matrix algebra to understand the use of matrices Therefore only a simple review is presented here A matrix is a collection of m rows and n columns of values represented in a bracket The dimensions of the matrix are m n and each element of the matrix is referred to as Aij A matrix whose number of rows and columns are the same is called a square matrix Matrix Transpose The transpose of a matrix Aji is another matrix AT ij where elements of each row and column are replaced as shown Aij a11 a12 a13 a21 a22 a23 and AT ij Aji a11 a21 a12 a22 a13 a23 A1 Matrix Multiplication Matrices can be multiplied by multiplying all the elements of each row by each column and replacing the summation in the corresponding rowcolumn location as follows Cij Aik Bkj d e f g h l p s q t r w dp eq fr ds et fw gp hq lr gs ht lw A2 As you see the result of an m n matrix multiplied by an n p matrix is an m p matrix Therefore the number of columns of the first matrix must be equal to the number of rows of the second matrix Also remember that unlike regular algebra the order of multiplication of matrices may not be changed In other words A B B A This can easily be demonstrated by the fact that if A is a 2 3 matrix and B is a 3 2 matrix then A B will yield a 2 2 matrix whereas B A will result in a 3 3 matrix which obviously is different However if more than two matrices are to be multiplied although their order cannot be changed the result is independent of which pairs of matrices are multiplied first As a result the following is true A B B A A3 491 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed but A B C A B C A B C A4 A B C AC BC and C A B CA CB A5 Diagonal Matrix A diagonal matrix is a matrix where all except the diagonal elements of the matrix are zero If all diagonal elements are 1 the matrix is a unit matrix which effectively acts as a 1 Premultiplying or postmultiplying any matrix by a unit matrix results in the same matrix Matrix Addition Matrix addition can be accomplished by adding each element of one matrix by the corresponding element of the other matrices Unlike matrix multiplication addition of matrices is commutative the order of addi tion is not important Obviously the dimensions of all matrices must be exactly the same for addition Therefore Aij Bij A B ij A6 A B C B A C C A B A7 Vectors A vector is a onedimensional matrix either a 1 m or an n 1 matrix Determinant of a Matrix The determinant of a matrix can be calculated as follows 1 Pick one row or column 2 Multiply each element in the chosen row or column by the determinant of the matrix that remains after the corresponding row and column of the element are dropped from the matrix each one with an alternating plus or minus sign Example A1 Calculate the determinant of the following matrix A a b c d e f g h i Solution First choose a row or column In this example we will pick the first row The determinant of the matrix is det A a eifh b difg c dheg Introduction to Robotics 492 Matrix Inversion This is an important operation in matrix representation of robots We will use matrix inversions for both inverse kinematics and for differential motions In this section two generalpurpose inversion techniques for square matrices are mentioned The inverse of a matrix is another matrix such that if the matrix is multiplied by the inverse the result is a unit matrix In general a matrix either has a left inverse or a right inverse If A A1 I where I is a unit matrix A1 is called a right inverse If A1 A I then A1 is called a left inverse Generally the left and right inverse matrices are not the same However a square matrix will have the same left and right inverse such that A A1 A1 A I In this case A1 is simply called an inverse and it may be premultiplied or postmultiplied by the square matrix yielding a unit matrix Method 1 For square matrices with nonzero determinants only the inverse of the matrix can be calculated by the following method 1 Calculate the determinant of the matrix 2 Transpose the matrix 3 Replace each element of the transposed matrix with its own minor this is called an adjoint matrix 4 Divide the adjoint matrix by the determinant to get the inverse Therefore A1 adj A det A A8 The minor for each element Aij of the matrix is the determinant of the matrix that remains after the row and column of the matrix containing the element are dropped multiplied by 1 i j This creates a sign matrix as shown in Eq A9 As an example we can write the following minors for the given matrix in Eq A9 A a b c d e f g h i with Sign A9 aminor eifh and bminor difg and hminor af cd Of course the minors for a matrix with larger dimensions will be similar but much more involved Example A2 Calculate the inverse of the following matrix A 1 0 1 0 1 4 5 2 1 Solution First we calculate the determinant of the matrix det A 1 1 8 0 0 20 1 0 5 7 5 2 Appendix A 493 The transpose of the matrix is AT 1 0 5 0 1 2 1 4 1 The adjoint of the matrix is Aadj AT minor 1 8 0 2 01 020 15 40 05 2 0 10 7 2 1 20 6 4 5 2 1 The inverse can be found by dividing the matrix by the determinant A1 3 5 1 0 5 10 3 2 2 5 1 0 5 To ensure that the result is correct you may multiply A by A1 1 0 1 0 1 4 5 2 1 3 5 1 0 5 10 3 2 2 5 1 0 5 1 0 0 0 1 0 0 0 1 Verify that A1 A results in a unit matrix as well Method 2 In this method we assume an inverse matrix of the following form exists such that when multiplied by the given matrix a unit matrix results a11 a12 a1i a21 ai1 aii x11 x12 x1i x21 xi1 xii 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 A10 where the xii matrix is the inverse of the A matrix that we are looking for Note that this represents a set of i2 equations and i2 unknowns If you multiply the first matrix A by the first column of the x matrix the result is the first column of the unit matrix Then there is a set of i equations that you have to solve for each column Example A3 Find the inverse of the following matrix using method 2 A 1 0 1 0 1 4 5 2 1 Solution Based on the previous we write Introduction to Robotics 494 1 0 1 0 1 4 5 2 1 x11 x12 x13 x21 x22 x23 x31 x32 x33 1 0 0 0 1 0 0 0 1 Multiplying the given matrix by the first column of the inverse matrix and equating it with the cor responding first column of the unit matrix yields the following three equations x11 x31 1 x21 4x31 0 5x112x21x31 0 and x11 3 5 x12 10 x13 2 5 Similarly if you multiply the given matrix by the second and then the third columns of the inverse matrix and equate each one with the second or third column of the unit matrix respectively you will get the remainder of the unknowns As you can see the result is exactly the same Please do this to verify that you get the same results Trace The sum of the diagonal elements of a matrix A is called traceA Therefore traceA n j 1 ajj Specifically the trace for the product of a vector of n elements and its transpose is trace V V T trace v1 v2 vn v1 v2 vn trace v2 1 v1v2 v1vn v2v1 v2 2 vnv1 v2 n n j 1 v2 j This is used in the calculation of kinetic energy in Chapter 6 Transpose of Products of Matrices The following is true If B C A then C T B T A T A11 Appendix A 495 For example we can see that the following is true a b c d e f ac be ad bf c e d f a b ac be ad bf ac be ad bf T A2 Calculation of an Angle from its Sine Cosine or Tangent There are many instances in robotic analysis when we need to determine the magnitude of an angle from sin θ cos θ or tan θ Although this seems to be a trivial matter in reality it is very important because there can be grave ambiguities in the answer resulting in erroneous values and preventing a robot controller from functioning properly This is true even with a calculator or a computer To understand this lets do a sim ple test Suppose you use your calculator to calculate sin 75 as 0966 If you enter the same number into your cal culator and calculate the angle from it you will find the same 75 However if you do the same with sin 105 you will find the same 0966 as before As a result if you calculate the angle again of course you will get 75 and not 105 Here lies the basic error The sine of two angles with equal distance from 90 is always the same and therefore the calculator always returns the smaller angle The same is true for the cos and tan of an angle the cos of the plus or minus of the same angle is the same while the tan of an angle is the same if 180 is added to it This is simply demonstrated by the trigonometric relationships as in Figure A1 In order to know the exact magnitude of an angle it is necessary to determine in what quadrant the angle lies This enables us to correctly know what the angle really is However to determine the quadrant of an angle it is necessary to know the signs of both the sine and the cosine of the angle If we know the signs of the sine and the cosine of the angle we can determine what quadrant it is in and based on that we can correctly calculate the angle In the previous example if you calculate the values of cos 75 and cos 105 you will notice that they are respectively 0259 and 0259 Considering both the sin and the cos of 75 and 105 we can easily determine the correct angles The same principle is true for tan of an angle In robotic calculations we will encounter the same situation where tan of angles are generally found If the simple atan arctan function of a calculator or computer is used it may yield an erroneous result But if both the sin and the cos of the angle are found and used in a function we can calculate the correct angle Some computer languages such as C MATLAB and FORTRAN have a function called ATAN2sin cos in which the values of the sine and cosine of the angle entered as arguments are automatically used to return the value of the angle In all other situations either with your calculator or other computer languages you will cos sin tan Figure A1 Trigonometric functions Introduction to Robotics 496 have to write such a function As a result it is generally necessary to find two equations for each angle one that yields the sine of the angle and one that yields the cosine of the angle Based on the signs of the two we determine the quadrant and therefore the correct value of the angle This will be emphasized throughout this book whenever possible The following is a summary of rules for calculating the angles in each quadrant You may program this into your robotic routines or your calculator for future use If sin is positive and cos is positive the angle is in quadrant 1 then angle atanα If sin is positive and cos is negative the angle is in quadrant 2 then angle 180 atanα If sin is negative and cos is negative the angle is in quadrant 3 then angle 180 atanα If sin is negative and cos is positive the angle is in quadrant 4 then angle atanα The program should also check to see if either the sin or the cos is zero In that case instead of calculating the tangent it should directly use the cosine or the sine to calculate the angle to prevent an error A3 Solving Equations with Sine and Cosine There are many situations where we find an equation of the form A sinθ B cosθ C There are at least three possible ways to solve an equation of this form Method 1 Lets define D A2 B2 We divide both sides of the equation by D A Dsinθ B Dcosθ C D Lets assume there is an angle α such that cosα A D sinα B D α ATAN2 B DA D Then sinθ cosα cosθ sinα CD sin θ α CD θ α sin1 CD Knowing α we can calculate θ without having to square the equation creating multiple solutions Method 2 We substitute sinθ tanθ 1 tan2θ and cosθ 1 1 tan2θ square and rearrange to get A tanθ 1 tan2θ B 1 1 tan2θ C A2tan2θ 1 tan2θ B2 1 tan2θ 2AB tanθ 1 tan2θ C2 A2tan2θ B2 2AB tanθ C2 C2tan2θ A2C2 tan2θ 2AB tanθ B2C2 0 This secondorder equation can be solved for tan θ from which θ can be calculated Appendix A 497 Method 3 We substitute cosθ 1sin2θ to get A sinθ B cosθ C A sinθC B 1sin2θ A2sin2θ C22AC sinθ B2B2sin2θ A2 B2 sin2θ2AC sinθ C2B2 0 From which sin θ and then θ can be found In all three methods at least two solutions for each angle may be found Problems A1 Show that the determinant of a matrix can be calculated by picking any row or column A2 Calculate the determinant of the following 4 4 matrix A 1 1 0 0 0 1 2 0 3 0 1 1 1 0 0 1 A3 Calculate the inverse of the following matrix using method 1 B 1 1 2 0 1 0 2 0 3 A4 Calculate the inverse of the following matrix using method 2 C 1 0 1 0 2 1 3 1 0 Introduction to Robotics 498 Appendix B ImageAcquisition Systems The following discussion is a very short presentation about digital imageacquisition systems Analog cam eras are no longer common There has been a tremendous explosion of dataprocessing capability in digital cameras from kilopixel range to megapixels and from bulky cameras to mini and micro sizes all in less than a decade This appendix only discusses the fundamental ways images are captured A digital camera is based on solid state technology Similar to other cameras a set of lenses is used to project the area of interest onto the image area of the camera The main part of the camera is a solid state silicon wafer image area which has hundreds of thousands to millions of extremely small photosensitive areas called photosites printed on it Each small area of the wafer is a picturecell or pixel As the image is projected onto the image area a charge is developed at each pixel location of the wafer proportional to the intensity of light at that location and therefore such a camera is called a charge coupled device CCD camera or a charge inte grated device CID camera The collection of charges if read sequentially represent the image pixels Figure B1 The wafer may have millions of pixels on an area with dimensions of a fraction of an inch Obviously it is impossible to have direct wire connections to all of these pixels to measure the charge in each one To read this tremendously large number of pixels once for each still image and up to 30 times a second for video images the charges on each line of pixels are moved to optically isolated shiftregisters next to each photo site moved down to an output line and read The result is that at each 30th of a second the charge in all pixel Light Electrode A B C A B C Figure B1 Image acquisition with a digital camera involves the development of a charge at each pixel location proportional to the light at the pixel The image is then read by moving the charges to optically isolated shiftregisters and reading them at a known rate 499 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed locations are read sequentially and stored or recorded The output is a discrete representation of the image a voltage sampled in time as shown in Figure B2 In addition to CCD cameras for visible light the same can be done for longwavelength infrared cameras which yield an image of the infrared emissions of the scene Sampled voltage Pixels Photosite Shift register Output Figure B2 Image data collection model Introduction to Robotics 500 Index a Absolute encoder 376 379 381 AC current 338 induction motor 338 motor 338 344 345 sunchronous motor 338 358 Acceleration 219 220 angular 219 225 235 centripetal 223 225 235 236 Coriolis 223 225 235 236 sensor 386 Accumulator 337 Accuracy 377 ACDC universal motor 338 Actuator electroactive polymer 331 364 hydraulic 331 335 linear 337 magnetostrictive 364 musclewire 331 364 piezoelectric 331 pneumatic 331 337 rotary 337 shapememory 364 Adjoint 493 Aliasing 413 Analog to digital converter ADC 321 360 375 410 Angle criterion 301 Angular acceleration 219 225 235 275 Angular momentum 229 Animatronics 28 Antistatic foam 388 Articulated 10 60 65 120 ASIMO 4 Aspect ratio 450 Asymmetry 150 Asymptote 301 314 ATAN2 496 Austenitic 364 Averaging filter 428 b Back emf 323 338 342 345 357 362 Bifilar stepper motor 351 355 Binary code 381 Binary morphology 444 Bipolar stepper motor 355 Bit 412 Bitmap 405 Block diagram 274 288 Bode diagram 313 320 Breakaway point 301 Breakdown voltage 357 Breakin point 301 Brushes 342 349 Brushless DC motor 338 345 349 Byte 360 412 c Caliper 354 Canstack stepper motor 349351 Capacitance 276 385 Capacitive 393 Capek Karel 3 Cartesian coordinates 9 35 60 Cartesian space 248 263 CAT scan 404 Center of area 452 Center of gravity 481 Centertapping 345 351 353356 Centripetal acceleration 223 225 229 235 236 Centroid 452 Cermet 379 Characteristic equation 294 298303 Chargecoupled device CCD 499 Chargeintegrated device CID 499 Chasless theorem 111 115 501 Introduction to Robotics Analysis Control Applications Third Edition Saeed B Niku 2020 John Wiley Sons Ltd Published 2020 by John Wiley Sons Ltd Companion website wwwwileycomgoniku3ed Chord length 450 Closed loop 274 286 291 300 314 Close operation 448 CMYK 404 Cobots 28 Coefficient of friction 333 Collaborative robot 28 240 347 463 487 Common normal 71 Commutator 342 344 349 Compensator 313 397 Complex conjugate 283 295 Compliance 332 336 398 Compression 461 Computed tomography 404 457 Conductive polymer 379 Connectivity 424 443 446 Constant area quantization CAQ 461 Continuous trajectory 267 Contrast 416 Convolution mask 419 427 Cooperating robots 91 241 347 Coordinates Cartesian 35 60 cylindrical 35 60 61 rectangular 60 spherical 35 60 63 Coriolis acceleration 223236 Correspondence 458 Coupled angles 66 198 Coupling inertia 229 Crisp value 476 Critical damping 292 295 298 301 Current frame 52 Cylindrical coordinates 10 35 60 d Damping 275 292 303 324 coefficient 326 ratio 292 Data compression 460 DC brushed motor 338 current 342 motor 338345 Decoupling 66 85 89 122 Deflection 35 Deformation 332 Defuzzification 476 481 Degeneracy 91 208 Degrees of freedom DOF 7 35 43 93 133 143 147 154 160 208 220 338 DenavitHartenberg 35 70 93 119 139 173 197 199 230 Depth analysis 458 Depth measurement 403 457 459 Detent torque 348 Determinant 56 208 483 Dexterity 93 Differential dithering 338 motion 173 177 264 240 operator 181 183 188 Digital control 320 Digital to analog converter DAC 320 360 Dilation 444449 Direct drive DC motor 338 electric motor 331 346 system 333 Directional cosine 41 43 114 Direction vector 39 Discrete Fourier descriptors 456 Discriminant 146 283 Disk motor 343 Disparity 458 Displacement sensor 383 Dithering 460 Dominant frequency 406 Dual arm robot 29 91 e Eccentricity 450 Eddy current 339 393 Edge detection 419 430437 440 Edge detectors leftright 435 Prewitt 434 Roberts 434 Sobel 434 Effective moment of inertia 229 Electric motor 331338 Electroactive polymer actuator EAP 331 364 Electromotive force 338 Encoders 345347 379385 absolute 379 381 incremental 379 optical 380 velocity sensor 385 Erosion 444449 Error signal 274 Estimator 319 Euler 65 68 Expert system 475 f Fast Fourier transform FFT 409 Feature extraction 450 Feedforward transfer function FFTF 286 288 303 Index 502 Fifthorder polynomial 255 260 Fill operation 448 Filters Gaussian 428 highpass 410 436 low pass 428 median 429 Final value theorem 292 280 Finite difference 432 First moment of area 452 Flexspline 366 Flux vector control 345 Force analysis static 239 Force decomposition 206 Force sensor 387 Forcing function 275 Foreshortening 459 Forward kinematics 35 59 120 133 140 151 Fourier series 406 Fourier transform 406 409 413 427 429 Fourthorder polynomial 260 Frameless motor 344 Frames current 52 Free body diagram 333 Frequency content 406 domain 313 406 409 427 429 response 376 spectrum 406409 413 429 Fully parallel robot 137 Fuzzification 476 Fuzzy control 476 description 475 inference 476 inference engine 480 inference rules 476 480 logic 487 sets 476 477 g Gain proportional 292 Gaussian elimination 191 filter 428 membership function 478 Global Positioning System GPS 384 Gradient 431 Gravity matrix 234 Gray code 381 Grey morphology 449 Greyness level 416 GruberKutzbach 135 Gyroscopic steering 369 h Halbach array 350 Half step operation 349 356 Halleffect sensor 345 380 384 Harmonic drive 365 Harmonics 409 Hbridge 363 Heat dissipation 248 339340 345 Heat generation 339 Heuristics 462 Hexapod 133 Higher order derivative 231 differentials 179 polynomial 267 Highpass filter 410 433 436 Histogram 406 415 428 434 450 equalization 416 Holding torque 356 Hollowrotor motor 343 Homogeneous matrix 42 45 56 114 233 Hough transform 437 457 Humanoid 487 Hydraulic actuator 331 pump 335 337 system 332 335 Hysteresis 322 339 i Image acquisition 499 analysis 403 449 averaging 428 binary 406 412 processing 403 415 424 450 sharpening 436 Incremental encoder 379 Independent joint control 323 Indexer 348 Indirect amplitude modulation 395 Inductance 276 324 Inductive 393 Inertia 143 154 219 233 275 333 339 343 357 Inertia tensor 233 Infrared sensor 389 Instantaneous center 398 Integral gain 307 Integrated hybrid servo 347 Integrator 311 Intercept 437 Interfacing 376 Interframe 461 Intraframe 460 Index 503 Inverse Jacobian 191 206 kinematics 35 59 64 69 84 89 120 133 137 140 191 248 259 264 Laplace transform 281 matrices 54 transformation matrix 54 j Jacobian 173 185 188 206 241 inverse 191 197 199 206 208 Jerk 255 Joint offset 73 83 Joint reference frame 12 Joint space 248 252 JPEG JPG 461 k Kinematics chain 134 147 forward 35 59 120 133 140 151 inverse 35 59 64 69 84 89 120 133 137 140 191 248 259 264 loop 134 Kinetic energy 222 229 232 Kirchhoffs law 276 Knot point 257 l Lag compensator 313 Lagrangian 220 229 234 Laplace transform 278 281 313 316 325 Laplacian 432434 Lapsed time 393 Lead compensator 313 Leadlag compensation 313 Leadthrough 12 LeftRight edge detector 435 Liftoff 260 Light detection and ranging LiDAR 395 441 457 Linear actuator 337 Linearity 376 Linear magnetostrictive displacement transducer LMDT 383 Linear variable differential transformer LVDT 382 390 Logarithmic scale 313 Lookup table 450 Lossless compression 461 Lossy compression 461 Low pass filter 362 409 427 428 m Magnetic field 276 338 Magnetic flux 339 340 Magnetostrictive actuator 364 Magnetostrictive sensor 383 Magnitude criterion 300 Mamdani inference method 481 Manipulator 2 5 36 133 Mapping 457 Martensitic 364 Mask 430 Matrix adjoint 56 493 algebra 491 determinant 56 492 diagonal 492 homogeneous 42 56 inversion 493 multiplication 491 trace 495 transpose 56 491 unitary 56 Mechanism 35 174 177 208 219 249 398 Median filter 429 Membership function 477 Microelectromechanicalsystems MEMS 28 Microprocessor 7 320 358 360 Microstepping 357 Modulus of elasticity 332 Moment invariant 453 Moment of inertia 225 229 227 276 Moments 450451 Morphology 419 444 449 MOSFET 362 Motion control 273 Motion simulator 133 Motor AC 338 344 345 ACDC universal 338 AC induction 338 AC synchronous 338 358 bifilar stepper 351 355 bipolar stepper 355 brushless DC 345349 canstack stepper 349351 DC 338 341 345 DC brushed 338 DC brushless 338 direct drive DC 338 directdrive electric 331 346 disk 343 electric 331 338 frameless 344 hollowrotor 343 pancake 343 reactance 343 reversible AC 345 Index 504 servo 331 346 squirrelcage 344 stepper 331 338 3475 347 switched reluctance 338 unipolar stepper 355 Multiple inputoutput MIMO 314 Musclewire actuator 331 364 n Natural frequency 292 326 362 376 Neighborhood averaging 427 429 Neodymium 343 Newtonian mechanics 220 Nibble 360 Noise 415 409 437 Noise reduction 406 426 Nonlinear control 322 Nonlinearity 376 Nutating gear train 367 o Object recognition 430 450456 Offset 149 Open loop 36 274 313314 transfer function 285 Open operation 448 Operating pressure 332 Optical encoder 345 380 Outer arm 154 160 167 Overdamped 295 298 Overshoot 301 305 306 p Pancake motor 333 343 Parabolic blend 252 257 259 Parallel axes theorem 452 Parallel robot 11 36 133 206 Partial fraction expansion 281 292 296 Passive DOF 135 138 154 Payload 13 Peak time 293 Percentile 429 Percent overshoot 293 Permeability 382 Phoneme 397 Photodetector 380 Photosite 499 Phototransistor 379 389 Piezoelectric actuator 331 Pitch 65 111 120 125 Planetary gear train 365 Pneumatic actuator 331 337 Pointtopoint 90 Pole complex conjugate 283 distinct 281 mapping 294 placement 303 repeated 282 Polezero cancellation 311 mapping 294 Polynomial fifthorder 255 260 fourth order 260 higher order 267 thirdorder 252 260 Portable Gray Map PGM 405 Position sensor 378 Potential energy 222 229 234 Potentiometer 347 378 wire wound 379 Power to weight ratio 331 336 343 Precision 13 Predictive coding 460 Prewitt edge detector 434 Prismatic 9 71 120 134 141 147 167 230 240 323 Product of inertia 453 Programmable logic controller PLC 5 12 Proportional control 303 Proportional gain 292 303 307 Proportionalintegralderivative PID control 311 Proportionalplusderivative PD controllers 308 Proportionalplusintegral PI controllers 306 Prosthesis 26 Proximity sensor 391 Pseudo inertia matrix 233 Pseudorandom quantization 460 Pullout torque 356 Pulse width modulation PWM 361 q Quadrant 62 156 158 162 496 Quadratic equation 145 168 Quantization 410 r Rabota 3 Radius of curvature 398 Ramp function 278 Random noise 429 Range array acquisition 394 395 Range detection 376 458 Range finder 393 394 Rare earth metals 343 Reach 13 Reactance of motors 343 Reduction gears 333 336 Index 505 Reference frame joint 11 12 Reflectance 459 Region growing 430 440 nucleus 442 splitting 441 Reliability 377 Reluctance 349 352357 Remotecenter compliance RCC 397400 Repeatability 13 377 Reset position 77 83 98 120 124 148 156168 Residual torque 348 Residue 281 282 283 Resistance 276 387 Resolution 376 381 410 Resolver 345 347 383 Response time 376 Reversible AC motor 345 Revolute 9 71 120 134 147 230 240 323 Red green and blue RGB 405 412 462 RFID 387 Rise time 291 293 301 376 Roberts edge detector 434 Robot collaborative 28 463 487 dual arm 29 fixed sequence 2 four limbed 137 parallel 11 133 payload 13 playback 3 precision 13 repeatability 13 three limbed 137 validity 13 variability 13 workspace 13 Rodrigues rotation formula 113 Roll 65 Root locus 298 314 320 Rossums Universal Robots 3 Rotary actuator 337 Rotation matrix 56 s Sampling rate 410 412 Sampling theorem 320 412 413 Scalar 43 113 234 240 Scale factor 39 Scaling gradient 459 Scene analysis 457 Screw based mechanics 111 197 206 Screw based transformations 119 Second moment of area 452 Segmentation 430 440 Selective compliance 398 Selective Compliance Assembly Robot Arm SCARA 10 71 169 Sensitivity 376 Sensors 6 241 337 347 375 acceleration 386 antistatic foam 388 displacement 383 force 387 global reference frame GPS 384 Hall effect 380 384 infrared 389 light detection and ranging LIDAR 395 linear variable differential transformer LVDT 382 magnetostrictive 383 position 378 pressure 387 proximity 391 range finder 393 394 resolver 383 sniff 396 tachometer 385 tactile 389390 torque 388 touch 389390 velocity 385 voice recognition 396 Servo controller 273 Servomechanism 323 Servomotor 331 335 339 346 361 Set down 260 Set theory 444 Settling time 291 293 376 Shading 459 Shapememory metal 364 Singleinput singleoutput SISO 314 Singleton 476 Singularity 142 208 Skeletonization 444 446 447 Slope 437 Sniff sensor 396 Sobel operator 434 Spatial domain 406 419 427 Speed reduction 365 Spherical 10 134 147 160 167 center 137 coordinates 35 60 63 Spot checking 394 395 Squirrelcage motor 344 Stability 314 Statespace control 316 Static force analysis 239 Static position error 297 Index 506 coefficient 306 Steady state error 296 304 306 311 314 gain 290 292 value 280 Step function 278 292 306 Stepper driver 358 motor 331 338 345 347 translator 358 Stereo imaging 395 458 Stereo vision 457 StewartGough platform 133 147 152 208 Stiffness 275 287 332 336 Strain gauge 387 Successive transformations 119 Switched reluctance motor 338 Symmetrical parallel robot 136 System dynamics 275 323 System type 311 t Tachometer 325 347 385 Tactile sensor 389390 Taylor series 322 Template matching 456 Tensor 233 Thickening 446 Thinness 451 Thirdorder polynomial 252 260 Threephase AC motor 338 Threshold 434 Thresholding 406 415 418 430 442 TIFF 405 Time constant 290 295 376 delay 395 of flight 393 response 292 Timetoamplitude converter TAC 395 Tool reference frame 12 Torque constant 340 342 detent 348 residual 348 sensors 388 Touch sensor 389390 Trace 232 234 238 495 Trajectory 90 247 262 Transfer function 285 296 298 324 closedloop 286 feedforward 286 288 first order 290 291 higher order 295 open loop 285 297299 second order 292 295 Transformation 46 91 combined 50 relative 52 Transpose 491495 Trapezoidal membership function 478 Triangular membership function 478 Triangulation 393395 Twist angle 73 83 u Ultrasonic 392 Underdamped 283 295 298 Union 444 Unipolar stepper motor 355 Unit vector 179 v Validity 13 Variability 13 Vector 38 492 Vectorloop method 206 Velocity error 298 Velocity sensor 385 Via point 251 259 260 Virtual reality 384 Virtual work 240 242 Viscosity 336 Viscous coefficient of friction 276 Voice coil 346 Voice recognition 396 Voice synthesis 397 Voltage divider 378 Voxel 404 424 Voyager 461 w Walking machine 370 Wheatstone bridge 387 Workspace 13 37 133 World reference frame 11 y Yaw 65 z Zener diode 357 Zero 294 Zeropole cancellation 311 zplane 320 ztransform 321 Index 507 WILEY END USER LICENSE AGREEMENT Go to wwwwileycomgoeula to access Wileys ebook EULA