Laser feedback control for robotics in aircraft assembly · Laser feedback control for robotics in...
Transcript of Laser feedback control for robotics in aircraft assembly · Laser feedback control for robotics in...
Laser feedback control for robotics in
aircraft assembly
Examensarbete utfort vid Produktionssystemi samarbete med Reglerteknik
vid Tekniska Hogskolan i Linkopingav
Albin Sunnanbo
Reg nr: LiTH-ISY-EX-3470-2003Linkoping 2003
Laser feedback control for robotics in
aircraft assembly
Examensarbete utfort vid Produktionssystemi samarbete med Reglerteknik
vid Tekniska Hogskolan i Linkopingav
Albin Sunnanbo
Reg nr: LiTH-ISY-EX-3470-2003
Supervisor: Henrik Kihlman
Erik Wernholt
Examiner: Mikael Norrlof
Linkoping 19th December 2003.
Avdelning, Institution Division, Department
Institutionen för systemteknik 581 83 LINKÖPING
Datum Date 2003-12-19
Språk Language
Rapporttyp Report category
ISBN
Svenska/Swedish X Engelska/English
Licentiatavhandling X Examensarbete
ISRN LITH-ISY-EX-3470-2003
C-uppsats D-uppsats
Serietitel och serienummer Title of series, numbering
ISSN
Övrig rapport ____
URL för elektronisk version http://www.ep.liu.se/exjobb/isy/2003/3470/
Titel Title
Laseråterkopplad styrning av robotar i flygplansmontering Laser feedback control for robotics in aircraft assembly
Författare Author
Albin Sunnanbo
Sammanfattning Abstract The aim of this thesis is to investigate how the absolute accuracy of an industrial robot can be increased by monitoring the position of the robot. The motive is to automate high precision, low volume production such as aircraft industry. A laser tracker that can measure both position and orientation with very high accuracy is used to monitor the robot tool position. The robot and laser tracker are integrated via a standard computer. The abilities and performance of the robot, with and without feedback from the laser tracker, are investigated. Robotic drilling is performed with supervision and control from the laser tracker. The system is implemented and tested on parts of a demonstrator for new aircraft assembly techniques. The ability to position components with internal friction to (+/-)0.05 mm absolute accuracy is shown.
Nyckelord Keyword Laser tracker, Leica LTD800, Robot, ABB IRB4400, Six degrees of freedom, Feedback controller, Robot drilling, High accuracy
Abstract
The aim of this thesis is to investigate how the absolute accuracy of an industrialrobot can be increased by monitoring the position of the robot. The motive is toautomate high precision, low volume production such as aircraft industry. A lasertracker that can measure both position and orientation with very high accuracy isused to monitor the robot tool position.
The robot and laser tracker are integrated via a standard computer.The abilities and performance of the robot, with and without feedback from
the laser tracker, are investigated. Robotic drilling is performed with supervisionand control from the laser tracker.
The system is implemented and tested on parts of a demonstrator for newaircraft assembly techniques.
The ability to position components with internal friction to ±50 µm absoluteaccuracy is shown.
Keywords: Laser tracker, Leica LTD800, Robot, ABB IRB4400, Six degrees offreedom, Feedback controller, Robot drilling, High accuracy
i
Preface
This master thesis was performed at Production systems at IKP, Linkopings uni-versitet during the autumn semester 2003.
This report is written in LATEX.
Acknowledgment
I would like to thank all the people that have helped and inspired me with thisthesis. First all the people at Production Systems for helping me see the big pictureand providing great friendship. Special thanks to my supervisor Henrik Kihlmanfor constantly providing new challenges and blue sky thinking.
My examiner Mikael Norrlof and my supervisor Erik Wernholt, both at the de-partment of Electrical Engineering, deserves great thanks for giving good academicreview of the thesis.
I would also like to thank my girlfriend, friends and family for enlighten mydays.
Finally I would like to thank the numerous people who found their ways to thelab and asked interesting questions.
iii
Notation
Glossary
Homogeneous transformation A 4 × 4 matrix that describes the position andorientation of an object or coordinate system,see Section 3.3.
IRB4400 The type of robot used. See Section 2.2.RAPID Program language used by the ABB S4 robot
controller to control the robot, see RAPID Ref-erensmanual [3].
Relation The distance and angle between two objects orcoordinate system. The relation is often ex-pressed as a homogeneous transformation.
Round Trip Time The time it take for a signal to go from senderto receiver and then back to the sender again ina communication setup. Abbreviated RTT.
S4Cplus The type of robot controller used. See Sec-tion 2.2.1.
Tool Center Point 0 The position on the robot where the current toolis mounted. This is the robot position when notool is mounted.
XML eXtensible Markup Language, a general purposedescription language
v
vi
Abbreviations
3D the same as 3DOF3DOF 3 Degrees Of Freedom (translation if nothing else specified)6D the same as 6DOF6DOF 6 Degrees Of Freedom (3 translation and 3 rotation)MP Measure PointRTT Round Trip Time, see glossarySDK Software Development KitTBR Tooling Ball Reflector, a special type of reflectorTCP0 Tool Center Point 0, see glossary
Symbols
◦ Degree′ Minute of arc. 1′ = 1
60
◦
′′ Second of arc. 1′′ = 1′
60= 1
3600
◦
‖ · ‖ Matrix norm, if nothing else is specified the ‖ · ‖2 norm is usedT A
B A Transformation between location A and location B is denoted with T ,see Chapter 3
c(α) When lack of space cos(α) is concatenateds(α) When lack of space sin(α) is concatenated
Contents
1 Introduction 1
1.1 Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 11.1.1 The use of robots . . . . . . . . . . . . . . . . . . . . . . . . . 11.1.2 The ADFAST project . . . . . . . . . . . . . . . . . . . . . . 2
1.2 Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.3 Previous work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21.4 Thesis Outline . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2
2 System description 3
2.1 Leica LTD800 laser tracker . . . . . . . . . . . . . . . . . . . . . . . 42.1.1 Ball prism . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.2 6DOF Reflector . . . . . . . . . . . . . . . . . . . . . . . . . . 42.1.3 emScon . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5
2.2 ABB IRB4400 Robot . . . . . . . . . . . . . . . . . . . . . . . . . . . 52.2.1 S4Cplus controller . . . . . . . . . . . . . . . . . . . . . . . . 62.2.2 WebWare SDK . . . . . . . . . . . . . . . . . . . . . . . . . . 6
2.3 ART modules . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.4 Drilling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7
3 Mathematics 9
3.1 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 93.2 Rotation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9
3.2.1 Rotation matrices, R . . . . . . . . . . . . . . . . . . . . . . . 103.2.2 Quaternions . . . . . . . . . . . . . . . . . . . . . . . . . . . . 103.2.3 Euler Z’Y’X’ angles and fixed XYZ axes angles . . . . . . . . 113.2.4 Transformations . . . . . . . . . . . . . . . . . . . . . . . . . 123.2.5 Mean values of rotations . . . . . . . . . . . . . . . . . . . . . 13
3.3 Homogeneous transformations . . . . . . . . . . . . . . . . . . . . . . 14
4 Error compensation 17
4.1 Background and assumptions . . . . . . . . . . . . . . . . . . . . . . 174.2 Translation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 184.3 Orientation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19
vii
viii Contents
4.4 Homogeneous transformation . . . . . . . . . . . . . . . . . . . . . . 204.5 Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20
4.5.1 Stability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 214.6 Termination criteria . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
5 System analysis 23
5.1 The ABB IRB4400 Robot . . . . . . . . . . . . . . . . . . . . . . . . 235.1.1 Mechanical manipulator . . . . . . . . . . . . . . . . . . . . . 235.1.2 Computer network . . . . . . . . . . . . . . . . . . . . . . . . 285.1.3 S4Cplus controller . . . . . . . . . . . . . . . . . . . . . . . . 285.1.4 WebWare SDK . . . . . . . . . . . . . . . . . . . . . . . . . . 315.1.5 Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31
5.2 The Leica LTD800 laser tracker . . . . . . . . . . . . . . . . . . . . . 315.2.1 Alternatives . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32
5.3 Master controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 33
6 System calibration 35
6.1 Tracker to Robot base and TCP0 to reflector . . . . . . . . . . . . . 356.1.1 Method for cooptimization of T Tr
Rob and T TCP0Refl . . . . . . . . 36
6.1.2 Other methods . . . . . . . . . . . . . . . . . . . . . . . . . . 386.2 Tip of drilling machine . . . . . . . . . . . . . . . . . . . . . . . . . . 39
6.2.1 Measurement of T TrBushing . . . . . . . . . . . . . . . . . . . . 40
6.3 Location of drill frame . . . . . . . . . . . . . . . . . . . . . . . . . . 416.4 Location of robot chuck . . . . . . . . . . . . . . . . . . . . . . . . . 43
7 System integration 45
7.1 Connection to robot controller . . . . . . . . . . . . . . . . . . . . . 457.1.1 Ordinary program flow . . . . . . . . . . . . . . . . . . . . . . 457.1.2 Extraordinary program flow . . . . . . . . . . . . . . . . . . . 467.1.3 Emulating a discrete controller . . . . . . . . . . . . . . . . . 46
7.2 Connection to laser tracker controller . . . . . . . . . . . . . . . . . . 467.3 CAD-system integration . . . . . . . . . . . . . . . . . . . . . . . . . 47
8 Results 49
8.1 System calibration . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498.2 Module positioning . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498.3 Drilling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 498.4 Process automation and CAD integration . . . . . . . . . . . . . . . 51
9 Conclusion 55
9.1 Further work . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 559.2 Industrial implementation . . . . . . . . . . . . . . . . . . . . . . . . 55
A Controlling RAPID program 59
B Robot model in Matlab Robotics Toolbox 63
Chapter 1
Introduction
This thesis presents a method for increasing the accuracy of an industrial robotby integrating a high accuracy measurement system in a feedback control loop.The performance of the system is evaluated on reconfiguring of ART modules androbotic drilling.
1.1 Background
Today robots are used for automation of high volume production, e.g. car indus-try. To achieve high enough accuracy for most manufacturing processes the robotprocess must be calibrated by hand. This takes long time and is not suitable forshort series production. This thesis will treat the issue of increasing the accuracyof the robot so the calibration is not needed.
In manufacturing today large jigs are used for fastening the product in. Thosejigs have to be constructed with very high precision for each part in a product. Ifa product changes the jig has to be rebuild. To lower costs the ADFAST projectis developing affordable reconfigurable jigs. The jigs are to be reconfigured by arobot in combination with a high accuracy measurement system. The jigs must bereconfigured with the same precision as the traditional fixed jigs are manufactured.
1.1.1 The use of robots
Today robots are mostly used in large volume manufacturing applications, such ascar industry. The programming of robots is a time consuming work and thus notaffordable in low volume production.
An industrial robot of today has an absolute accuracy of ca. ±1 mm which isoften too low for use without manual calibration for each operation.
1
2 Introduction
1.1.2 The ADFAST project
This thesis project is a part of the ADFAST project [4]. ADFAST stands for“Automation for Drilling, Fastening, Assembly, Systems Integration and Tooling”.It is part of the EU 5th framework, mainly directed toward developing automatedmethods for air craft manufacturing.
1.2 Objectives
The objective in this thesis is analysis of the feasibility of using a laser trackerin a feedback control loop to increase the accuracy of the industrial robot. Theincreased accuracy is to be evaluated on different processes.
Four topics are of special interest to investigate.
• Reached absolute accuracy, both without loads and with hanging loads andfriction loads
• Speed in continuous mode, where the robot is compensated continuously tostay within the necessary accuracy
• Dynamic load handling, where the robot is adjusted throughout a drillingcycle to assure the correct tolerance of the hole
• Participate in the implementation of a physical demonstrator being built inthe robotic lab of Linkopings universitet
1.3 Previous work
Kihlman and Loser [10] presents preliminary tests of controlling the robot via theLeica laser tracker. Seyed-Aghamiri [13] has investigated suitable methods andequipment needed for the reconfiguring of the ART modules. Also preliminarywork on connecting the robot and laser tracker was done.
1.4 Thesis Outline
In Chapter 2 the equipment and components in the thesis are presented. In Chap-ter 3 the mathematics needed for understanding the details are brought forward.In Chapter 4 the problem of adjusting the robot is treated from a theoretical pointof view. In Chapter 5 the performance of the equipment and components are an-alyzed. In Chapter 6 the methods for calibrating the system are presented. InChapter 7 it is shown how the different subsystems are connected. In Chapter 8the results are presented. In Chapter 9 a summary and conclusion is presented.
Chapter 2
System description
The system is built from a PC computer that connects to an ABB robot and aLeica laser tracker. The PC, which will be referred to as Master Controller, isrunning Microsoft Windows 2000. A Visual Basic program connects to the robotand laser tracker via a computer network. The Visual Basic program runs a controlalgorithm that controls the robot with information from the laser tracker and areference value. In figure 2.1 the schematic connections are shown.
Figure 2.1. Robot and Tracker integration
3
4 System description
Figure 2.2. Leica LTD800 with T-cam
2.1 Leica LTD800 laser tracker
The LDT800 tracker, see Figure 2.2, is an upcoming product from Leica GeosystemsThe tracker can measure the location of a special reflector with laser interferometrywith high accuracy and speed. With the new T-cam the tracker can also measurethe orientation of the reflector by analyzing the projection of IR-diodes on thereflector.
2.1.1 Ball prism
For measuring 3DOF coordinates a ball prism is used, see Figure 2.3. The termprism is not correct for the 1.5 inch ball since it technically is a Cat’s eye reflector,but the term prism will be used anyway in this report. The diameter of the prismis 1.5 inch, that is 38.1 mm. The origin, the point that is measured, is located inthe center of the sphere, 19.05 mm from the contact point of the measured surface.
2.1.2 6DOF Reflector
To measure 6DOF coordinates a customized 6DOF reflector is used. The 6DOFreflector can be used at up to ±40◦ angle from the tracker. A laser reflector isused for measuring the distance. 10 IR diodes are used to identify the orientation.The origin is located inside the laser reflector on the 6DOF reflector according toFigure 2.4.
2.2 ABB IRB4400 Robot 5
Figure 2.3. 1/2 inch TBR reflector and 1.5 inch Cat’s eye
(a) Photo (b) Drawing
Figure 2.4. Customized 6DOF reflector with its coordinate system
2.1.3 emScon
emScon is a computer program from Leica that communicates with the lasertracker. emScon is implemented as a COM-object that can be integrated in aC++ or Visual Basic application. With the emScon object a computer programcan start and stop measurements with the laser tracker, receive streamed measure-ments and change operation parameters.
2.2 ABB IRB4400 Robot
The robot used is an ABB IRB4400, see Figure 2.5(a). The IRB4400 is an ordinaryindustrial robot with good precision and high speed.
The robot is equipped with an automatic Capto chuck, see Figure 2.5(b), wherethe 6DOF reflector or a tool can be mounted, the Capto interface can be seen inFigure 2.6(c) . The chuck can also be used for docking with the ART modules, see
6 System description
(a) The ABB IRB4400robot
(b) Robot chuck
Figure 2.5. Robot and chuck
Section 2.3. On each side of the chuck a Capto male interface is located where the6DOF reflector can be fastened when the chuck is occupied.
2.2.1 S4Cplus controller
The S4Cplus controller from ABB is a standard robot controller. The controller hasa built in programming language called RAPID, see RAPID Reference manual [3]for details. The controller is equipped with an ethernet interface for fast externalcommunication. Electrical and pneumatic connections can be controlled from theS4Cplus controller.
2.2.2 WebWare SDK
WebWare SDK is a computer program from ABB that communicates with theS4Cplus controller. WebWare is implemented as an ActiveX control that can beintegrated in a C++ or Visual Basic application. With the WebWare ActiveXcontrol a computer program on a network connected computer can manipulateRAPID program execution, RAPID variable data and I/O-signals on the S4Cpluscontroller.
2.3 ART modules
One task of the ADFAST project is to develop so called ART1 modules, see Fig-ure 2.6. The modules are movable in 6DOF. They can be locked in arbitrarilypositions, but have no internal driving. Instead the modules are to be movedby the robot. On the modules, Capto r© interfaces from Sandvik Coromant are
1Affordable Reconfigurable Tooling
2.4 Drilling 7
Capto
(a) Hexapod (b) Pogostick (c) Capto r© interface,male part
Figure 2.6. ART modules and Capto interface
Figure 2.7. Self feeding drilling machine with bushing
mounted, see Figure 2.6(c). The Capto interfaces are used for mounting pickupunits and docking with the robot.
2.4 Drilling
Some drilling experiments were done. The drilling machine in Figure 2.7 is a selffeeding pneumatic machine. The machine is equipped with pneumatic control ofthe feeding. A Capto interface is mounted on the machine to enable easy mountingin the robot chuck.
The drilling was made in 3 mm aluminum plates. The plates were fastened ina frame with fastening clamps , see Figure 2.8. The frame is movable, but a Captointerface can be used for locating the frame if moved.
Chapter 3
Mathematics
In this chapter the mathematics needed to understand this thesis is presented andexplained.
The location of an object in space has 6 degrees of freedom, 6DOF. First theposition in a right handed Cartesian coordinate system (x, y, z)T and then rotation
about the coordinate axes (γ, β, α)T. The location of an object is usually visualized
as a coordinate system attached to the object. This fact makes it possible totreat the location of an object as a transformation from one coordinate system toanother. A transformation from coordinate system A to B will be denoted T A
B .This transformation makes the following relation hold: A = T A
B B.A location is both the position and orientation of a coordinate system. In
Figure 3.1 B is a location described in the coordinate system A.
3.1 Translation
All translations are in a given coordinate system. A translation v is a vector withthree components
v =
xyz
(3.1)
The vector v can also be a part of a homogeneous transformation, see (3.23).Translation of a vector A with the vector v is a vector addition A + v.
3.2 Rotation
There are many different ways to represent and calculate rotations. Each repre-sentation has its own benefits and drawbacks. No representation can be said tobe better than all other in every situation. Here a selection of representations aredescribed.
9
10 Mathematics
X
Y
Z
B
X
YZ
A
Figure 3.1. Location B described in coordinate system A
3.2.1 Rotation matrices, R
Rotation matrices are introduced in every course on the topic linear algebra. Theyare easy to calculate with and have a lot of nice properties that mathematiciansare fond of. The matrix can be parametrized by three numbers (γ, β, α). Rota-tion matrices are length preserving on multiplication. All rotation matrices areorthonormal and thus have the following property
R−1 = RT (3.2)
that can be used to save computational resources. Remember that multiplicationis not commutative, that is AB 6= BA in the general case. ABv is a vector v firstrotated by B and then by A. When referring to the individual elements of thematrix the indices
R =
r11 r12 r13
r21 r22 r23
r31 r32 r33
(3.3)
are used.
3.2.2 Quaternions
A quaternion is a four dimensional vector. If the length of the quaternion is 1 itcan be used to described rotations according to Craig [6].
Note that element 4 in Craig is called element 0 in this thesis according toTable 3.1. This is because ABB uses the latter notation.
3.2 Rotation 11
Table 3.1. Numbering of quaternions, ε is Craig notation and q is the notation in thisthesis.
q0 = ε4
q1 = ε1
q2 = ε2
q3 = ε3
Table 3.2. Quaternion definition.
q0 = cos
(
θ
2
)
q1 = x sin
(
θ
2
)
q2 = y sin
(
θ
2
)
q3 = z sin
(
θ
2
)
If the quaternion has unit length the quaternion can represent a rotation. Thenthe elements in the quaternion are interpreted as in Table 3.2, where (x, y, z) is avector of length one about which the rotation take place with the angle θ.
3.2.3 Euler Z’Y’X’ angles and fixed XYZ axes angles
Rotations can be described as rotation along the coordinate axes one after eachother. There are two main philosophies regarding this. Fixed axes angle systemsand Euler angle systems1. In a fixed axes angle system the coordinate axes arefixed in space and the object to rotate is rotated about the axes one at a time.When describing Euler angle systems the coordinate system follows the rotatedsystem. I.e. if a system first is rotated around the x axis and then around they axis the second rotation is around the now tilted y axis. Euler angles whichwill be used mostly in this work, is denoted with a dash after each rotation axis.Z ′Y ′X ′ means an Euler angle system first rotated about the z axis, then about thenew y axis and finally about the (now twice rotated) x axis. Fixed angle systemsare denoted without dashes. XY Z represents a rotation about the original x, y
1In some literature the term Euler angle system are used also for fixed axes angle systems
12 Mathematics
and z-axes in that order. According to Craig [6, eq 2.64, 2.71] Euler Z ′Y ′X ′ andfixed angle XY Z systems are representing the same rotation. This result is notobvious but can be proved by simply calculate the rotation matrices.
In Table 3.3 a mapping between different notations of the rotational axes arepresented.
Table 3.3. Notations for rotational axes
α = Roll = Rotation about zβ = Pitch = Rotation about yγ = Yaw = Rotation about x
3.2.4 Transformations
When integrating systems with different representations of rotation, convertingbetween them are necessary. To convert between Euler angles and quaternionsconvert via rotation matrices.
EulerZYX to R
This conversion is from Craig [6, eq 2.64].
RZ′Y ′X′ (α, β, γ) = . . .0
B
B
@
c(α)c(β) −s(α)c(γ) + c(α)s(β)s(γ) s(α)s(γ) + c(α)s(β)c(γ)
s(α)c(β) c(α)c(γ) + s(α)s(β)s(γ) −c(α)s(γ) + s(α)s(β)c(γ)
−s(β) c(β)s(γ) c(β)c(γ)
1
C
C
A
(3.4)
Where c(θ) is a short form for cos(θ) and s(θ) is a short form for sin(θ).
R to EulerZYX
This conversion is from Craig [6, eq 2.66-2.68]. Note that arctan2(y, x) is arctan( xy)
but with signs for both x and y. arctan2 is also called four quadrant arctan becausethe resulting angle can be in any of the four quadrants of a circle, 0 ≤ arctan2 ≤ 2π.
β = arctan2
(
−r31,√
r211 + r2
21
)
(3.5)
α = arctan2
(
r21
cos(β),
r11
cos(β)
)
(3.6)
γ = arctan2
(
r32
cos(β),
r33
cos(β)
)
(3.7)
Where rij is an element in (3.4) numbered as in (3.3).
3.2 Rotation 13
If β = π2
then the solution must be calculated as follows.
β =π
2(3.8)
α = 0 (3.9)
γ = arctan2 (r12, r22) (3.10)
If β = −π2
then the solution must be calculated as follows.
β = −π
2(3.11)
α = 0 (3.12)
γ = − arctan2 (r12, r22) (3.13)
Quaternion to R
This conversion is from Craig [6, eq 2.91].
R =
1 − 2q22 − 2q2
3 2 (q1q2 − q3q0) 2 (q1q3 + q2q0)2 (q1q2 + q3q0) 1 − 2q2
1 − 2q23 2 (q2q3 − q1q0)
2 (q1q3 − q2q0) 2 (q2q3 + q1q0) 1 − 2q21 − 2q2
2
(3.14)
R to Quaternion
θ = arccos
(
r11 + r22 + r33 − 1
2
)
(3.15)
q0 = cos
(
θ
2
)
(3.16)
q1 =r32 − r23
4q0
(3.17)
q2 =r13 − r31
4q0
(3.18)
q3 =r21 − r12
4q0
(3.19)
(3.20)
To get (3.15) and (3.16) Craig [6, eq 2.81] is combined with Craig [6, eq 2.89]and Table 3.1.
3.2.5 Mean values of rotations
Because of the non linear properties of rotations a mean value is not a simple addand divide by n operation. When the angle between two rotations is 180◦, thatis pointing in opposite directions, an infinite number of solutions exists. One way
14 Mathematics
Figure 3.2. Slerp illustrated, qA and qB are quaternions
to calculate the mean value is to use spherical linear interpolation of quaternions,called slerp, see the command quaternion/qinterp in Robotics Toolbox [5]. Slerpis defined in (3.21) and (3.22) and is a function that rotates qA to qB along a circularpath as t moves from 0 to 1 according to Figure 3.2.
slerp(qA, qB , t) =qA sin ((1 − t) θ) + qB sin (tθ)
sin θ,
0 ≤ t ≤ 10 < θ < π
(3.21)
θ = arccos
qA0
qA1
qA2
qA3
•
qB0
qB1
qB2
qB3
(3.22)
To take a mean value of qA and qB calculate the value of slerp(
qA, qB , 1/2)
.
To take a weighted mean value, like (1 − t)A + tB, use slerp(
qA, qB , t)
. Slerp isimplemented in the Matlab command qinterp in Robotics Toolbox.
3.3 Homogeneous transformations
To describe both rotation and translation simultaneously 4×4 homogeneous trans-formations are used. A homogeneous transformation consists of a rotation matrix,a positional vector and a row (0, 0, 0, 1) as
T AB =
r11 r12 r13 xr21 r22 r23 yr31 r32 r33 z0 0 0 1
(3.23)
When ordered in such a way ordinary matrix multiplication is equivalent withfirst rotating with the rotation matrix and then translate with the vector (x, y, z)T .
3.3 Homogeneous transformations 15
Homogeneous transformations can be inverted and then represents the inverse
transformation:(
T AB
)−1= T B
A . This makes the following equations equivalent
A = T AB B ⇔ B =
(
T AB
)−1A ⇔ B = T B
A A (3.24)
where A and B both are either homogeneous transforms or position vectors (x, y, z, 1)T .A homogeneous transformation can be parametrized into a 6-element vector (x, y, z, γ, β, α)where (γ, β, α) is the parametrization of the rotation matrix.
Chapter 4
Error compensation
This chapter describes the laser feedback control method developed for improvingthe absolute accuracy of the robot.
The robot itself is not capable of reaching the absolute accuracy required foraircraft assembly by only using the internal control system of the robot. Butsince the relative accuracy is better than the allowed tolerances the robot can beadjusted until the absolute accuracy is good enough. Whether adjustment is madecontinuously or only at distinct time events is not important. All measurementsmust be in the same coordinate system and be synchronized.
First the compensation method is described for translation and rotation sepa-rately, then it is shown how they can be described together with a homogeneoustransformation.
4.1 Background and assumptions
The reference value for the end effector of a robot is called location B (the refer-ence value in tracker coordinate system) in Figure 4.1. The current position andorientation of the robot’s end effector is measured with the laser tracker and themeasured location is called L. L is assumed to be correct measured1.
The robot reports that the end effector is in the location R. The robot isassumed to be able to do accurate relative movements from R. The goal is to makeL to be as close to B as possible. The goal is achieved by instructing the robot togo to a new position S (steer point). V is the error of the robot location.
1The laser tracker is the most accurate measure tool the project possesses
17
18 Error compensation
Reference value
Measured value
L
R
S
B
V
Figure 4.1. Robot and laser tracker. Definition of B, L, R, S and V .
4.2 Translation
For a location P the position is denoted as
Definition 4.1 A point is the position part of a location P .
The point is denoted P.pos =
Px
Py
Pz
The difference between L.pos and B.pos is a vector
V.pos = B.pos − L.pos =
Bx
By
Bz
−
Lx
Ly
Lz
(4.1)
V.pos is the error in the position. In Figure 4.1 it can be seen that the differencebetween the current robot position, R, and the new steer point, S, is
V.pos = S.pos − R.pos =
Sx
Sy
Sz
−
Rx
Ry
Rz
(4.2)
4.3 Orientation 19
(4.1) and (4.2) are combined to solve S.pos
V.pos = V.pos
⇔
S.pos − R.pos = B.pos − L.pos
⇔
S.pos = B.pos − L.pos + R.pos (4.3)
⇔
Sx
Sy
Sz
=
Bx
By
Bz
−
Lx
Ly
Lz
+
Rx
Ry
Rz
(4.4)
4.3 Orientation
The concept of compensating deviations in orientation is the same as for compen-sating position with the conceptual difference that all vectors are replaced withorientations. V.rot should be viewed as a rotation but R.rot, S.rot, L.rot andB.rot should be viewed as orientations.
First some notation: Rotations are in this context represented as rotationalmatrices. The calculations are depending on the use of rotational matrices. Allother representations of orientations must be transformed into rotation matrices inadvance. A vector v1 is rotated with V1 into the vector v2 by the equation
v2 = V1 · v1 (4.5)
To turn v2 into v3 with V2 the equation
v3 = V2 · v2 (4.6)
is used. It can be seen that v3 = V2 · V1 · v1 and V21 = V2 · V1 is a rotation thatfirst rotates V1 and then V2.
For a location P the orientation is denoted as
Definition 4.2 An orientation is the rotational part of a location P and is de-
noted
P.orient =
P11 P12 P13
P21 P22 P23
P31 P32 P33
(4.7)
The given orientations are L.orient, B.orient and R.orient. The goal is to solveS.orient.
The rotation V.orient is the rotation that turns L.orient to B.orient, as
B.orient = V · L.orient (4.8)
To getV = B.orient · (L.orient)−1 = B.orient · (L.orient)T (4.9)
20 Error compensation
(4.8) is multiplied with L.orient−1 from the right.
With the same reasoning as with position, V.orient is applied on R.orient toget S.orient as
S.orient = V · R.orient = B.orient · (L.orient)T· R.orient (4.10)
4.4 Homogeneous transformation
The outline is the same as for orientation, but here 4 × 4 homogeneous transfor-mations are used. In
V = B L−1 (4.11)
the transformation V is the “difference” between the current and desired position.The new position S to give to the robot is calculated as
S = V R = B L−1 R (4.12)
4.5 Controller
The implemented controller compensate the location of the robot at discrete timesfor reasons described in Section 7.1. Together with the internal controller in theS4Cplus the error compensation controller is a cascade connected system.
In Figure 4.2 the controller model is shown. f is an internal model of the robotin the S4Cplus control system, the input is the reference value sent to the S4Cpluscontroller by the master controller and the output is the position sent back. n is theactual deviations from the model. The deviations are noise in the measurements,backlash, nonlinearities in the robot coordinate system as in Figure 5.3, vibrationsand other dynamic effects in the construction. r is the reference value for themaster controller. K is an amplification that is 1. 1
zis a delay until the next
iteration in the control loop.
Figure 4.2. Controller model
4.6 Termination criteria 21
Figure 4.3. Simplified controller model
4.5.1 Stability
An important property of a controller is stability. To analyze stability first theamplification of each block is analyzed. The S4Cplus controller in the f -block willmake its internal model equal to the incoming value before the RAPID-programsignals back to the master controller. The output from the f -block becomes equalto the input of the f -block. The block can then be substituted with a constantamplification of 1.
The box G can be written as a block with the system function
G =1
z − 1(4.13)
The controller model can then be written as in Figure 4.3. n is the deviationbetween the state of the internal robot model and the location measured by the lasertracker. n is partially depending on yrob internal, but has a bound of approximately±2 mm. Because n is bounded n does not affect stability, but if n does not convergeto a constant the controller may not reach the desired accuracy. The closed loopsystem from r to ylaser becomes
Gc =K
z − 1 + K(4.14)
and the criteria for stability is that Gc has all poles inside the unit circle, |z| =|1 − K| < 1. The controller is stable for 0 < K < 2. Thus the used controller withK = 1 is stable.
4.6 Termination criteria
The transformation V in (4.11) can be seen as the error in the robot location. Whenthe robot is adjusted towards the desired position, the requirements are defined onV . There are two different requirements, positional accuracy ap and rotationalaccuracy ar. Typical values are ap = 0.05 mm and ar = 0.0005 rad ≈ 0.03◦.The positional accuracy is compared with the positional error εp in (4.15). The
22 Error compensation
rotational accuracy is compared with the rotational error εr in (4.16).
εp = ‖V.pos‖ (4.15)
εr = Vθ = 2 arccos (V.q0) (4.16)
In (4.16) θ is the angle part of the quaternion equivalent with V.orient. To convertbetween quaternions and rotational matrices see Section 3.2.4.
If εp > ap or εr > ar the robot is not within the required accuracy. In such casethe adjustment process must be repeated until the required accuracy is met.
Chapter 5
System analysis
In this chapter the subsystems are analyzed and stressed to find limitations andbottlenecks.
5.1 The ABB IRB4400 Robot
A robot is a complicated mixture of several types of systems, the mechanical ma-nipulator, the electronic controller and in this case a computer network. Thoseparts have been broken down and analyzed separately in following sections.
5.1.1 Mechanical manipulator
The manipulator of the IRB4400 robot has an almost open kinematic structure.That is a link i is connected to i−1 in one end and i+1 in the other end. The onlyexception is a static connection between link 2 and link 3. The position of a link iis depending on the position of all links j where 1 ≤ j ≤ i − 1. This constructionmakes the robot able to reach into narrow structures but makes it less stiff than arobot with closed kinematic loops. The working range of the IRB4400 is shown inFigure 5.1.
The mechanical links and joints are quite stiff, but bends slightly and backlasheswhen put under load. When the end effector of the robot is under load the robotcontroller is not aware of the position and movements of the end effector, but haveto rely on its internal model of the robot. Several methods for measuring the headof the robot has been proposed, e.g. accelerometers as used in Iterative LearningControl, Gunnarsson et al. [8] and Hovland et al. [9]. They have different weak-nesses, ILC today is not compensating in real time, but in an off line calibrationprocess.
The servos have very good precision and resolution. When the robot is loadedwith static forces relative motions of ca 5 µm can be performed. This assumesthat the last movement of the robot was in the same direction. If the robot moves
23
24 System analysis
Figure 5.1. Working range of the ABB IRB4400/60 from [2]
in another direction backlash can occur and the robot will not move as much asspecified. The robot will however not1 move more than the specified distance.
Linear movements
The ability of the robot to follow a straight line was tested. A MoveL commandmade the robot move from (1000, 1000, 1600) mm to (1000,−1000, 1600) mm ac-cording to Figure 5.2. The movement was measured with the Laser Tracker and themeasurements was transformed into the position of TCP0 in robot base coordinate
1In rare cases when friction and gravity cancel each other out this is not true
5.1 The ABB IRB4400 Robot 25
Figure 5.2. The linear movement of the robot
system. The mean value and slope of the x- and z-axes are subtracted with theMatlab command detrend. Figure 5.3 shows the deviation from an ideal line in x-and z-axes as function of the y-position.
The step in the x-position of 0.1 mm at y ≈ 0 clearly shows the backlash whenjoint 2 changes from contraction to extending direction. The z-position variesabout 0.6 mm with the radial distance from the middle of the robot to the endeffector. The main cause of this can be referred to gravity. When the end effectormoves further away from the center, gravity causes increasing torque on the jointsand mounting.
Backlash
As seen in the analysis of linear movement backlash can occur. To analyze thebacklash the robot was moved according to a special program, see Figure 5.4. Theprogram was run for each axis one at a time.
26 System analysis
−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−5
−4
−3
−2
−1
0
1
2
3
4x 10−4
y−position [m]
Dev
iatio
n [m
]
Straight line, 100 mm/s
xz
Figure 5.3. Robot motion along a straight line, 100mm/s
The idea is to first move the axis to the zero position from positive direction toensure repeatability. Then small steps (0.01◦) is taken in one direction, and thenthe same number of steps back. This is to test repetitiveness in relative motionwhen going in the same direction. Then steps of increasing sizes are taken, butreturning to zero between each step. This is done to find how much backlash itis when the joint is changing direction. The location of the TCP0 in robot basecoordinate system
(
T RobTCP0
)
was measured with the laser tracker.An irb4400 robot model, see Appendix B, was constructed and verified in
robotics toolbox. The ikine command in Robotics Toolbox was used to trans-form the homogeneous transformation into the corresponding joint angles for theIRB4400 robot. The measured angles were compared with the reference value foreach axis.
In Figure 5.5 the measured angles for axis 1 are compared with the referencevalues. It can be seen that the difference between the reference value and themeasured value goes up when the axis turns toward + and down when the axis
5.1 The ABB IRB4400 Robot 27
0 10 20 30 40 50 600
0.1
0.2
0.3
0.4
0.5
0.6
0.7
0.8
0.9
1Program steps for one axis
Step no.
angl
e [o ]
Figure 5.4. Reference values for axis movements
0 20 40 60 80 100 1200.091
0.092
0.093
0.094
0.095
0.096
0.097
0.098
0.099
0.1
0.101Play Axis 1
Step no.
angl
e [o ]
Figure 5.5. Backlash in axis 1, difference between measurment and reference
turns toward −. The backlash is quite constant and not depending on the amountmoved before changing direction. The difference between the mean value of theupper points and the mean value of the lower points is 0.0075◦.
Due to gravity effects no reliable results could be produced for axis 2 to 6.
28 System analysis
5.1.2 Computer network
The connection between the main controller, the ABB S4Cplus controller and theemScon server is made over the public IKP2 network. In Table 5.1 results from aPING3-test is shown. The tests are done from a UNIX4 computer on the universitynetwork to the S4Cplus controller. Empirical test show that the delays in thenetwork are small and are not a bottleneck in the current setup.
Table 5.1. Ping to robot controller
----130.236.##.### PING Statistics----
37 packets transmitted, 37 packets received, 0% packet loss
round-trip (ms) min/avg/max = 0/0/4
5.1.3 S4Cplus controller
The controller has an internal dynamic model of the mechanical unit. The modelstate is recalculated continuously to follow a reference value. The model outputsreference values for all 6 joints. Internal PID controllers for each joint adjust thecurrent that drives the servos to reflect the output from the model.
The time it takes for the controller to process commands sent to it via the net-work is important. It adds to the round trip time, that is reducing system band-width. The response time has been measured in two different situations. Readingthe current position of the robot with the WebWare function S4ProgramVariableRead
with an S4RobTarget variable was performed 100 times after each other. A mea-surement was not started before the previous request had returned. The time foreach request to complete was measured. The result is shown in Figure 5.6 and asummary is shown in Table 5.2.
Testing of write speed was performed with the same process as for testing ofread speed with the difference that the S4ProgramVariableRead call was replaced
2Ordinary 100 Mbit switched ethernet3A computer program for measuring the time it takes for a data packet to travel across the
network4The PING utility on the main controller computer could not measure times below 10 ms
Table 5.2. Summary WebWare read
Mean value 9.1 msMin value 0 msMax value 58.6 ms
Most values 0 ms < t < 12 ms
5.1 The ABB IRB4400 Robot 29
0 10 20 30 40 50 60 70 80 90 1000
10
20
30
40
50
60Read time from IRB 4400 via WebWare
Rou
nd tr
ip ti
me
[ms]
Figure 5.6. WebWare read
Table 5.3. Summary WebWare write
Mean value 4.8 msMin value 0.0 msMax value 11.7 ms
Most values 0 ms < t < 12 ms
with a S4ProgramVariableWrite call with a S4RobTarget variable as parameter.The result is shown in Figure 5.7 and a summary is shown in Table 5.3.
To test the reaction of doing some processing on the S4Cplus controller be-fore returning the result the read test was performed once more. This time theS4ProgramVariableRead call was replaced by a call to S4CurrentPositionGet.This reads the current position of the robot instead of a variable. The result isshown in Figure 5.8 and a summary is shown in Table 5.4. The processing on theS4Cplus controller adds a delay of about 20 ms to the round trip time, RTT.
There are some things to note about these tests. The influence from the com-puter network is small according to Section 5.1.2, hence the delays are either in theWebWare Server on the main controller computer or in the S4Cplus controller. Theincreasing response time when processing is done on the S4Cplus controller leads tothe conclusion that the S4Cplus controller is the bottleneck in the communication.
The programming language of the controller is adapted to run predefined pro-grams with interaction with the environment only at a limited rate and extension,see Section 7.1. One effect of this is that the robot can not be controlled directly
30 System analysis
0 10 20 30 40 50 60 70 80 90 1000
2
4
6
8
10
12Write time to IRB 4400 via WebWare
Rou
nd tr
ip ti
me
[ms]
Figure 5.7. WebWare write
Table 5.4. Summary WebWare read current position
Mean value 24.7 msMin value 7.8 msMax value 50.8 ms
Most values 20 ms < t < 30 ms
0 10 20 30 40 50 60 70 80 90 1005
10
15
20
25
30
35
40
45
50
55Read time from IRB 4400 via WebWare, including function call on robot
Rou
nd tr
ip ti
me
[ms]
Figure 5.8. WebWare read current position
5.2 The Leica LTD800 laser tracker 31
from WebWare, but indirectly via control variables in a RAPID program. Ac-cording to Section 7.1.3 a discrete controller can be emulated, but not with goodperformance.
Both the processing delays of commands and the lack of continuous controllinglowers the bandwidth of the control loop. The bandwidth is about 3 Hz which doesnot allow for dynamic load compensation, e.g. the operating of a drilling machine.
5.1.4 WebWare SDK
WebWare SDK provides a good interface with a high level of abstraction. WebWareSDK is fast and easy to develop with. There are no good methods for manipulatingthe motion of the robot, but that is due to limitations in the S4Cplus controller.
5.1.5 Alternatives
The ABB IRB4400 is one of the more accurate conventional robots from ABB.There are some new robots with higher stiffness and accuracy, e.g. IRB940 whichclaims to have an absolute accuracy of approximately 0.2 mm, see IRB940 Datasheet [1]. No robot on the market was found with 0.1 mm absolute accuracy withvarying loads. Hence the need for external measurement control is justified.
The communication speed of the S4Cplus controller as well as the limited in-teraction is a limiting factor. For the ABB robots there are no faster controllersavailable, but according to Nilsson and Johansson [11] modifications can be madeto bypass the slow update of the reference signal. Such modification would berequired for improved performance.
5.2 The Leica LTD800 laser tracker
For measuring the position of the end effector of the robot the LTD800 laser trackerfrom Leica is used.
The performance of the laser tracker is specified in Table 5.5. The typicaldistance from the reflector origin to the object of interest (e.g. pickup) is below100 mm. On 100 mm distance the angular accuracy of the laser tracker corre-sponds to a translation accuracy of ±35 µm. On 4 m distance from the tracker thepositional error is ±40 µm which gives a total error of ±75 µm on the object ofinterest.
To study the quality of the measurements from the laser tracker the 6DOFreflector was firmly fastened on four meters distance from the tracker. On thisdistance the absolute accuracy is specified to be ±40 µm. The position of thereflector was measured with a continuous 6DOF measurement. The sample rateused was 100 Hz. Figure 5.9 shows that the variation is significantly smaller thanthe ±40 µm limit specified as absolute accuracy. If the absolute accuracy also iswithin ±40 µm can not be seen. Bias in the measurement can not be detectedsince there is no better reference available to compare with.
32 System analysis
Table 5.5. Leica LTD800 specification, from Leica Geosystems webpage [7]
Tracking
Maximum target speed in direction of laser beam > 6.0 m/sMaximum target speed at right angles to laser beam > 4.0 m/sRange of measurement
Horizontal 235◦
Vertical 45◦
Distance 0 − 40 mAccuracy
Angle resolution 0.14′′
Distance resolution 1.26 µmAbsolute accuracy (2sigma) of a coordinate for static tar-gets
±10 ppm (µm/m)
Absolute accuracy (2sigma) of a coordinate for slow movingtargets
±20 ppm (µm/m)
Absolute accuracy (2sigma) of a coordinate for fast movingtargets
±40 ppm (µm/m)
Absolute distance metering
Resolution 1 µmAccuracy (2sigma) ±25 µmOrientation measurement
Absolute accuracy, 1.5m < reflector distance < 15m ±0.02◦
Sample frequency
6DOF measurement 100 Hz
The frequency spectra in Figure 5.10 shows that most variance has a frequencybelow 1 Hz. The low frequency resulted in the decision to not filter the readingsfrom the laser tracker. The majority of the variance in the laser readings is believedto originate from vibrations in the work show floor.
One problem with this type of measurement equipment is that free sight isrequired from the laser tracker to the reflector. When working in complex con-structions and frameworks extensive planning of the tracker location might beneeded.
5.2.1 Alternatives
Different types of sensors could be used to measure the position of the robot. Iflower accuracy can be allowed a cheaper measurement system can be used.
5.3 Master controller 33
0 1 2 3 4 5 6 7 8−0.03
−0.02
−0.01
0
0.01
0.02
0.03Variance for laser, positional deviation
Time [s]
Dev
iatio
n fro
m m
ean
valu
e [m
m]
0 1 2 3 4 5 6 7 8−0.025
−0.02
−0.015
−0.01
−0.005
0
0.005
0.01
0.015
0.02
0.025Variance for laser, angular deviation
Time [s]
Dev
iatio
n fro
m m
ean
valu
e [d
egre
es]
Rx
Ry
Rz
xyz
Figure 5.9. Variation around mean value in the laser measurement on 4 meter distance
PosEye
The upcoming product PosEye from MEEQ Measurement Equipment, see Schofield [12],is based on a camera mounted on the robot arm. The camera can locate its positionin space by analyzing the angle to different luminous tapes mounted in the robotsurrounding and on components.
5.3 Master controller
The master controller is an ordinary PC computer running Microsoft Windows.The speed is not a limiting factor in this project. The main controller computer isfast enough for managing complex calculations in real time. Figure 2.1 shows howthe controller is connected to the laser tracker and the robot controller.
34 System analysis
0 5 10 15 20 25 30 35 40 45 500
0.5
1
1.5
2
2.5FFT of the positional deviation
Frequency [Hz]
xyz
Figure 5.10. Frequency spectra of the laser reading in Figure 5.9 (only position)
Chapter 6
System calibration
Before the compensation can start the relation between all components in thesystem must be measured. This chapter describes the methods developed for mea-suring transformations between different components.
In this project lots of physical objects are involved and good measurements ofthe components are needed. What good measurements are depends on the ap-plication. In this project the requirement is ±200 µm in the complete structure.Individual modules and operations must have higher accuracy. For robot position-ing ±100 µm accuracy with unknown affecting forces is assumed to be enough.
6.1 Tracker to Robot base and TCP0 to reflector
To use the laser tracker to supervise the actions of the robot their coordinatesystems must be calibrated against each other. Although the error compensationalgorithm described in Section 4 is stable also for big errors in the transformationsthe compensation becomes faster with more accurate transformations.
When the laser tracker is placed on the floor and the 6DOF reflector is mountedon the robot there is a constant distance between the tracker and the robot basecoordinate system (T Tr
Rob) and from TCP0, the end of the robot arm before mount-ing any tool, to the origin of the reflector (T TCP0
Refl ). Those distances can not bemeasured directly since they are not reachable by physical measuring tools, e.g.inside the robot foundation. Hence the distances must be measured indirectly.
According to Figure 6.1 there are four transformations, see Table 6.1, in akinematic loop. This relation can be used in different ways to calculate parts ofthe chain by measuring other parts.
Several methods to measure and calculate the unknown fixed relations havebeen developed and evaluated.
35
36 System calibration
Figure 6.1. Definition of T TrRob, T Rob
TCP0, T TCP0
Refl and T TrRefl
Table 6.1. Homogeneous transformations in the kinematic loop in Figure 6.1
T TrRob The location of the robot base in tracker coordinate system
T RobTCP0 The location of TCP0 in robot base coordinate system, reported by
the robot if tool0 is usedT TCP0
Refl The relation from TCP0 to the 6DOF reflector, if T TCP0Refl is defined as
the robot tool the robot will report the coordinates of the laser prismon the 6DOF reflector
T TrRefl The location of the 6DOF reflector in tracker coordinate system, re-
ported by the laser trackerC1, C2 Different notation for Refl when the reflector is mounted on the spe-
cific mount points C1 and C2 on the robot
6.1.1 Method for cooptimization of TTrRob and T
TCP0Refl
This method is based on the idea that if the robot is moved to different configura-tions it will give more information to an equation system.
When the robot is moved to different locations in robot base coordinate systemthe coordinates, T Rob
TCP0, can be read from the robot controller. For all of thoselocations the location of the 6DOF reflector in the tracker coordinate system, T Tr
Refl,
can be read from the laser tracker. Then T TrRob and T TCP0
Refl which are fixed allthe time, but unknown, are to be calculated. From the kinematic relations theexpression
T TrRob T Rob
TCP0 T TCP0Refl = T Tr
Refl (6.1)
can be derived, where T RobTCP0 and T Tr
Refl are measured in pairs as said above. At
6.1 Tracker to Robot base and TCP0 to reflector 37
least two pairs are needed, but the more pairs the better.
T TrRob
= . . .2
6
6
6
6
6
4
c(γA)c(βA) −s(γA)c(αA) + c(γA)s(βA)s(αA) s(γA)s(αA) + c(γA)s(βA)c(αA) xA
s(γA)c(βA) c(γA)c(αA) + s(γA)s(βA)s(αA) −c(γA)s(αA) + s(γA)s(βA)c(αA) yA
−s(βA) c(βA)s(αA) c(βA)c(αA) zA
0 0 0 1
3
7
7
7
7
7
5
(6.2)(where c(θ) is a short form for cos(θ) and s(θ) is a short form for sin(θ))
and
T TCP0
Refl= . . .
2
6
6
6
6
6
4
c(γC)c(βC) −s(γC)c(αC ) + c(γC)s(βC)s(αC ) s(γC )s(αC) + c(γC)s(βC)c(αC ) xC
s(γC)c(βC) c(γC)c(αC) + s(γC)s(βC)s(αC) −c(γC)s(αC) + s(γC)s(βC)c(αC) yC
−s(βC) c(βC)s(αC) c(βC)c(αC) zC
0 0 0 1
3
7
7
7
7
7
5
(6.3)
are constructed out of the variables that matlab will optimize, see (6.6).In each of T Tr
Rob and T TCP0Refl there are 6 unknowns (x, y, z, γ, β, α), that makes 12
unknowns in the whole equation. If the homogeneous transformation is parametrizedit is possible to solve 6 unknowns with one set of values for the equation. To solveall 12 unknowns another set of values are used:
(
T TrRob T Rob
TCP0,1 T TCP0Refl = T Tr
Refl,1
T TrRob T Rob
TCP0,2 T TCP0Refl = T Tr
Refl,2
)
(6.4)
If T RobTCP0,1 6= T Rob
TCP0,2 and thus T TrRefl,1 6= T Tr
Refl,2 the equation system can be solvedexactly. This solution is very sensitive for noise in the measurements.
To improve the accuracy of the solution many measurements are made. Thena sort of mean value of the solutions is calculated. This is done in Matlab Opti-mization Toolbox. Since Matlab only can minimize scalar valued functions a costfunction has to be defined. A cost function is a function that evaluates how closeto the solution the equation system is. The cost function is a function of all thevariables in the system to solve, it must grow when the system is further awayfrom the solution, it should also be continuous. When the system is as close to itsoptimal solution as possible the cost function is in its minimum and the other wayaround: when the minimum of the cost function is found, the best solution to theequation system is found. The function f in (6.5) is continuous and growing forlarger errors.
f =∑
i
∥
∥T TrRob T Rob
TCP0,i T TCP0Refl − T Tr
Refl,i
∥
∥ (6.5)
f can be interpreted as the sum of the deviations for each measurement from thecalculated transformations.
If the world was perfect and the robot could move with the same precision asthe laser tracker can measure f would have been 0 when the optimal solution wasfound. In reality f > 0. The value of f is the sum of the deviations from the
38 System calibration
calculated transform for each measured value. Optimization Toolbox also needs avector to optimize and a starting value for that vector. The vector to optimize isx in (6.6).
x = (xA, yA, zA, γA, βA, αA, xC , yC , zC , γC , βC , αC) (6.6)
x0 is initialized with rough guesses and then the fmincon function in OptimizationToolbox is used to calculate the values of x that gives the smallest value of f .
6.1.2 Other methods
BAE method for T TCP0Refl
Parallel to the cooptimization method a method for calculating T TCP0Refl was de-
veloped by BAE Systems. The method uses small relative motions to identifythe transformation. The performance of the BAE method is comparable to thecooptimization method with respect to the T TCP0
Refl transformation.
A stepwise procedure to compute T TCP0Refl
Early in the project a method was developed for finding T TCP0Refl . A short sequence
of actions will produce the transformation.
1. Put the 6DOF reflector in the chuck
2. Measure the position of the 6DOF reflector, call it P .
3. Rotate joint 6.The prism will make (part of) a circle. This circle will be in a plane. Thenormal vector of this plane is the z-axis. The center of the circle is the originin the x-y plane.
4. Go to P again, then rotate joint 5. The prism will again make another circle.The normal vector through this plane is the y-axis. The origin of the z-axisis 140 mm from the center of the circle according to Figure 5.1.
5. Calculate the x-axis by taking the cross product between the y and z axes:
x = y × z (6.7)
6. Now the orientation and origin of all axes are determined. Thus the coordi-nate system for TCP0 is known, the position P of the reflector is measuredin 6DOF. Calculate the difference between TCP0 and the 6DOF reflector.
This method worked well in theory but worse in practice. Since the methods ofmeasurements in the software Axyz1 is not able to measure the necessary 6DOFcoordinates in Step 2 the method failes to produce any result. Although some more
1Software for measuring with the Leica tracker
6.2 Tip of drilling machine 39
Figure 6.2. Bushing with its coordinate system
work and small modification of the method could produce results this method isabandoned in favor of the cooptimizing method, see Section 6.1.1. This is bothbecause the stepwise procedure has a weakness in returning exactly to P in Step 4.The cooptimizing method simultaneously returns T Tr
Rob. The whole procedure isalso time consuming to perform.
Direct method for computing T TrRob
In the beginning of the project a rough value for the T TrRob transformation was
needed. The accuracy of this transformation is not so important since it is supposedto be canceled out by the adjustment algorithm anyway.
This method is quick for calculating a fast estimate of the T TrRob transformation.
First an estimation of the T TCP0Refl transformation, possibly produced by measuring
by hand, must be available. Then values of T RobTCP0 and T Tr
Refl are measured by therobot controller and laser tracker respectively. The transformation is calculatedstraight forward as
T TrRob = T Tr
Refl
(
T RobTCP0 T TCP0
Refl
)−1(6.8)
6.2 Tip of drilling machine
The point on the drilling machine that is of interest is the tip of the bushing onthe machine. The bushing is pressed against the working object when drilling isperformed. When the drilling machine is used the 6DOF reflector is located oneither side of the chuck, on the C1 or C2. To be able to calculate the position ofthe bushing on the drilling machine the transformation T Refl
Bushing is needed. Theposition of the bushing can be adjusted by screwing the sleeve in and out to allowfor different hole depths. This has the effect that the transformation must beremeasured if the hole depth is changed. The transformation can not be measureddirectly but T Tr
Bushing as well as T TrRefl can be measured. Then T Refl
Bushing is calculated
40 System calibration
(a) Prism on bushing tip (b) Prism against bushingsleeve
(c) Prism against bushingsleeve
Figure 6.3. Measurements on drill machine
asT Refl
Bushing =(
T TrRefl
)−1T Tr
Bushing (6.9)
T TrRefl can be measured directly with the reflector mounted on e.g. C2 but T Tr
Bushing
must be measured either indirectly according to Section 6.2.1 or in a coordinatemeasurement machine.
6.2.1 Measurement of TTrBushing
To measure the location of the bushing coordinate system in Figure 6.2 both theposition of the origin and the orientation of the z-axis must be measured. Thedirection of x and y-axes can be defined arbitrarily. To measure the origin of thebushing coordinate system a set of points in the middle of the tip of the bushingwere measured as in Figure 6.3(a). One set of different points on the front surface ofthe bushing, see Figure 6.2 were measured. To locate the position and orientationof the z-axis a third set of points were measured on different locations on thecylindrical surface along the sleeve as seen in Figure 6.3(b) and 6.3(c). The sleevecylinder has its center axis aligned with the z-axis. The reason for not sliding theprism in the slots on the sleeve is that they are not perfectly symmetrical.
One problem when measuring the middle of the bushing in the front is that theedge of the hole is chamfered some tenths of a millimeter so the 1.5 inch ball prismwill sink a little bit lower in the hole than if the hole was just 6 mm wide. This isthe reason for also measuring on the front surface. The bushing coordinate systemhas its origin in the middle of the bushing with the x and y axes in the front surfaceand the z axis pointing in the drilling direction. To optimize the transformationthe characteristic measurements of the points in each of the three data sets mustbe identified to form a cost function.
For set one the points should be as close to the center of the x and y axes aspossible, but in the z axis the point should be a little bit in front of the bushing.
6.3 Location of drill frame 41
The cost function for the points measured in the hole in the tip is calculated as
ftiphole =∑
tip points
x2m + y2
m + (zm + d − 19.05)2
(6.10)
where xm, ym and zm are the measured coordinates of one measurement trans-formed by T Tr
Bushing , d is the constant distance that the ball prism sinks down inthe hole in the bushing and 19.05 is the radius of the ball prism. ftiphole can beinterpreted as the sum of the deviation from the calculated bushing origin for eachmeasured value in set one.
The second set, with points measured on the bushing front surface have theonly restriction that they should be as close to 0 as possible in the z axis. Forthose points the cost function is
fbushsurf =∑
bushingsurfacepoints
(zm − 19.05)2
(6.11)
where zm is the z-coordinate of each measured value transformed by T TrBushing .
fbushsurf can be interpreted as the sum of the deviations in the z-coordinate fromthe calculated bushing front surface for each point in set two.
For the third set of points, the ones on the sleeve surface, the characteristic isthat the distance to the z axis is constant, with a radius r. The points are on thenegative side of the z axis, thus positive z-coordinates are punished. Thus the costfunction is
fsleeve =∑
sleevesurfacepoints
∣
∣
∣x2m + y2
m − (r + 19.05)2∣
∣
∣ + Γ (6.12)
where xm and ym are coordinates of each measured value transformed by T TrBushing
of each measurement, r is the radius of the bushing sleeve. Γ = 0 if zm < 0 andΓ = zm if zm ≥ 0. fsleeve can be interpreted as the deviation in the distance to thecalculated z-axis, that is the unevenness in the cylindrical surface.
The total cost function is just the sum of the cost functions for the different setof points, see (6.13)
f = ftiphole + fbushsurf + fsleeve (6.13)
The variable vector (x, y, x, γ, β, α) is used to form T TrBushing . Like in Sec-
tion 6.1.1 Matlab optimization toolbox is used to minimize f by manipulatingthe variable vector and thus get the optimal value of the transformation.
6.3 Location of drill frame
The origin of the drilling frame, in Figure 2.8, relative to the Capto interface onthe frame is needed for easy recalibration if the frame is moved. To measure the
42 System calibration
(a) Prism on plate top surface (b) Prism on plate front sur-face
(c) Prism on plate upper surface
Figure 6.4. Measurements on drill plate
T FrCapFrame transformation both T Tr
Frame and T TrFrCap is measured. Then the relation
T FrCapFrame =
(
T TrFrCap
)−1T Tr
Frame (6.14)
can be calculated. The T TrFrCap is measured by putting the 6DOF reflector on the
Capto on the frame.For measuring the T Tr
Frame transformation three sets of points on the drill plateis measured with the 1.5 inch prism. One set on the top surface, see Figure 6.4(a),one set on the front side of the frame 6.4(b) and finally one set on the upper sideof the frame 6.4(c).
The characteristics of the different measurements of the plate are straight for-ward to identify. For the z axis the coordinate should be equal to the ball prismradius in negative direction. Also xm and ym should be positive. The cost function
ftop =∑
top surface
(zm + 19.05)2+ Γx + Γy (6.15)
is calculated where zm is the z-coordinate of each measurement transformed byT Tr
Frame. To punish coordinate axes turned in the wrong direction Γx is positive ifxm < 0 and 0 if xm ≥ 0. Γy is defined accordingly.
Following the same pattern the cost function for the front side is defined as
ffront =∑
front side
(xm + 19.05)2 + Γy + Γz (6.16)
and the cost function for the upper side is defined as
fupper =∑
upper side
(ym + 19.05)2
+ Γx + Γz (6.17)
6.4 Location of robot chuck 43
Finally the total cost function is defined as
f = ftop + ffront + fupper (6.18)
The variable vector (x, y, x, γ, β, α) is used to form T TrFrame. Like in Section 6.1.1
Matlab optimization toolbox is used to minimize f by manipulating the variablevector and thus get the optimal value of the transformation.
6.4 Location of robot chuck
There is a need for knowing the transformation between the Capto interface C2 onthe side of the chuck where the 6DOF probe is mounted and a male Capto dockedin the robot chuck. This relation is called T C2
ext. This is used after a dynamicmodule is probed with the 6DOF reflector mounted on the modules Capto to dockwith the robot when robot is guided by the 6DOF reflector.
To measure the transformation first the position of the reflector mounted on therobot
(
T TrC2
)
is measured while the robot is docked with the Capto on a dynamicmodule, then the robot is undocked from the Capto and the position of the Captoon the unmoved module is measured with the 6DOF reflector
(
T Trext
)
. Finally hetransform is calculated as
T C2ext =
(
T TrC2
)−1T Tr
ext (6.19)
Chapter 7
System integration
To be able to use the laser to increase the positional performance of the robot,the laser tracker controller and the robot controller must be connected somehow.The measurements from the laser must also be interpreted in the system and newactions must be decided. For this purpose an ordinary PC was used as proposedby Seyed-Aghamiri [13].
On the PC a main system controller is implemented in Microsoft Visual Basic.The controller program uses emScon to connect to the Leica tracker and WebWareSDK to connect to the S4Cplus robot controller, see Figure 2.1.
In the following sections the different parts in the integration are discussed.
7.1 Connection to robot controller
The WebWare SDK used for communication with the robot controller is imple-mented as an ActiveX control. This means it easily can be integrated into Win-dows applications written in e.g. Visual Basic or Visual C++. WebWare SDK usesthe Robot Application Protocol (RAP) for communicating with the S4Cplus robotcontroller. The available functions includes reading and manipulating PERS vari-ables, reading and writing I/O, starting and stopping program execution. Thoughdirect control of the running application is not possible.
The lack of direct control of the robot leads to a solution where the programexecution is controlled indirectly. The solution was to use a RAPID-program, seeAppendix A, which performs different actions depending on the values of variablesand I/O signals. The RAPID program also has the ability to synchronously signalback to the WebWare application. This is used e.g. when the robot is done withmoving to a given position and the RAPID program is ready to process new tasks.
7.1.1 Ordinary program flow
After initialization the RAPID program does nothing but spins waiting for NextActionto be larger than 0. When the main controller decides that the robot shall move
45
46 System integration
it sets the PERS RobotPosition to the desired location. Then the main controllersets NextAction to 1. This makes the RAPID program execute a MoveLSync com-mand that steers the robot to the specified position. When the robot has reachedRobotPosition the routine Talk informs the main controller that the motion iscompleted. While the main controller decides the next action the RAPID programagain spins in the loop while NextAction=0.
Note: While the robot is moving no new action can be initiated by changingthe value of NextAction. To abort the current action, see Section 7.1.2.
7.1.2 Extraordinary program flow
The program can be aborted at any time by setting the signal do03 to 1. Then therobot motion stops and the program restarts and waits for new actions.Note: Due to slow processing of the RAP protocol it takes several tenths of asecond before the robot stops. This reaction time can probably be reduced byhardwiring a cord from the main controller to a digital input on the S4 controller.The drawback of this solution is not only the extra setup with a cord, but also thatsynchronization issues can occur.
7.1.3 Emulating a discrete controller
The interrupt method for stopping the robot described in Section 7.1.2 can beused to emulate a discrete controller. If the interrupt signal is triggered at regularintervals and at every interrupt a new coordinate is given to the RAPID programthe robot system will behave similar to a discrete controller. Though there aresome things that does behave differently. The robot will stop its motion at everyinterrupt point making a jerky motion that will cause wear on the robot.
7.2 Connection to laser tracker controller
The laser tracker has a computer interface, called emScon, that enables real timestreaming of measurements from the tracker to the main controller computer overan ordinary TCP/IP network.
The interface is a COM object that can receive events. Commands can besent to the tracker either synchronously or asynchronously. If they are sent syn-chronously the program halts until the command returns with the requested data.If they are sent asynchronously the program continues immediately and the datais received via an event when the data becomes ready.
The tracker can be instructed to make a single measurement or a continu-ous sequence of measurements. The single measurement returns one measurementand then stops, but the continuous mode sends measurement events until a stopcommand is sent. For the purpose of making a feedback controller asynchronouscontinuous measurement is chosen, because a faster transfer rate can be achievedwith that method.
7.3 CAD-system integration 47
7.3 CAD-system integration
One goal of the project is to shorten the lead times by automatically transferprocess definitions from CAD to the production. This is done by exporting highlevel information about the process from the CAD system to XML. The maincontroller imports the XML and generates a task sequence that can be executed.Depending on the description of the tasks the main controller will perform differentactions. Examples of tasks are compensated and uncompensated moves, dockingand undocking with dynamic modules and drilling. To each of those operationsroutines in the main controller code are connected.
Chapter 8
Results
8.1 System calibration
The drilling machine was positioned as in Figure 2.7 but 0.1 mm above the surfaceusing the laser feedback controller. A feeler gauge was used to measure the distanceto the aluminum plate. The distance was 0.1 ± 0.05 mm. The conclusion is thatthe sum of the errors in the calibration of the drilling machine and the drillingplate is approximately ±50 µm.
8.2 Module positioning
With the laser feedback control loop the robot is able to position dynamic ART-modules within ±50 µm and ±0.0005 rad accuracy within 10 seconds. In Figure 8.1the process of adjusting the hexapod is shown. The unbroken lines are the measureddeviation from the reference value for each axis and the broken lines are the controlcoordinates sent to the robot controller.
8.3 Drilling
Two drilling tests were performed. The drilled material was 3 mm aluminum plateand the hole diameter was 6 mm. In test one the bushing of the drilling machinewas located approximately 0.1 mm above the surface. The resulting hole that canbe seen in Figure 8.2 has some defects around the edge and marks on the surfacearound the hole. In Figure 8.4 the location of the drilling machine was monitored.When the drill is feeding through the material, at 19 < t < 24, deviations in theposition of the drilling machine occur.
In test two the bushing was pressed against the aluminum plate before thedrilling started. The pressing force could not be measured but was lower thanthe collision detection limit of the IRB4400 robot and high enough for making thedrilling machine immovable by hand pulling. The resulting hole that can be seen in
49
50 Results
−1 0 1 2 3 4 5 6 7 8
−1.5
−1
−0.5
0
0.5
1
1.5
Start adjusting Done adjusting
Limits
Time from start of adjustment process[s]
Offs
et fr
om re
fere
nce
valu
e [m
m]
Adjusting of hexapod position to ±50 µm
Laser XLaser YLaser ZRobot X referenceRobot Y referenceRobot Z reference
−1 0 1 2 3 4 5 6 7 8
−1
−0.5
0
0.5
1
Start adjusting Done adjusting
Limits
Time from start of adjustment process[s]
Offs
et fr
om re
fere
nce
valu
e [
0 ]
Adjusting of hexapod orientation to ±0.0005 rad ≈ 0.030
Laser γLaser βLaser αRobot γ referenceRobot β referenceRobot α reference
Figure 8.1. Adjustment of hexapod to ±50 µm and ±0.0005 rad
8.4 Process automation and CAD integration 51
Figure 8.3 has significantly less defects than the hole from test one. In Figure 8.5the location of the drilling machine was monitored. Smaller deviation than in testone can be seen when the drill feeds through the material although vibrations arehigher when the robot servos are applying the pressure against the drilled plate.
8.4 Process automation and CAD integration
The control system can import process definitions from the CAD system in XMLformat. The imported tasks can be carried out by the robot via the master con-troller. The following tasks has been implemented and tested.
• Automatic execution of the method for cooptimization of T TrRob and T TCP0
Refl
described in Section 6.1.1.
• Displaying a message for the process operator
• Probing of module and saving the location for later use, see Figure 8.6(a)
• Adjusting the robot to a reference location with passive loads
• Automatic reconfiguration of a dynamic module including docking with aknown module position and releasing the module at the reference location,see Figure 8.6(b) to 8.6(f)
• Drilling of a hole
52 Results
Figure 8.2. Drilled 6 mm hole in 3 mm aluminum plate, without prepressure
Figure 8.3. Drilled 6 mm hole in 3 mm aluminum plate, with prepressure
8.4 Process automation and CAD integration 53
0 5 10 15 20 25 30−0.1
−0.05
0
0.05
0.1
0.15
0.2
0.25Movement of drilling machine during drilling with no prepressure
Time from start of drilling process[s]
Offs
et fr
om re
fere
nce
valu
e [m
m]
Deviation XDeviation YDeviation Z
0 5 10 15 20 25 30−0.06
−0.04
−0.02
0
0.02
0.04
0.06
0.08Rotational movement of drilling machine during drilling with no prepressure
Time from start of drilling process[s]
Offs
et fr
om re
fere
nce
valu
e [
0 ]
Deviation γDeviation βDeviation α
Figure 8.4. Drill test without prepressure
0 5 10 15 20 25 30 35 40 45−0.15
−0.1
−0.05
0
0.05
0.1
0.15Movement of drilling machine during drilling with prepressure
Time from start of drilling process[s]
Offs
et fr
om re
fere
nce
valu
e [m
m]
Deviation XDeviation YDeviation Z
0 5 10 15 20 25 30 35 40 45−0.02
−0.01
0
0.01
0.02Rotational movement of drilling machine during drilling with prepressure
Time from start of drilling process[s]
Offs
et fr
om re
fere
nce
valu
e [
0 ]
Deviation γDeviation βDeviation α
Figure 8.5. Drill test with prepressure
54 Results
(a) Probing of module (b) Going to dock
(c) Robot docked with hexapod, hexa-pod unlocked
(d) Moving hexapod with robot
(e) Hexapod adjusted to ±50 µm and±0.0005 rad
(f) Hexapod locked and released
Figure 8.6. Hexapod dock and adjustment sequence
Chapter 9
Conclusion
Controlling a robot with feedback from an accurate measurement system enablesan absolute position accuracy of the robot of ±50 µm with static loads. This iswell below the ±100 µm specified in Chapter 6. The current solution is not fastenough for affecting forces that varies fast over time, e.g. drilling or grinding tools.To enable high precision for those processes a faster control of the robot and lessdelay of measurement values are needed.
The issue with robot drilling can be solved by applying a prepressure againstthe material before the drilling is started.
9.1 Further work
Other technical solutions for controlling the robot should be investigated to enablehigher speed of the feedback control.
The robot drilling process needs further investigation. The amount of pre-pressure needed for good drilling results needs to be investigated. Methods forapplying the correct prepressure should be developed. The effect on the drilledmaterial caused by the pressure needs to be investigated.
Today process implementations for different processes are constructed as VisualBasic routines. To allow for better flexibility and less programming skills from anoperator a method for creating new process implementations and connect them tothe task descriptions in XML must be developed.
9.2 Industrial implementation
Before the solution presented in this thesis can be used in industrial production anumber of issues must be solved.
The user interface of the master controller is optimized for research purposesand maximal flexibility for the operator. The interface has to be simplified andadapted for an operational environment.
55
56 Conclusion
The security issues in the process must be investigated carefully.The description of tasks in XML and corresponding the process implementations
must be extended to cover different processes and variants of the current processes.The connection from the CAD system must be made more user friendly than today.
The system calibration must be integrated into the operator program. The op-timization process must either be ported from Matlab to the Visual Basic programor Matlab should be integrated via a DDE-connection.
Bibliography
[1] ABB Robotics AB. Datasheet irb940, pr100099de. Website, 2003.http://library.abb.com/GLOBAL/SCOT/scot241.nsf/VerityDisplay/DDD9A504C9020549C1256D2D00381D94/$File/Datenblatt %20IRB%20940.pdf.
[2] ABB Robotics AB, ABB Robotics AB, SE-721 68 Vasteras, Sweden. Produk-
tmanual IRB4400, m2000 edition.
[3] ABB Robotics AB, ABB Robotics AB, SE-721 68 Vasteras, Sweden. RAPID
Referensmanual Systemdatatyper och Rutiner, for baseware os 4.0 edition.
[4] ADFAST. Project homepage. Website, 2003. http://www.euadfast.com/.
[5] P.I. Corke. A robotics toolbox for MATLAB. IEEE Robotics and Automation
Magazine, 3(1):24–32, March 1996.
[6] John J. Craig. Introduction to Robotics: Mechanics and Control. Addison-Wesley Longman Publishing Co., Inc., 2:nd edition, 1989.
[7] Leica Geosystems. Laser trackers. Website, 2003.http://www.leica-geosystems.com/ims/product/ltd.htm .
[8] Svante Gunnarsson, Mikael Norrlof, E.Rahic, and M.Ozbek. Iterative learningcontrol of a flexible robot arm using accelerometers. In Mekatronikmote 2003,Goteborg, Sweden, Aug 2003.
[9] G. Hovland, S. Gunnarsson, S. Moberg, T. Brogardh, U. Carlsson, M. Norrlof,and T. Svensson. Path correction for an industrial robot. European patent No.
EP1274546, October 2001.
[10] H. Kihlman and R. Loser. 6dof metrology - integrated robot control. InAerospace Automated Fastening Conference and Exhibition, Montreal, Quebec;Canada, September 2003. Aerofast.
[11] Klas Nilsson and Rolf Johansson. Integrated architecture for industrial robotprogramming and control. J. Robotics and Autonomous Systems, 29:205–226,1999.
57
58 Conclusion
[12] M. Schofield. Does your robot really know where it is? Industrial Robot: An
International Journal, 29(5):407–411, 2002.
[13] M. Seyed-Aghamiri. Laser integrated robot control. Master’s thesis LiTH-IKP-Ex-2088, Department of Production Systems, Linkoping University,Linkoping, Sweden, August 2003.
Appendix A
Controlling RAPID program
%%%
VERSION:1
LANGUAGE:ENGLISH
%%%
MODULE A_interr
PERS robtarget RobotPosition:=[[0,0,0],[1,0,0,0],[-1,0,-1,0],[0,0,0,0,0,0]];
PERS robjoint RobotJoint:=[0,0,0,0,0,0];
PERS robtarget CurrPos:=[[0,0,0],[1,0,0,0],[-1,0,-1,0],[0,0,0,0,0,0]];
PERS speeddata vMaxSpeed:=[10,5,5000,1000];
PERS num NextAction:=0;
PERS string SCtext:="";
PERS jointtarget checkJoint:=[[0,0,0,0,0,0],[0,9E+09,9E+09,9E+09,9E+09,9E+09]];
VAR confdata cd:=[-1,0,-1,0];
VAR robtarget rt:=[[0,0,0],[1,0,0,0],[-1,0,-1,0],[0,0,0,0,0,0]];
VAR num SignalAbort;
VAR intnum InitPart:=0;
! VAR ensures that the variable is
! reinitialized every time the program starts?
PROC main()
IF InitPart=0 THEN
!! INIT PART !!
CONNECT SignalAbort WITH myTrap;
SetDO do03,low;
ISignalDO do03,high,SignalAbort;
ConfL\Off;
! Turn configuration management off. Easier to program, but
! harder to predict
NextAction:=0;
! init to zero to make sure that program always start in idle.
TPShow TP_PROGRAM;
InitPart:=1;
59
60 Controlling RAPID program
ENDIF
!! END INIT PART !!
! NextAction := 1; !Always do the moveL
TEST NextAction
CASE 0:
! Idle
CASE 1:
! GotoPos
NextAction:=0;
MoveLSync RobotPosition,vMaxSpeed,fine,AlbTool,"Talk";
CASE 2:
! Activate Soft Servo
! Takes 0.5 s to activate fully, please wait for that.
! Activating Soft servo twice without MoveL in between should be avoided,
! otherwise there will be a jerk in the robot movement
NextAction:=0;
SoftAct 1,70;
SoftAct 2,100;
SoftAct 3,100;
SoftAct 4,100;
SoftAct 5,100;
SoftAct 6,100;
SCtext:="SoftAct";
SCWrite SCtext;
CASE 3:
! DeActivate Soft Servo
! Takes 0.5 s to deactivate fully, please wait for that.
! Shall not be done if there is a force between the robot and the work object
NextAction:=0;
SoftDeact;
SCtext:="SoftDeAct";
SCWrite SCtext;
CASE 4:
! Return joint angles.
NextAction:=0;
rt:=CRobT();
RobotPosition.robconf:=rt.robconf;
checkJoint:=CalcJointT(RobotPosition,tool0);
SCWrite checkJoint;
CASE 5:
NextAction:=0;
ConfL\On;
! Turn configuration management ON.
CASE 6:
NextAction:=0;
ConfL\Off;
! Turn configuration management OFF.
CASE 7:
! GotoPos
61
NextAction:=0;
MoveJSync RobotPosition,vMaxSpeed,fine,AlbTool,"Talk";
CASE 8:
NextAction:=0;
MoveAbsJ [RobotJoint,[0,9E+09,9E+09,9E+09,9E+09,9E+09]],vMaxSpeed,fine,AlbTool;
!! OBS
!!! From the manual:!!!!!!!!!!
! Om ToPoint inte ar en stoppunkt, utfors
! efterfoljande instruktion en aning innan roboten har kommit till den
! programmerade zonen.
!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
SCtext:="RobotJointAlmostDone";
SCWrite SCtext;
ENDTEST
ENDPROC
PROC Talk()
! Sends the current position to the WebWare computer.
CurrPos:=CRobT();
SCWrite\ToNode:="130.236.35.16",CurrPos;
ENDPROC
TRAP myTrap
! Restart the program at once
SetDO do03,low;
NextAction:=0;
Talk;
ExitCycle;
RETURN;
ENDTRAP
ENDMODULE
Appendix B
Robot model in Matlab
Robotics Toolbox
The robot was modeled in Matlab Robotics Toolbox [5].
L{1} = link([ -pi/2 .2 0 .68 0 0 ], ’standard’);
L{2} = link([ 0 .89 -pi/2 0 0 -pi/2], ’standard’);
L{3} = link([-pi/2 .15 0 0 0 0 ], ’standard’);
L{4} = link([pi/2 0 0 .88 0 0 ], ’standard’);
L{5} = link([-pi/2 0 0 0 0 0 ], ’standard’);
L{6} = link([0 0 pi .14 0 pi ], ’standard’);
L{1}.qlim = pi/180*[-165 165];
L{2}.qlim = pi/180*[-70 95 ];
L{3}.qlim = pi/180*[-60 60 ];
L{4}.qlim = pi/180*[-200 200];
L{5}.qlim = pi/180*[-120 120];
L{6}.qlim = pi/180*[-400 400];
Due to the connection between link 2 and 3 on the robot the real link 3 angle is the sumof the link 2 and link 3 angles in the model.
The model is verified against an ABB S4 robot controller. Sets of joint angles waspresented for both the robot controller and the Matlab model, then the resulting Cartesiancoordinates were compared. The error in each axis is confirmed to be below 10−3◦. Thecommand CalcRobT was used for the conversion on the robot and the fkine commandwas used for the Matlab conversion.
63
På svenska
Detta dokument hålls tillgängligt på Internet – eller dess framtida ersättare –under en längre tid från publiceringsdatum under förutsättning att inga extra-ordinära omständigheter uppstår.
Tillgång till dokumentet innebär tillstånd för var och en att läsa, ladda ner,skriva ut enstaka kopior för enskilt bruk och att använda det oförändrat för ick-ekommersiell forskning och för undervisning. Överföring av upphovsrätten viden senare tidpunkt kan inte upphäva detta tillstånd. All annan användning avdokumentet kräver upphovsmannens medgivande. För att garantera äktheten,säkerheten och tillgängligheten finns det lösningar av teknisk och administrativart.Upphovsmannens ideella rätt innefattar rätt att bli nämnd som upphovsman i denomfattning som god sed kräver vid användning av dokumentet på ovan beskrivnasätt samt skydd mot att dokumentet ändras eller presenteras i sådan form eller isådant sammanhang som är kränkande för upphovsmannens litterära eller konst-närliga anseende eller egenart.
För ytterligare information om Linköping University Electronic Press se för-lagets hemsidahttp://www.ep.liu.se/
In English
The publishers will keep this document online on the Internet - or its possiblereplacement - for a considerable time from the date of publication barring excep-tional circumstances.
The online availability of the document implies a permanent permission foranyone to read, to download, to print out single copies for your own use and touse it unchanged for any non-commercial research and educational purpose. Sub-sequent transfers of copyright cannot revoke this permission. All other uses ofthe document are conditional on the consent of the copyright owner. The pub-lisher has taken technical and administrative measures to assure authenticity,security and accessibility.
According to intellectual property law the author has the right to be men-tioned when his/her work is accessed as described above and to be protectedagainst infringement.
For additional information about the Linköping University Electronic Pressand its procedures for publication and for assurance of document integrity, pleaserefer to its WWW home page:http://www.ep.liu.se/
© Albin Sunnanbo