<<

MODELING, ANALYSIS, AND EXPERIMENTS ON A ARM WITH FORCE-FEEDBACK INTERACTION CONTROL

by

SURAG BALAJEPALLI

Submitted in partial fulfillment of the requirements

For the degree of Master of Science

Electrical Engineering and Computer Science

CASE WESTERN RESERVE UNIVERSITY

May, 2020 Modeling, Analysis, And Experiments On A Robot Arm With

Force-Feedback Interaction Control

Case Western Reserve University Case School of Graduate Studies

We hereby approve the thesis1 of

SURAG BALAJEPALLI

for the degree of

Master of Science

Dr. Wyatt Newman

Committee Chair, Adviser 03/05/2020 Electrical Engineering and Computer Science

Dr. Cenk Cavusoglu

Committee Member 03/05/2020 Electrical Engineering and Computer Science

Dr. Gregory Lee

Committee Member 03/05/2020 Electrical Engineering and Computer Science

1We certify that written approval has been obtained for any proprietary material contained therein. Table of Contents

List of Tables v

List of Figures vi

Abstract ix

Chapter 1. Introduction1

Robot Force Control2

Compliant Motion6

Compliant motion behaviors8

Scope of this thesis9

Chapter 2. Stability of Interaction Controllers 12

Performance measure 14

Passivity 15

Robot modeling 21

Controller model 32

Passivity analysis 37

Simulation 39

Chapter 3. Passivity Analysis 40

Robot Model 40

Single link analysis 42

Two link model analysis 46

Coulomb friction analysis 63

iii Chapter 4. Experiments on compliant behaviors 75

The robot 75

Virtual attractor strategies 84

Chapter 5. Conclusions and future work 92

Future work 93

Appendix. Complete References 95

iv List of Tables

3.1 Model arm dynamics 41

4.1 EGM system parameters 79

v List of Figures

1.1 Position/Force hybrid controller4

2.1 Lumped mass approximation of a robot link 21

2.2 The interaction controller 32

2.3 The interaction controller with modeled latency 34

2.4 The interaction controller with modeled latency implemented on a

robot 35

3.1 Elbow link frequency response plots - no delay case 44

3.2 Shoulderlink frequency response plots - no delay case 44

3.3 Elbow link frequency response plots - with 10ms delay 45

3.4 Shoulderlink frequency response plots - with 10ms delay 45

3.5 Shoulder link frequency response plots - Bandwidth = 7Hz, delay =

10ms. The plot is in red for frequencies where the real part of the

eigenvalues are negative. 46

3.6 Two link model violating passivity with 10ms controller latency.

Negative values for the real part of the Eigenvalues of admittance are

plotted in red. 48

3.7 Violation of passivity of the same robot and controller at different

poses. Left plot: Joint 1 = 0, joint 2 = 90.◦ Right plot: Joint 1 = 0, joint 2 =

45.◦ Sections of this plot marked in red represent non-passive regions. 48

3.8 Effect of non-diagonal Mdes on passivity 52

vi 3.9 Effect of diagonal Mdes on passivity 53

3.10 Effect of desired stiffness on passivity 54

3.11 Effect of target damping on passivity 56

3.12 Effect of servo position bandwidth on passivity 58

3.13 Effect of servo velocity gain on passivity 59

3.14 Real part of admittance is positive over the chosen range of frequencies,

the system is passive 61

3.15 Stable system simulation 62

3.16 Real part of admittance is negative for certain frequencies in the range,

the system is non-passive 63

3.17 Unstable system simulation 64

3.18 Example of hunting due to Coulomb friction 67

3.19 Frequency domain passivity plot - Case 1 68

3.20 Force plot - Case 1 - Significant hunting 69

3.21 Frequency domain passivity plot - Case 2 70

3.22 Force plot - Case 2 - Significant hunting 70

3.23 Frequency domain passivity plot - Case 3 71

3.24 Force plot - Case 3 - No hunting 72

3.25 Friction suppression 74

4.1 EGM interface data flow 77

4.2 EGM interface block diagram 78

vii 4.3 Components of the EGM message protocol 81

4.4 Joint 5 following sinusoidal command with latency 83

4.5 Attractor strategy 1 for move until touch 86

4.6 Strategy 1 implementation 86

4.7 Attractor strategy 2 for move until touch 88

4.8 Strategy 2 implementation 89

4.9 Attractor strategy 3 for move until touch 90

4.10 Strategy 3 implementation 91

viii Abstract

Modeling, Analysis, And Experiments On A Robot Arm With Force-Feedback Interaction Control

Abstract

by

SURAG BALAJEPALLI

Stable force feedback control of robot arms has the potential to improve the utility of robotic systems by equipping them with the ability to perform complex con- tact tasks like machining and assembly. This study explores the stability limitations of force feedback control on a robot arm for applications in remote supervisory control.

Supervisory control is useful in situations where communication between a human op- erator and a robot suffers from large delays, making direct teleoperation impractical.

It sets up a foundation of stable compliant behaviors specified using virtual attractors upon which algorithms to perform complex tasks can be developed. Influence of linear and nonlinear internal dynamics of a robot arm on efficacy of active compliance is stud- ied. Additionally, it has been shown that force feedback can be effective in suppressing unwanted effects of nonlinear friction in the robot. Results have been validated experi- mentally by implementing force feedback control on an ABB IRB 120 robot.

ix 1

1 Introduction

This study is motivated by the requirements of typical supervisory control of contact tasks using robot arms. Potential applications of this robotic system include ro- bot arms performing assembly and maintenance operations in space, underwater, or other remote locations that could be dangerous for humans to operate in. Remote su- pervisory control of a robot arm presents two major challenges. The first is that any communication to the robot must pass through channels that suffer from large delays as information needs to be transmitted over large distances through various media. Sec- ondly, the manipulation tasks that the system aims to perform require ro- bust force control functionality. Operations involving robot force control include cut- ting, insertion, grasping, and manipulation of environments with uncertainty in geom- etry. These form a large subset of contact operations that are expected of a robot arm. Introduction 2

1.1 Robot Force Control

Control of robotic arms can be broadly classified into position control and force control. A position controller for a multiple link robot effectively controls the po- sition of the end-effector in six degrees of freedom, three translational and three rota- tional, by controlling the position of each joint’s actuator. Decades of research in posi- tion controllers for robot arms has resulted in exceptional performance in terms of accu- racy, repeatability, and speed. These position-controlled have been able to excel at a large class of operations like welding, painting, and palletization. These include op- erations involving grasping of objects too, however, position controllers’ effectiveness in such tasks is limited by the quality of information it receives from any sensors. For example, to successfully grasp an object, the robot must know the object’s position in

3D space with high confidence. The dimensions of the object must also be known to correctly engage the gripper. A pure position controller fails to robustly complete tasks involving a high degree of geometric uncertainty. Force control is able to achieve robust and versatile behavior in open-ended environments like these. By providing an intelli- gent response in unforeseen situations, it is able to deal with uncertainties to a larger degree than position controllers. Additionally, most assembly and machining opera- tions require exertion of forces to successfully complete tasks. In grinding operations, for example, it is imperative that the force being applied at the points of contact is con- trolled to correctly match requirements to ensure quality. Force control has drawn the attention of many researchers over the years, yet its successful practical applications are few in number [1]. Among these, a majority can be classified as contact/interaction Introduction 3

tasks, where the robot’s end effector is expected to be in contact with an unknown en- vironment. In other words, the robot is coupled to the environment. The performance of an interaction controller can be improved by closing a force feedback loop around it, resulting in better tracking accuracy. Force-feedback interaction control is useful to realize the full potential of robot arms in the context of performing operations with dex- terity comparable to that of humans, but its adoption is severely limited by its potential to result in unstable behavior.

A force-controlled manipulation task can be divided into three distinct phases.

In the first phase, the mechanism is unconstrained and the is free of any external load. The behavior of various control schemes in this phase is well studied and understood. In phase two, the system transitions from free motion to being under load from the environment. In phase three, it performs work on its environment and continues to stay coupled to it. An ideal controller would exhibit smooth and stable behavior in all three of these phases.

1.1.1 Position/Force control

From the works of [2–6], who have tackled the task of designing a position/force control architecture, two different approaches to perform simultaneous position and force control have been explored. These are:

Hybrid control. In a hybrid position/force controller, the task space is divided into a po- sition control subspace and a force control subspace. Forces are specified and controlled in directions in which the end effector’s motion is constrained by its environment, while positions and velocities are controlled in the directions in which the end effector is free Introduction 4

Figure 1.1. Position/Force hybrid controller

to move. In [3], a formal position/force task space description is proposed based on a collection of natural and artificial constraints. The natural constraints arise from the environment’s geometry, while inputs are treated as artificial constraints.

Impedance control. Impedance control aims to control the relationship between inter- action force and position errors instead of treating them as separate phenomena. This idea is explored by [7], in which the robot is controlled such that the end effector be- haves like a purely mechanical system, a combination of masses, springs, and dampers.

Impedance control is typically parameterized in terms of a desired motion trajectory and a desired dynamic relationship in Cartesian quantities, called target impedance.

Early work on stiffness and damping control motivated the development of impedance control which now encompasses the former. Impedance control can be classified based on the order of the differential equation in the velocity variable that is used to control the end effector’s dynamics: Introduction 5

Stiffness control: Zero-order impedance control. Stiffness control was first pro- • posed in [8]. It prescribes a relationship between position error and exerted

force through a positive-definite stiffness matrix. The stiffness matrix relates

position errors in each degree of freedom to the desired force. The desired force

is then compared with sensor measurements to provide position corrections to

the robot’s trajectory.

Damping control: First-order impedance control. In damping control, correc- • tions to the robot’s motion are provided as velocity commands. These velocity

corrections are related to the sum of forces exerted at the point of interaction

by a target damping matrix[9].

Second-order impedance control: In this architecture, the system is specified to • have target inertia, damping, and stiffness. At every discrete time step, desired

accelerations are computed as a result of forces acting on the target dynamics.

The robot’s servos are controlled using these accelerations.

1.1.2 Stability of interaction control

The stability of interaction control performance is critical to its performance and has generated a considerable amount of research interest. Out of these, the majority of analyses, for example: [10] ,[11], are based on a single-axis linear model. In these works, several sources of instability have been discussed. They are:

Work piece dynamics • sensor dynamics • link and joint flexibility • Introduction 6

actuator bandwidth • sampling rates • control saturation • low pass filtering • drive train backlash • transmission friction • controller parameter choices • In [10], it is shown that not all of these suspected causes contribute equally to the controller’s instability. Among the linear elements, non-colocation of sensors and actuators, actuator bandwidth, force error filtering, and the presence of an inte- gral term in the controller have proven to be detrimental to stability. Discontinuity at the instant of contact, controller saturation [10], friction [12] and sampling rate [2] are the non-linear elements of the system that have been shown to cause deviations from stable behavior. Non-linear dynamics of a system are difficult to model and analyze. For example, in interaction tasks, the dynamics of the system change drastically upon con- tact. This effect is studied in [2] and [7] where it is shown that a controller that exhibits stable behavior for a robot in isolation is not assured to be stable when the robot begins to interact with its environment.

1.2 Compliant Motion

In the context of industrial robotic arms, a compliant manipulator is one that allows deviations from its equilibrium position in response to an applied external force. Introduction 7

A compliant manipulator finds great potential in applications to assembly line automa- tion. Tasks like grinding and drilling require the robot to be compliant in some axes while exhibiting stiff motion in others. When a robot interacts with an environment, e.g. in assembly manipulators, compliance is limited to motion about the tool center point.

For the robot to be compliant in its motion specified at frames located on other parts of the robot body, a more complicated sensory system is required. An important distinc- tion, based on the source of compliance, can be made: active compliance, and passive compliance. Compliance in a robot can also be achieved using a combination of active and passive methods [13].

Passive Compliance. Passive compliance is physically implemented on the robot arm using a combination of energy storage devices like springs. Instead of relying on any sort of force feedback, they rely completely on these elastic components to reject dis- turbances and hence stay compliant. Although passive compliance comes at the cost of increased system complexity, they do not pose the risk of being unstable when inter- acting with an unknown environment. However, passive compliance is subject to un- compensated errors in force and position tracking due to Coulomb friction. Assembly operations require compliance at the tooltip so passive compliance involves fitting an external spring-damper system at the location where interaction with an environment is expected. Examples of these systems are given in [14].

Active Compliance. Active Compliance incorporates a force compensator into the ro- bot’s control loop to achieve compliant motion. The compensator provides corrections to robot motion based on sensory input, which is usually measurements from a force/torque Introduction 8

sensor mounted on the end effector. As the compensator can be modified during oper- ation, an active compliance controller can be made to adapt to different environments.

Since this method employs force feedback, it is susceptible to instability, which is dis- cussed in later chapters.

1.3 Compliant motion behaviors

It is not simply sufficient for the robot arm to exhibit compliance in response to forces exerted at its tooltip; it must also be able to achieve motion goals and follow trajectories to complete required tasks. These motion goals can be specified as a set of positions and orientations. For an interaction controller to reach these position and orientation goals, they need to be specified as deviations from equilibrium. The interac- tion controller will command the robot’s joints to minimize these deviations from equi- librium in the robot’s task space. Each target pose for the robot is specified as a virtual attractor that exerts a virtual force on the robot’s end-effector. This virtual force is a function of the controller’s target stiffness and the virtual spring deflection. In terms of position, the virtual deflection is computed as the difference between each of the com- ponents of the robot’s current end-effector position and the desired end-effector posi- tion. This results in a 3D vector that represents the translation required for the robot to achieve its desired end-effector location. Using this vector as a spring deflection causes Introduction 9

the robot to experience a virtual force along the unit vector connecting the current end- effector frame’s origin to the desired end-effector frame’s origin. Analogously, orienta- tion targets are dealt with similarly. The major difference is that orientations are speci-

fied as either rotation matrices or quaternions, and the idea of a difference in orientation in three dimensions is ambiguous. However, this ambiguity can be dealt with by using

Euler’s rotation theorem [15]. An extension of this theorem states that two Cartesian coordinate systems with a common origin are related to each other by rotation about some fixed axis. This is also known as the angle axis representation of rotations. At each update step, the controller computes the instantaneous axis of rotation and the angle about this axis the tool frame must be rotated to reconcile with the desired coordinate frame.

The robot controller reacts to these virtual forces and moments and causes the robot to undergo motion. As a consequence of this motion, the virtual spring deflection is modified. Eventually, the robot either reaches its target location where the spring deflection becomes 0 and the controller stops experiencing virtual forces or the robot comes in contact with its environment and exerts equivalent forces and moments at the points of contact.

1.4 Scope of this thesis

This thesis studies the capabilities and limitations of implementing compliant motion control on a servo-controlled robot arm. While direct-torque control of the ro- bot’s axes would be desirable, this is seldom available. Thus it is necessary to consider Introduction 10

implementations that rely on an underlying control loop. The objectives are to achieve behavior that emulates a low-friction, programmable compliant system while assuring contact stability interacting with passive environments.

First, the robot and the proposed controller are analyzed theoretically to iden- tify sources of undesirable behavior. Abstracted models are introduced and analyzed both theoretically and in simulations to identify sources of undesirable behavior, leading to a proposed controller. Upon successfully designing a controller that satisfies key re- quirements, it is implemented on an . A strategy to implement soft real- time control on industrial robots is discussed. Using this robot, which is now capable of compliant motion control, methods that can be used to accomplish force-controlled manipulation tasks are introduced.

Chapter 2 explores the methods used to analyze the stability of interaction controllers. It establishes and derives the metrics used by this thesis to gauge the sta- ble performance of a controller. Modeling choices are motivated and their effect on performance metrics is briefly discussed. Further, it describes and models a chosen controller architecture. Some choices behind the controller scheme implementation are explained. The controller is considered in conjunction with the robot arm dynamics to derive an approximate linear model for the system.

Chapter 3 uses the models derived in chapter 2 to perform an analysis of the stability of the interaction controller. The effect of different components of the con- troller on stability and performance is studied. Factors important to the stability of controllers are isolated and their effects are studied in depth. Additionally, the effect of non-linear un-modeled dynamics on the performance of the system is explored. Introduction 11

Chapter 4 takes the theoretical understanding gained from analyses and ap- plies that on a real robot arm. First, the challenges overcome to implement a real-time feedback controller on an industrial robot are described. A force feedback interaction controller is implemented on this robot and its performance is measured. Using this robotic system, the concept of virtual attractor trajectories is introduced. A virtual at- tractor strategy can be used with an interaction controller to command the robot to semi-autonomously perform complex manipulation tasks. 12

2 Stability of Interaction Controllers

Stability of force feedback controllers has been extensively studied in the past.

An early work, [2] analyzed a force-controlled manipulator interacting with an environ- ment. The manipulator is modeled as a velocity integrator with a discrete-time propor- tional position, velocity, and force feedback. The environment is assumed to be a spring of constant stiffness. From the analysis, a condition for stability was derived as:

0 TGK 1 (2.1) < c <

Where T is the sampling period of the discrete-time controller; G is the force feedback gain; Kc is the combined stiffness of the environment and the sensor. This result implies an inverse proportionality between force feedback gains, the environment’s stiffness, and sampling rate.

In [16], it has been shown that instability in force-feedback is not exclusive to discrete-time controllers. The inverse proportionality between force feedback gains and environment stiffness applies to analog control too. Further work in analyzing stability reveals that instability problems often arise due to the non-colocation of sensors and Stability of Interaction Controllers 13

actuators [17]. The dynamics between the sensor and the actuator need to be considered to better examine their effect on stability.

Another source of concern in force control is the non-linear dynamics of in- teraction. Non-linear dynamics arising due to contact discontinuity have been shown to decrease allowable force feedback gains in [17]. Another non-linear component -

Coulomb friction - introduces errors in the position tracking capabilities, but has been shown in [12] to help stabilize the system.

The effect of controller delays on the stability of a force feedback system has been studied from the perspective of bilateral teleoperation. It was first noted in [18] that large delays had a destabilizing effect on remote positioning of a manipulator with direct force-feedback. In [19], experiments showed that a force-reflecting system with delay was stable only when the bandwidth was reduced and the velocity of operation as low as 0.1 m/s. A solution to the destabilizing effect of delays within force-feedback loops in bilateral teleoperation was suggested in [20], which proposes compensating for the delay within the control law. In [21], another solution to delay induced insta- bility is proposed from the perspective of impedance control. A distributed impedance control architecture is employed, separating the feedback loop from the human-in-the- loop controller. This way, the force-feedback loop experiences far smaller delays than the outer planning loop. Stability of Interaction Controllers 14

2.1 Performance measure

To rationally evaluate and compare interaction controllers a viable performance measure must be defined. In this section, mechanical admittance is proposed as a mea-

sure of performance. Researchers in the area of force control frequently describe results

in terms of force control bandwidth for explicit force control techniques control. How-

ever, bandwidth is an incomplete characterization [22] . These works often describe

stable performance when interacting with a known environment while the same system

could exhibit unstable behavior when in contact with a stiffer environment [23]. The

proposal of mechanical admittance as a measure of performance of interaction is mo-

tivated by applications in force feedback control. A force-feedback controller attempts

to respond quickly to contact forces by rapidly changing its state. The mechanical ad-

mittance, which is also referred to as mechanical driving point mobility, is a measure of

the effectiveness of a system meant to produce rapid motion in response to forces and

torques. Mechanical admittance at the robot’s end-effector can be defined as Y using

the relationship:

t Y(s)w(s) (2.2) =

Where w(s) is the wrench vector experienced by the robot’s end-effector due interac-

tion with the environment. The vector t represents the twist induced in the robot’s end

effector as a effect of the wrench.

Wrench. A generalized force acting on a rigid body, such a the robot’s end-effector, can

be resolved into a linear component and an angular component measured at a point. Stability of Interaction Controllers 15

This pair of forces and moments can be represented as a vector in IR6 as a wrench.

  f w   (2.3) =   τ

Where f and τ IR3. ∈ Twist. As a dual to the wrench vector, a twist vector,t IR6, can be described as a vector ∈ of Cartesian linear and rotational velocities of a point on the rigid body.The twist vector

and the wrench are related to each other by the instantaneous work done by a point on

the rigid body as:

P wT t (2.4) =

A large magnitude of admittance corresponds to a rapid twist induced by a wrench applied on the robot. To maximize the system’s response to external forces, its

admittance must be maximized without causing instability [24].s To simplify this opti-

mization, a relationship between a robot’s admittance and its stability can be derived

using the concept of passivity.

2.2 Passivity

A definition of passive systems extracted from [25] is as follows:

A network will be called passive if it cannot generate or amplify energy,

i.e., if the energy which it has supplied since the beginning of time can-

not exceed the energy which was fed into it. Stability of Interaction Controllers 16

Here, a network is any collection of interconnected components. A robot is considered a mechanical analog to an electrical network. This allows the use of powerful and well developed electrical network modeling and analysis techniques in the context of a robot in interaction with a surface. A port in a network is defined as a pair of ter- minals connecting to an external network - a location where energy transfer takes place.

Usage of ports allows the internal dynamics of a robot to be abstracted into a pair of port variables: an effort variable, and a flow variable.

The resulting power flow, or energy flow per unit time, can be described for each port as the product of these effort and flow conjugate variables. In an electric net- work, the voltage between two terminals of the port is chosen as the effort variable and current flowing in and out of the port is chosen as the flow variable. Mechanical analo- gies to these conjugate variables are possible via simple energy considerations. As the only restriction to form an effort-flow pair is that power = effort * flow, force and velocity can be defined as conjugate variables in a mechanical analog of a port.

e f f or t : f or ce =

f low : veloci t y =

Based on port analysis, using these conjugate variables, a formal definition of passivity can be found in [26]:

Consider an effort-flow pair u(t) and y(t). The instantaneous power into a system with n ports is: N X ­ ® u j (t)y j (t) u(t), y(t) (2.5) j 1 = = Stability of Interaction Controllers 17

For a system with zero initial energy, i.e., one where u(0) y(0) 0 , passivity can be ∗ = formally defined as:

Passivity 1: An n-port system is passive if:

Z T ­u(t), y(t)®dt 0 (2.6) 0 >

For all admissible pairs of u(t) and y(t) and all T 0, the integral of instantaneous power > transferred into the port over t 0 to t T must be greater than 0. This follows from = = other definitions of passivity available in [27] and [28].

While the above definition holds good for a large variety of systems it is typi- cally impossible to know the values of u(t) and y(t) for all values of t > 0. A definition that applies to more specific systems, but one that is useful, can be found in [29], which de- rives a condition for passivity in the context of linear, time-invariant, finite-dimensional systems where u(t) and y(t) are scalars.

To begin, consider a one-port, linear, finite-dimensional, time-invariant sys- tem to which a linear input of the form below is provided:

u(t) u es0t (2.7) = 0

Which results in an output from the system:

u(t) Z (s )y(t) (2.8) = 0

Where Z (s0) is the impedance of the system, u(t) and y(t) form an effort-flow pair, and

s σ jω. = + Stability of Interaction Controllers 18

Passivity 2. A linear, time invariant, one port system is passive iff:

Re{Z (s)} 0 σ 0 (2.9) ≥ ∀ ≥

A function Z (s) which is a real, rational function of s and which satisfies this condition

is called a positive real function. Although computationally complex, Re{Z (s)} can be

evaluated for all values of s σ jω. Another condition can be derived from [30] which = + shows that equations 2.6 and 2.9 equate to the following conditions:

Passivity 3. A linear, time invariant, one port system is passive iff:

(1) Z (s) has no poles in the right half plane

(2) Any imaginary poles of Z (s) are simple and have positive real residues

(3) Re{Z (jω)} 0 ≥ (4) Z (s) has a Nyquist plot which lies wholly within the closed right half plane

An important consequence of passivity that is illustrated by the 4th point above is that

the phase of Z (s), which is the difference between the phase of the output waveform y(s)

and the input waveform u(s), must lie between 90◦ and 90◦. Considering sinusoidal + − waveforms for both u(s) and y(s), If the difference in their phase is 0 then the average value of the product u(t)y(t) is positive which means that the system consumes power.

If the difference in phase is 90◦, the average is 0 and the system is called lossless [31]. If ±

the difference in the phase is 90◦ or 90◦ then the average product is negative which > < − means that the system must produce energy. This violates equation 2.6 proving that the

system is non-passive. Stability of Interaction Controllers 19

From the above definitions two conditions will be used in the subsequent sec- tions to evaluate passivity.

Re{Z (jω)} 0 ω 0 (2.10) ≥ ∀ >

Where j p 1. For an impedance represented as: Z (s) Z θ = − = | |∠

90◦ θ 90◦ (2.11) − ≤ ≤

Where θ is the phase of the system’s impedance - the difference between the phase of

the input waveform and the output waveform.

2.2.1 Analyzing stability from passivity

Before examining the relationship between passivity and stability, a careful

definition of stability will be provided. Considering a robot in contact with an envi-

ronment such that they are mechanically coupled, coupled stability has been defined

by [29] as:

Coupled stability 1. A system is said to have coupled stability property if:

(1) The system is stable when isolated.

(2) The system is stable when coupled to any passive environment which is also

stable in isolation.

Based on this definition of coupled stability, [29] derives the condition for a robot to

exhibit coupled stability behavior as: Stability of Interaction Controllers 20

Coupled Stability 2. A necessary and sufficient condition to ensure that a linear, time- invariant, stable plant coupled at an interaction port to an arbitrary, stable, passive, lin- ear or non-linear environment, is that the plant must have a driving point impedance of a passive system, that is, the impedance or admittance must be positive real.

For a linear system, the relationship between stability and passivity can be de- rived as follows. Considering a linear system admittance Ysys and a linear, passive envi-

ronment impedance Zenv . From [29] it can be shown that contact between the system

and its environment will be unstable if the magnitude Y Z is greater than unity | sys env | when the phase of Ysys Zenv is 180 degrees. Taking into account all possible passive en- vironments, the impedance Zenv may be arbitrarily large at some frequency and could

contribute up to 90 degrees of phase shift. Hence, there could be a passive environ- ± ment that, when coupled with the system, leads to Y Z 1. The only option to | sys env | >

ensure passivity now is that the admittance Ysys cannot introduce more than 90 degrees

of phase shift. Thus, the system must present a passive driving point impedance, imply-

ing that Y (s) must be positive real.

Concepts of passivity have previously been used to analyze the stability of sys-

tems in the related area of haptic simulations in [32] and [33]. In [32], using a two-port

model to characterize the exchange of energy between a human operator, the haptic in-

terface, and a virtual environment, procedures to design stable haptic interfaces have

been derived. The undesirable effect of time delays in haptic interfaces has been miti-

gated in [33] using an adaptive controller that dissipates the energy output of a system,

ensuring its stability. Since the controller is adaptive and not based on worst-case anal-

ysis, any degradation of performance to ensure stability is limited. Stability of Interaction Controllers 21

Figure 2.1. Lumped mass approximation of a robot link

2.3 Robot modeling

It has been shown that a rigid body model of a robot does not perform well when the analyzing stability of force feedback systems. Internal resonances of robot links have proven to be detrimental to the stability of the system [17]. This instability arises from non-colocated actuation and sensing. Although a robot in interaction with an environment exhibits non-linear dynamics due to factors like intermittent contact and friction, a linear model proves to be a good approximation for analyzing controllers.

The approach behind modeling a multi-link system is inspired by the operational space formulation from [34] to describe motion tasks constrained at the end effector. The op- erational space formulation has been shown to achieve high dynamic performance in real-time motion control and active force control of robot manipulator systems. Stability of Interaction Controllers 22

2.3.1 One link model

Considering a linear model as shown in 2.1. This is an arbitrary two-port sys- tem. A motor exerts a force Fa on a mass Ma moving with angular velocity va. Force exerted by the environment is sensed as Fs at the sensor Ms ,which is moving with ve-

locity vs. A transmission between the motor and the link introduces stiffness Kt and

damping Bt acting between two masses. Additionally, motor brush and bearing friction

introduces a damping Ba, acting on the motor inertia. Similarly, link bearing friction is

modeled as damping Bs acting on the distal mass.

Open loop dynamics. The 2 port admittance for open loop excitation of this system in

LaPlace variables is given by:

     vs(s) Yss(s) Ysa(s) Fs(s)      (2.12)   =    va(s) Yas(s) Yaa(s) Fa(s)

Each term of this admittance relationship can be derived separately.

To find the expression for Yaa, consider the two mass system shown in figure

2.1 with a force of Fa being applied on mass Ma. This force causes accelerations in both

masses, Ma and Ms. The differential equations for motion for Ma can be written as:

M x¨ K (x x ) B (x˙ x˙ ) B x˙ F (2.13) a s + t a − s + t a − s + a a = a

Correspondingly, for Ms:

M x¨ K (x x ) B (x˙ x˙ ) B x˙ 0 (2.14) s s + t s − a + t s − a + a a = Stability of Interaction Controllers 23

Converting these differential equations into an expression in the LaPlace continuous variable s representing a relationship between force Fa(s) and velocity va(s):

Kt ¡ ¢ ¡ ¢ Ma va(s)s va(s) vs(s) Bt va(s) vs(s) Ba va(s) Fa(s) (2.15) + s − + − + = Kt ¡ ¢ ¡ ¢ Ms vs(s)s vs(s) va(s) Bt vs(s) va(s) Bs vs(s) 0 (2.16) + s − + − + =

From this, a relationship between vs(s) and va(s) can be found as:

  Kt Bt  + s  vs(s) va(s)  (2.17) =  Kt  Ms s Bt Bs + s + +

Substituting for vs(s) and collecting terms of va(s) and Fa(s)yields:

va(s) Yaa(s) = Fa(s) =

Kt sMs (Bt Ba) + + + s 2 ¡ ¢ Kt s Ma Ms s Ms (Bs Bt ) Ma (Bt Ba) Ba (Bs Bt ) BsBt Kt (Ma Ms) (Bs Ba) + + + + + + + + + + s + (2.18) Stability of Interaction Controllers 24

Using a similar approach as above, expressions for the remaining terms of the admit- tance matrix can be found as:

vs(s) Yss(s) = Fa(s) =

Kt sMa Bt Bs + + + s 2 ¡ ¢ Kt s Ma Ms s Ms (Bs Bt ) Ma (Bt Ba) Ba (Bs Bt ) BsBt Kt (Ma Ms) (Bs Ba) + + + + + + + + + + s + (2.19) and

vs(s) va(s) Ysa(s) Yas(s) = = Fa(s) = Fs(s) =

Kt Bt + s 2 ¡ ¢ Kt s Ma Ms s Ms (Bs Bt ) Ma (Bt Ba) Ba (Bs Bt ) BsBt Kt (Ma Ms) (Bs Ba) + + + + + + + + + + s + (2.20)

Closed loop dynamics. Under feedback control, the dynamics of a plant are influenced by the action of the feedback loop. The endpoint admittance of a system under closed loop control differs from its open loop admittance as the control input forces are now influenced by feedback signals. To derive an expression for the closed loop endpoint admittance of a two-mass, one DOF system as shown in 2.1, a generalization can be made about the controller. Consider a generic control law of the form:

F (s) G (s)v (s) G (s)F (s) (2.21) a = v a + f s Stability of Interaction Controllers 25

The velocity compensator in this controller receives feedback about the veloc- ity of mass Ma. This is because position and velocity sensors in a robot are located di- rectly on the actuators, states of the distal mass are not measured. The sensor is placed on the distal mass and can measure forces on Ms, which are represented as Fs. This models the non-colocation of sensing and actuation, which is a source of instability in interaction control.

Since admittance at the sensor port needs to be tested for passivity an expres- sion for Yss,cl (s) can be derived:

    ¡ ¢ vs(s) Yss(s)Fs(s) Ysa(s) Gv (s)vs(s) G f (s)Fs(s)    + +  (2.22)   =   v (s) Y (s)F (s) Y (s)¡G (s)v (s) G (s)F (s)¢ a as s + aa v s + f s

Rearranging and collecting terms of vs(s) and Fs(s) results in:

1 ¡ ¢¡ ¢ 1 Y (s) v (s)F (s)− Y (s) Y (s)G (s) I Y (s)G (s) − (2.23) ss,cl = s s = ss + sa f − sa v

For any control architecture that can be expressed as equation 2.21, this ex-

pression for closed-loop admittance at the sensor port can be used to check for passivity.

Feedback gains could also be represented as a ratio of polynomials is s.

2.3.2 Two link model

While the single link approximation works well to capture the effects of inter-

nal resonances on stability, it fails to account for violations of passivity arising from the

configuration of the robot’s joints or its pose. Since the controller acts on the Cartesian Stability of Interaction Controllers 26

space around a robot’s tooltip, it experiences varying dynamics at different poses. From literature[35], it is known that the dynamics of a robot on which forces are being exerted are dependent on the pose of the robot as:

JT w τ H(q)q¨ C(q,q˙)q˙ g(q) (2.24) s + = + +

Where JT is the transpose of a Jacobian matrix that relates a vector of joint velocities, q˙ to a vector of translational and angular velocities measured at the sensor. The vector ws is a wrench vector of forces and moments measured at the sensor. The vector τ consists of the joint torques applied on the robot by its motors, presumed to be control inputs.

The Jacobian matrix J in this analysis is computed with respect to the sensor frame.

Equation 2.24 shows the influence of q, the robot’s joint angles, and its deriva- tives on the robot’s dynamics. A single link model is not able to capture these nuances.

Using a two link model, one can capture the pose dependent behavior of passivity, and by extension, stability.

Open loop dynamics. The open loop model for a non-idealized robot considers two important aspects of dynamics that are shown to affect stability:

Transmission dynamics: Transmissions are a significant source of friction and • compliance. Long links with compliant transmission components introduce

compliance between link inertias and reflected motor inertias. These non-colocated

dynamics can result in instability of force feedback.

Robot pose: The robot’s pose has a non-trivial effect on endpoint dynamics. • Even with low velocity applications, inertial component of the robot vary sig-

nificantly depending on its joint angles. Stability of Interaction Controllers 27

Considering a robot link with transmission ratio R, its ideal behavior, considering infi- nite stiffness, is: 1 qtr ans,out qtr ans,in = R

Assuming ideal behavior, its torque relationship is:

Rτ τ tr ans in = tr ans,out

Here tr ans,in denotes input to the transmission and tr ans,out denotes output from the transmission. Since a non-ideal model is being considered, a linear model for the transmission can be expressed:

τ K ¡q /R q ¢ B q˙ (2.25) tr ans,out = tr ans tr ans,in − tr ans,out − tr ans,out tr ans,out and:

τ K /R ¡q /R q ¢ B q˙ (2.26) tr ans,in = tr ans tr ans,in − tr ans,out + tr ans,in tr ans,in

Where:

Ktr ans is the transmission stiffness measured at the output

Btr ans,in includes both transmission friction and bearing friction associated with the motor’s armature

Btr ans,out is the combined effect of the transmission friction and link bearing friction

qtr ans,out is the angular position measured at the output of the transmission

qtr ans,in is the angular position of the motor armature

By definition, torques output from the transmission are equal to torque output by an Stability of Interaction Controllers 28

ideal robot.

τ τ tr ans,out = links

Similarly, the robot’s joint angles are equal to the transmission output angles, hereon referred to as qlinks

q q links = tr ans,out

In equation 2.24, at low velocities, the Coriolis and Centrifugal forces on the robot can be ignored as q˙ is very small. The term g(q) can also be ignored for the analysis.

For contact dynamics, the ideal model is:

JT w τ H(q)q¨ (2.27) s + =

Extending this model to the non-ideal case:

JT w τ H (q )q¨ (2.28) s + links = links links links

For convenience, a quantity q can be defined as the scaled motor angles: q act act = 1 R− qmotor . Using this representation, the robot’s dynamics are expressed as:

H q¨ K q B q˙ Γ w Γ τ (2.29) sys sys = − sys sys + sys sys + w s + act act

Where:   qlinks q   sys =   qact Stability of Interaction Controllers 29

The system’s inertia tensor is defined as:

  ¡ ¢ Hlinks qlinks 0 H   sys =   0 Hact

The system’s damping is defined as:

  Blinks 0 B   sys =   0 Bact and the system’s stiffness:   Ktr ans Ktr ans K  −  sys =   K K − tr ans tr ans Additionally, the effect of the Jacobian matrix is represented as:

  0 γ   w =   JT

Similarly,   I γ   act =   0

Converting the equation to LaPlace variables, the dynamics are expressed as:

µ 1 ¶ γ ws(s) γ τact (s) Hsys s Bsys Ksys ωsys (2.30) w + act = + + s

Where: d ωsys qsys = dt Stability of Interaction Controllers 30

The open-loop impedance of the system is related to torques and joint veloci- ties as:

Z (s)ω τ (2.31) sys sys = sys

Comparing equation 2.31 above with 2.30,

1 Zsys(s) Hsys s Bsys Ksys (2.32) = + + s

And by extension, the open-loop admittance of the system is:

µ ¶ 1 1 1 − Ysys(s) Z− (s) Hsys s Bsys Ksys (2.33) = sys = + + s

Closed loop dynamics. To derive the expression for impedance and admittance of a closed loop n-link system, consider the following generic control law in LaPlace domain:

τ G (s)ω G (s)Jt w (2.34) act = v act + f s

This can also be expressed as:

· ¸ T τact 0 G (s) ωsys Gf (s)J ws (2.35) = − v +

Substituting for τact :

µ· ¸ ¶ T γ ws γ 0 G (s) ωsys Gf (s)J ws Zsys(s)ωsys (2.36) w = act v − + Stability of Interaction Controllers 31

Collecting terms of ωsys and rearranging the expression:

     JT 0 0        Zsys  ωsys T = + Gf (s)J 0 Gv (s)

Since the impedance presented at the interaction port is being considered, this can be

rewritten in terms of Cartesian twist and wrench at the sensor. Using

· ¸ t J 0 ωsys =

Substituting for ωsys:

 1    −   · ¸ 0 0 JT       t  J 0 Zsys    ws (2.37) =  + T  0 Gv (s) Gf (s)J

Using the definition of Cartesian endpoint admittance from 2.2, the closed

loop endpoint admittance in Cartesian flow variables at the sensor port can be defined

as:    1   − T · ¸ 1 0 0 J      Ysys,cl J 0 Hsys s Bsys Ksys     (2.38) = + + s + T 0 Gv (s) Gf (s)J

For any controller that can be expressed as 2.21, this expression for admittance holds good. Here, Gv (s) and Gf (s) are matrices of ratios of polynomials of the velocity and force feedback compensators. Stability of Interaction Controllers 32

Figure 2.2. The interaction controller

2.4 Controller model

The controller implemented in this thesis for analysis and experimentation is based off an interaction controller developed at Adept Technologies [36]. The block di- agram of this controller is available in figure 2.2. Elements of the controller present in the original model but unused in this thesis are illustrated with dashed lines. It assumes an input of a vector of target velocities, x˙cmd . An integrator is applied on x˙cmd which results in a target position vector, xcmd . The robot’s current position, xcur r is received from feedback. An error command is generated from x x , which is multiplied cmd − cur r by a virtual stiffness, Kvir t . This produces a virtual feed-forward force Fvir t that the ro- bot must exert to reach xcmd . Wrench exerted on the robot at the interaction port is measured by a sensor as F . An error signal, F F is fed into the controller. The s vir t − sense controller models the dynamics of a virtual inertia, Mvir t and a virtual damping, Bvir t .

The output from this integrator is a velocity, vdes. This is the resultant velocity input to the robot’s servos along with a position command, which is an integration of the velocity command over the discrete time step.

The Adept controller model needs to be modified to capture the effects of controller latency that affects industrial robots. The influence of transmission delays Stability of Interaction Controllers 33

is modeled between the compliance controller and the robot’s servos as shown in fig-

sTd ure2.3. The delay in a linear system can be represented as the term e− where Td is the

modeled delay in seconds and s is the LaPlace variable.

Implementing an interaction controller on a robot with multiple degrees of

freedom requires additional considerations. First, the forward kinematics that maps a

robot’s joint positions and its resulting end-effector position must be understood. Addi-

tionally, since the high level compliance controller provides inputs to the robot’s servos,

Cartesian commands resulting from the interaction of forces at the end-effector must be

represented in the robot’s joint space. This is facilitated by the robot’s Jacobian, which

maps perturbations in the robot’s joint angles to perturbations in the robot’s end effector

position in Cartesian space. These conversions between quantities in the robot’s joint

space and Cartesian space are included in the controller’s model illustrated in figure 2.4.

The three tunable parameters of this controller are: a desired stiffness, a de-

sired damping, and a desired inertia. In a discrete time system, considering translational

dynamics, this controller would be implemented as:

ΣF F F B v = s + vir t − des ∗ act

1 a M− F des = des

v v a dt des = act + des

2.4.1 Single link model

Treating the robot as a one degree of freedom link implies that the controller also compensates for force and motion in only one degree of freedom. Further, a single Stability of Interaction Controllers 34

Figure 2.3. The interaction controller with modeled latency

link model does not make a distinction between joint space and Cartesian space. Using this model, illustrated in figure 2.3, the controller’s action can be representing using the

LaPlace variable s as:

F (s) K (x (s) x (s)) (2.39) des = vir t cmd − cur r

Where

vcmd xcmd (s) = s and

vcur r (s) xcur r (s) = s

The effect of the impedance controller on Fdes is:

Fdes vdes(s) (2.40) = M s Bvir t vir t +

The torque output from the servo considering the effect of latency will be:

µ Kp ¶µ K 1 ¶ ¡ sTd ¢ vir t T (s) e− Kv (vcmd vcur r ) Fsense = + s M s2 B s − + M s B vir t + vir t vir t + vir t (2.41) Stability of Interaction Controllers 35

Comparing equation 2.41 with the standard form of velocity and force feedback servo as in equation 2.21 yields:

µ ¶µ sTd ¶ Kp e− Kvir t Gv (s) Kv 1 (2.42) = + s M s2 B s + vir t + vir t

µ ¶µ sTd ¶ Kp e− G f (s) Kv (2.43) = + s M s B vir t + vir t

2.4.2 Multiple link model

Figure 2.4. The interaction controller with modeled latency implemented on a robot

The controller described in figure 2.4 acting on a multiple degree of freedom, lumped mass system can be described in LaPlace variables as shown below. The con- troller differs slightly from the single degree of freedom case. As seen in the illustration, every controller update step requires the robot’s forward kinematics and its Jacobian to be computed. This allows regulation of Cartesian impedance while controlling robot’s joint space. Additionally, the controller deals with vector quantities. Considering a two degree of freedom system, torque exerted by the controller can be written as:

τ (t) K ¡q˙ (t) q˙ (t)¢ K ¡q (t) q (t)¢ (2.44) m = v cmd − act + p cmd − act Stability of Interaction Controllers 36

Where Kv and Kp are matrices whose elements are the velocity and position servo gains of each motor respectively. The vector q˙ cmd is a set of desired joint velocities output from the impedance controller and the vector qcmd are the corresponding joint angles upon integration. The vector q˙ act represents a vector consisting of the feedback joint veloci- ties of each motor, similarly, the vector qact consists of feedback joint angles. Equation

2.44, when expressed in the LaPlace domain:

τ G ¡q˙ q˙ ¢ (2.45) m = pd cmd − act

Where:   τm1 0 τ   (2.46) m =   0 τm2   Kp1 Kv1 0 sTd  + s  Gpd e−   (2.47) =  Kp2  0 Kv2 + s   q˙1 0 q˙   (2.48) =   0 q˙2

Where q˙ cmd is the output desired joint velocity from the impedance controller. The ac- tion of the impedance controller can be expressed as:

1 t (s) (M s B )− (K (x (s) x (s)) w (s)) (2.49) cmd = vir t + vir t vir t des − act + s

In equation 2.49, tcmd is the desired Cartesian twist command from the impedance con- troller. Twist at the end effector can be expressed in terms of joint velocities using the Stability of Interaction Controllers 37

manipulator’s Jacobian matrix J as:

1 q˙ J− t (2.50) =

Additionally, xact is the Cartesian position of the end effector which can be represented as:

vact 1 ωact xact J− (2.51) = s = s

Using the above relationships, an expression for the desired torque to be exerted by the

motors can be derived to be:

1 2 1 2 1 τ G (J− ((M s B s)− (K J)q˙ (M s B s)− (K J)q m = PD vir t + vir t vir t cmd − vir t + vir t vir t act +

1 (M s B )− w ) q ) vir t + vir t s − act

(2.52)

Comparing this expression to the standard form of a velocity and force feed-

back control law results in the following definitions for Gv (s) and Gf (s):

³ 1 ¡ 2 ¢ 1´ G (s) G I J− K J M s B s − (2.53) v = PD + vir t vir t + vir t

1 1 G (s) G J− (M s B )− (2.54) f = PD vir t + vir t

2.5 Passivity analysis

From section 2.2, a system is passive if it satisfies the following condition: Re{Y } ss ≥ 0. Analytically evaluating the positive realness of an admittance or impedance matrix Stability of Interaction Controllers 38

can be quite complex. An alternative, a numerical evaluation of passivity can be carried out by sampling the admittance expression over a range of frequencies and then check- ing for any negative eigenvalues. By applying the Fourier transform on the admittance matrix, it can be represented as a function of frequency ω using the relationship s jω. = To search for frequency of exerted wrench that causes the system to be non-passive:

(1) choose a sampling frequency, ω

(2) For this sample value of ω, substitute s for jω in the expression for Y (s), result-

ing in Y (jω).

(3) Separate Y (jω) into a sum of real and imaginary parts: Y (jω) Re{Y } j = + ∗ Im{Y }

(4) Compute eigenvalues of Re{Y }

(5) Examine whether each eigenvalue is positive

(6) If any eigenvalue has a negative real part, the system is non-passive

(7) Else, continue with the next sample of ω

If the system has a negative real eigenvalue of admittance at any frequency, the system is non-passive. The effectiveness of a numerical search method is limited by its sampling choices. Hence, it is important to choose values of ω such that the behavior of Y (jω) is captured correctly. Sample frequencies ω should range from below the lowest resonance of the system to above the highest resonance. Samples must be closely spaced together near resonances as Y (jω) can change rapidly near resonances. Stability of Interaction Controllers 39

2.6 Simulation

An important limitation of analyzing stability from passivity is that the anal- ysis uses a linear model of the robot. Non-linear components of the system’s dynam- ics, like Coulomb friction, thus cannot be incorporated into the passivity analysis. A simulation of a robot can be built that incorporates most of its important dynamics to predict its behavior. The primary purpose of this simulation is to observe and quan- tify the performance of a compliant motion architecture on a system with non-linear dynamics. It simulates the internal dynamics of a two-link robot with position and ve- locity servos on each of its motors. Each link is modeled as a two-mass system, one mass representing the actuator motor and the other representing the link. It also serves a secondary purpose in validating the information received from analyzing a system’s passivity. Furthermore, it paints a more understandable, albeit less concise, picture of a controller’s performance by providing an estimate of the actual velocities and forces observed during compliant motion, something that the passivity analysis method ab- stracts into admittance, which is admittedly less intuitive. This is especially useful in prescribing controllers for robot arms. 40

3 Passivity Analysis

This chapter uses passivity analysis methods described in chapter 2 on a hy- pothetical model of a robot. Section 3.3 compares the results of the numerical-search based passivity analysis method with a classical control theory tool, the Bode plot. Sta- bility of two links of the robot arm will be analyzed, the ’shoulder’ and the ’elbow’. Sec- tion 3.3 studies the passivity of each joint in isolation, while section 3.4 studies passivity of a two link system comprising both the shoulder and the elbow. It also attempts to pre- scribe controller parameters that assure stability based on the robot’s internal dynamics.

Finally, the non-linear simulation is employed to observe the influence of Coulomb fric- tion on the controller’s performance.

3.1 Robot Model

An approximation of a hypothetical 2-DOF robot’s dynamics will be used for analysis in the rest of this chapter. The dynamics of each of these links has been ap- proximated as shown in figure 2.1 with values listed in table 3.1. Throughout the rest of this chapter, the following notation is used: The subscript act stands for actuator, in a lumped model, this is used to represent the dynamics of the mass on which the servo Passivity Analysis 41

Shoulder link Elbow link Actuator inertia 100 K g m2 30 K g m2 − − Link inertia 100 K g m2 30 K g m2 − 1 − 1 Transmission stiffness 400000 N m r ad − 200000 N m r ad − − − 1 − − 1 Transmission damping 200 N m s r ad − 200 N m s r ad − − − − 1 − − − 1 Actuator damping 1500 N m s r ad − 600 N m s r ad − − − − 1 − − − 1 Link damping 20 N m s r ad − 20 N m s r ad − − − − − − − Table 3.1. Model arm dynamics

applies torque commands. The subscript link refers to the second mass in the lumped model on which the environment applies a wrench.

The links of the robot are actuated using servo motors. The shoulder and the elbow joint both are controlled by a velocity PI servo with behavior:

Z u(t) G e(t) G e(t)dt (3.1) = v + p

Where u(t) is a vector where each element is the torque exerted by the motor of each joint; e(t) is a vector of error signals to the servos, which is the difference between de- sired joint velocities and actual joint velocities of each joint; Gv is the proportional gain on the velocity error; and Gv is the integral gain on the position error. Each servo motor on the robot arm has been approximated to have a bandwidth of 2.5 Hz and a damping 1 ratio of . Where: p2 s Gp BW = H H act + link

Gv ζ = 2 BW (H H ) ∗ ∗ act + link Passivity Analysis 42

Using these parameters, a two-link model can be approximated by considering the shoulder link and the elbow link to be connected in series.

3.2 Single link analysis

Analyzing the elbow and the shoulder link in isolation does not completely capture the pose dependent dynamics of a robot. Yet, it is still useful to analyze each link for passivity under feedback control as it reduces the complexity involved. As the number of links increases, the admittance matrix grows in dimension. If either of the links presents a non-passive admittance at their interaction port, it can be assured that the robot will be unstable. However, the inverse of this is not true, the passivity of a robot is not assured by each of its links presenting a passive admittance. Analyzing each link separately also helps in identifying and isolating the effect of different components of the controller on passivity.

From the definitions of passivity provided in chapter 2, there are two condi- tions to assure that a system is passive. If either of these conditions is met, the system is passive and will be stable in contact with a passive environment. The following sec- tion will make passivity predictions using two different methods: the numerical search method proposed in the previous chapter, and a Bode plot. The condition for passivity in the numerical search method is that the eigenvalue of admittance at any frequency is greater than 0. In a single link system, the driving point admittance, being a scalar, has one eigenvalue, the admittance itself. The condition of phase lead/lag not exceeding

90◦ can be verified by making a Bode plot of the admittance. By definition, the Bode ± Passivity Analysis 43

plot is simply the frequency response of the system and effectively provides the same in- formation as the numerical search method, just represented differently. Initial iterations to analyze passivity employed both of these methods for completeness.

Figures 3.1 and 3.2 contain the two frequency response plots of the elbow link and the shoulder link respectively with controller parameters of:

Controller parameters:

Desired endpoint inertia: • M 500 des =

Desired endpoint damping: •

B 500 des =

Desired endpoint stiffness: •

K 500 des =

Bandwidth: 2.5Hz • 1 Damping ratio: ζ • = p2 Controller delay: 0ms. •

The system is passive. From the frequency Bode plot on the left, it is clear that the phase of the admittance asymptotically approaches -90◦ but never exceeds it, hence it is pas- sive according to the conditions in section 2. In the plot to the right, one can see that the

1 1 real part of the system’s admittance is positive in the range (0.01r ad s− ,1000r ad s− ). − − Hence, it is passive. Passivity Analysis 44

Figure 3.1. Elbow link frequency response plots - no delay case

Figure 3.2. Shoulderlink frequency response plots - no delay case

Figures 3.3 and 3.4 contain frequency plots for the same system but with a con- troller delay of 10ms. The two links are still passive in this case. The phase Bode plot does not exceed -90◦ and the real part of the system’s admittance is positive.

On further analysis of the effect of servo feedback gains on passivity, it can be seen that the servo’s position feedback gain is the most detrimental to passivity. This is illustrated in figure 3.5, where the servo’s bandwidth was chosen to be 7Hz. In the Bode

1 plot, the phase exceeds -90◦ at 10 r ad s− , where the absolute magnitude is larger − Passivity Analysis 45

Figure 3.3. Elbow link frequency response plots - with 10ms delay

Figure 3.4. Shoulderlink frequency response plots - with 10ms delay

than 1. The real part of the admittance also crosses into the negative plane at the same frequency. This system is non-passive and hence it will exhibit unstable behavior when coupled with some passive environment. Passivity Analysis 46

Figure 3.5. Shoulder link frequency response plots - Bandwidth = 7Hz, delay = 10ms. The plot is in red for frequencies where the real part of the eigenvalues are negative.

3.3 Two link model analysis

3.3.1 Effect of pose

As briefly mentioned earlier, the passivity of the robot is not guaranteed by simply ensuring that each of its links is passive. This is illustrated in figure 3.6. Here, the two link model consists of the same shoulder and elbow links along with the same controller parameters as examined in section 3.3. From the figures 3.4 and 3.3, we know that each link is passive in isolation. However, figure 3.6 shows that when these links are considered together as a two degree of freedom robot, the system violates the condi- tions set for passivity. This violation of passivity can be attributed to the pose dependent dynamics of the robot. In 3.6, the robot’s joint angles are at q 0◦ and q 45◦. 1 = 2 = The effect of pose on a robot’s passivity is further illustrated in figure 3.7, which shows the same robot with the same controller, but at different poses. The robot is stable π π in a state where q1 0 and q2 but passivity is violated at q1 0 and q2 . The = = 2 = = 4 Passivity Analysis 47

main reason for this is that the controller attempts to enforce the same target dynamics at both of these poses, and fails.

Figure 3.7 shows the passivity trend of the robot with arbitrarily chosen con- troller parameters of:   1000 0 K   • des =   0 1000   2000 0 B   • des =   0 2000   2000 0 M   • des =   0 2000 Servo position bandwidth: 2.5Hz • 1 Servo ζ • = p2

It can be noted a two link arm is more susceptible to presenting a non-passive admit- tance at its endpoint for angles close to 0 or π radians. This information can also be used to prescribe a controller such that the system is passive throughout the expected range of motion.

3.3.2 Effect of target inertia

Examining the closed loop model, the target inertia Mdes influences both the force feedback gain and the velocity feedback gain of the system. To understand the in-

fluence of target inertia, it can to be represented as a dimensionless quantity. Since the controller is responsible for suppressing the robot’s natural dynamics and making the system mimic some chosen dynamics, a generalized measure of its capability to do so Passivity Analysis 48

Figure 3.6. Two link model violating passivity with 10ms controller la- tency. Negative values for the real part of the Eigenvalues of admittance are plotted in red.

Figure 3.7. Violation of passivity of the same robot and controller at dif- ferent poses. Left plot: Joint 1 = 0, joint 2 = 90.◦ Right plot: Joint 1 = 0, joint 2 = 45.◦ Sections of this plot marked in red represent non-passive regions.

would require expressing the target inertia as a ratio of the robot’s natural endpoint in- ertia. This form of expression helps in understanding the extent to which the controller is able to successfully suppress the robot’s natural inertia. Passivity Analysis 49

The robot’s Cartesian space inertia can be expressed by deriving an equiva- lence between the robot’s impedance in joint space and Cartesian space. At low velocity applications usually found in compliant motion the effect of Coriolis forces can be ig- nored. A Cartesian wrench w acting at the robot’s end effector will cause the system to accelerate, resulting in a Cartesian twist, t. The wrench will cause an equivalent torque in each joint of the robot, τ. A velocity in each of the robot’s joints, q˙, arises from the ac- tion of τ. The equivalence between w and τ can be found by considering the total work

done by the forces and moments on the robot:

δWork τT q˙ wT t (3.2) = =

The robot Jacobian relates infinitesimally small joint velocities with Cartesian velocities as:

t Jq˙ (3.3) =

From equation 3.3, the relationship between force in Cartesian space and its equivalent torque on the robot’s joints can be found as:

τ JT w (3.4) =

As an effect of w, the robot will experience an acceleration in the Cartesian space proportional to its endpoint inertia:

w H ˙t (3.5) = endpoint Passivity Analysis 50

Using the Jacobian relationship, ˙t can be expressed as:

· ¸ ˙t ˙Jq˙ Jq¨ (3.6) = +

Considering operations where the velocities reached by the robot are low in magnitude, the term J˙q˙ can be approximated to zero. This results in:

w H ¡Jq¨¢ (3.7) = endpoint

Substituting for w:

τ ¡JT H J¢q¨ (3.8) = endpoint

From this, the equivalence between the robot’s inertia tensor and the Cartesian inertia it presents at the interaction port is:

¡ 1¢T 1 H J− HJ− (3.9) endpoint =

Finally, expressing target inertia in terms of natural inertia as:

³¡ 1¢T 1´ M N J− (H H )J− (3.10) des = links + acts

Where N is a scalar value representing the ratio between desired endpoint inertia and natural endpoint inertia. In equation 3.10, Mdes is not assured to be a diagonal matrix.

A non-diagonal target Cartesian inertia implies a coupling of motion between the two degrees of freedom of the robot. By using a non-diagonal target inertia, it cannot be en- sured that forces acting on a robot along an axis will result in velocities along the same axis. This behavior, while not undesirable from a compliant motion perspective, could Passivity Analysis 51

lead to unintuitive motion of the robot arm. From the perspective of a robot attempting manipulation in constrained spaces, it could be advantageous to have decoupled mo- tion. Figure 3.8 provides a closer look at the effect Mdes, represented as a multiple of the robot’s natural inertia, has on passivity.

Coupling effects arising from a non-diagonal target endpoint inertia matrix choice can be avoided by setting the target endpoint inertia to be a purely diagonal ma- trix. Figure 3.9 shows its effect on the system’s passivity. For this analysis, the target endpoint inertia matrix is a diagonal matrix where each of its non-zero elements are set as the largest quantity of (H H ), multiplied by a ratio N. The X-axis represents links + acts the ratio N. A strictly diagonal target endpoint inertia matrix implies that the controller successfully suppresses any inertial coupling in the robot. This itself can be considered as a form of inertia reduction. The system being evaluated has the following controller parameters:

  500 0 K   • des =   0 500   2000 0 B   • des =   0 2000 Servo bandwidth = 2.5 Hz • 1 ζ • = p2 Latency = 10ms •

From figures 3.8 and 3.9, it can be seen that passivity can be achieved by scaling the robot’s natural inertia up by a factor of 1.3 if a diagonal target endpoint inertia is Passivity Analysis 52

Figure 3.8. Effect of non-diagonal Mdes on passivity employed. However, if a non-diagonal endpoint inertia matrix is used, it needs to be scaled up to a factor of 1.7.

3.3.3 Effect of desired stiffness

The target stiffness of the controller, Kdes influences the velocity feedback gain of the controller, as seen in the closed-loop model. Apart from passivity, the target stiff- ness is responsible for the system’s force and position tracking accuracy. When coupled with an environment, Kdes and the virtual spring deflection dictate the forces and mo- ments exerted by the robot at the contact port. In the absence of an environment, the robot will continue to exert forces and moments move until the virtual spring deflec- tion becomes zero. This behavior is useful in applications where the robot must reach a Passivity Analysis 53

Figure 3.9. Effect of diagonal Mdes on passivity

position target while applying a controlled force on its environment. Hence, in the con-

text of manipulation, the choice of its values is greatly influenced by factors other than

passivity.

The effect of Kdes on the system’s passivity is illustrated in the figure 3.10 . Tar-

get stiffness is represented as a 2x2 identity matrix multiplied by a scalar value, which

1 is plotted along the X-axis, which is of the units N mr ad − . It can be noted that there −

is an upper limit to the possible choice of Kdes beyond which the system becomes non-

passive. The exact value of this upper limit is a function of all other parameters in the

controller, however, a generalization can be made regarding the relationship between

increasing target stiffness and the system’s stability. For this plot, the following controller

parameters were chosen: Passivity Analysis 54

Figure 3.10. Effect of desired stiffness on passivity

  2000 0 B   • des =   0 2000   2000 0 M   • des =   0 2000   1 0 K N   • des = ∗   0 1 Servo bandwidth = 2.5 Hz • 1 ζ • = p2 Latency = 10ms • Passivity Analysis 55

3.3.4 Effect of target damping

The target damping of the controller, Bdes influences force and velocity feed- back terms of the closed loop model. Experimentally, target damping has proven to be the most detrimental factor for passivity. Target damping can also be treated as the abil- ity of the controller to suppress both linear and non-linear friction in the robot. In terms of performance, a low target damping implies that the robot is more responsive to forces, which is desirable for manipulation tasks. Hence, the optimal choice of target damping would be one that is as low as possible in magnitude while preserving passivity. If the target damping is chosen such that the damping ratio, ζ of the system is less than 1, the system convergences faster, at the cost of some oscillations. From the perspective of a robot’s performance in contact tasks, it is ideal to suppress any oscillations by choosing a target damping such that ζ 1. However, the value of ζ is influenced by any damping = components of the environment. This makes it impractical to choose a target damp- ing based on the system’s critical damping, as the only information assumed about the environment is that it is passive. An implication of this trade-off is that, for an arbitrary environment, a passive robot-controller might produce undesirable oscillations on con- tact but will eventually converge. Figure 3.11 looks at the influence of target damping on passivity. It can be noted that, unlike target inertia and desired stiffness, target damping has both a lower and an upper limit for passivity. This suggests a general trend that the choice of target damping has an ideal window for passivity, placing further restrictions on attempting to completely prevent oscillations. The effect of target damping on any non-linear friction in the robot is examined in later sections.

The remaining controller parameters for the system being analyzed are: Passivity Analysis 56

Figure 3.11. Effect of target damping on passivity

  1000 0 K   • des =   0 1000   2000 0 M   • des =   0 2000   1 0 B N   • des = ∗   0 1 Servo bandwidth = 2.5 Hz • 1 ζ • = p2 Latency = 10ms • Passivity Analysis 57

3.3.5 Effect of servo position gain

Analyzing the effect of each motor’s servo position gain, Kp , in isolation is com- plex due to a large number of adjustable parameters. To understand the effect of Kp on

passivity, it can be expressed in terms of bandwidth.

The effect of servo position gain is illustrated in figure 3.12, which plots band- width on the X-axis and the lowest eigenvalue of admittance over a range of frequencies

on the Y-axis. While the servo position bandwidth is being varied, the remaining con-

troller parameters are set at:   1000 0 K   • des =   0 1000   2000 0 B   • des =   0 2000   2000 0 M   • des =   0 2000

Kv 10 • M = Latency = 10ms •

It can be noted that, given a set of controller parameters, the servo position bandwidth has both a lower limit and an upper limit for passivity.

3.3.6 Effect of servo velocity gain

The motor’s servo velocity gains have been analyzed by considering the ratio

Kv of velocity gain to the total mass on which the motor exerts its torque: . Similar to M Passivity Analysis 58

Figure 3.12. Effect of servo position bandwidth on passivity

the trend of servo position gains, servo velocity gains have a lower and upper bound for passivity.   1000 0 K   • des =   0 1000   2000 0 B   • des =   0 2000   2000 0 M   • des =   0 2000 Bandwidth: 2.5Hz • Latency = 10ms • Passivity Analysis 59

Figure 3.13. Effect of servo velocity gain on passivity

3.3.7 Simulation results

Using the analyses in the previous section, an optimal set of controller param- eters was chosen and used in a time-domain simulation. The simulation depicts a robot and a flat wall parallel to the X-axis. The simulation was built to capture the effect of non- linear dynamics like friction. It can also simulate the effects of controller latency. The simulation uses Eulers one-step integration method to simulate the physics involved.

The controller parameters chosen for this simulation were:   1000 0 K   • des =   0 1000   2000 0 B   • des =   0 2000 Passivity Analysis 60

  2000 0 M   • des =   0 2000 Bandwidth: 2.5Hz • 1 ζ • = p2 Latency = 10ms •

Figure 3.15 contains two plots showing results of the simulation. The position plot con- tains the Y-axis coordinate of the robot’s end effector on its Y-axis and time on its X-axis.

The robot starts at a home position and, due to the action of the controller, attempts to move to a preset attractor pose. The attractor pose is set to be 5cm beyond the surface in the Y-axis. Similarly, the force plot contains the interaction force between the robot and the surface on the Y-axis and time on the X-axis. Figure 3.14 shows the plot of this system’s admittance over a range of frequencies. The real part of the system’s admittance is positive in the chosen range, and hence the system is passive. These values make it easy to examine stability. An unstable system would be one in which the robot starts chattering against the surface with increasing magnitude and moves farther away from the surface at each oscillation.

Figure 3.17 depicts simulation results run with controller parameters that are proven to result in non-passive behavior as seen in figure 3.16. The real part of the sys- tem’s admittance is negative for some values in the chosen range of frequencies. The robot continues to experience chatter with the impact force increasing with each oscil- lation. The controller parameters chosen for this simulation were:   1000 0 K   • des =   0 1000 Passivity Analysis 61

Figure 3.14. Real part of admittance is positive over the chosen range of frequencies, the system is passive

  1000 0 B   • des =   0 1000   1000 0 M   • des =   0 1000 Bandwidth: 2.5Hz • 1 ζ • = p2 Latency = 10ms • Passivity Analysis 62

(a) Position plot. The robot’s end effector position along Y-axis is represented in red. The blue trace represents the surface that the robot is approaching.

(b) Force plot. This plots the Y-axis component of the force being applied by the robot on the surface.

Figure 3.15. Stable system simulation Passivity Analysis 63

Figure 3.16. Real part of admittance is negative for certain frequencies in the range, the system is non-passive

3.4 Coulomb friction analysis

3.4.1 Introduction

The model used in the above analysis has been useful in studying the effect of the system’s linear components on passivity and stability. However, un-modeled non- linear components like friction have been shown to affect a system’s stability. The influ- ence of non-linear friction on the system has been studied using the time-domain sim- ulation. The simulation is able to capture the influence of friction using the Coulomb model. The Coulomb model of friction can be represented by the following expression:

  F Sgn(x˙) if x˙ 0  c 6= F f (3.11) =   F if x˙ 0 − a = Passivity Analysis 64

(a) Position plot. The robot’s end effector position along Y-axis is represented in red. The blue trace represents the surface that the robot is approaching.

(b) Force plot

Figure 3.17. Unstable system simulation Passivity Analysis 65

Where F f is the force on the system due to friction, Fc is the magnitude of Coulomb friction, and F is the applied force. When F F , there is no relative motion at the a a ≤ c surface of contact, i.e, x˙ 0. Coulomb friction can take any value from 0 upto F to = c counteract the effect of F . When x˙ 0, Coulomb friction only takes a value of either a 6= F or F , depending on the direction of motion. − c c An important negative effect of friction is the deterioration of performance in terms of increased tracking errors and friction-induced limit cycles. For instance, a non- linear autonomous servo system exhibits oscillatory and periodic solutions to track- ing, which is undesirable. Hunting [37] is one such friction-induced phenomenon that has been analyzed for its effect on an interaction controller’s stability and performance.

Hunting is mainly caused by the combination of integral action in the control loop and the force error caused by Coulomb friction.

Figure 3.18 illustrates the effect of hunting observed in the interaction con- troller. Here, the system is attempting to track a target force of -5N at the robot’s end- effector. Coulomb friction is set as a torque of 5N-m at each of the robot’s links and actuators. The system converges into a stable limit cycle where it constantly oscillates between a force of -2N and -7N. The system also stays in each peak and trough of these oscillations for a constant amount of time. When the system changes direction, it goes through a state of zero velocity, at this state, if the force on the actuator is less than the magnitude of Coulomb friction, the system continues to stay at rest until the force on the actuator is greater than Coulomb friction. Integral error in the servo keeps adding up until the servo commands a torque greater than the magnitude of Coulomb friction. Passivity Analysis 66

Once the actuator breaks free from the effect of Coulomb friction, the system is suscep- tible to overshoot due to actuator torque. Periodic hunting is observed when the system constantly overshoots the target force in either direction due to integral error wind up.

3.4.2 Effect of friction on passivity

Friction induced limit cycles can be suppressed to improve the system’s track- ing performance. In this section, the effect of the controller’s target damping on the magnitude of these hunting cycles has been studied. In each of the following cases, the system’slinear components are modeled and its passivity is analyzed using the frequency- domain search. Once the system is found to be passive, its force and position tracking behavior is simulated with the non-linear effect of Coulomb friction to measure hunting error.

Case 1.   1000 0 K   • des =   0 1000   1000 0 B   • des =   0 1000   2000 0 M   • des =   0 2000 Bandwidth: 2.5Hz • 10 ζ • = p2 Latency = 10ms • Coulomb friction: 10Nm on each link and actuator. • Passivity Analysis 67

(a) Force plot

(b) Position plot

Figure 3.18. Example of hunting due to Coulomb friction Passivity Analysis 68

Figure 3.19. Frequency domain passivity plot - Case 1

The system is passive, as seen in the frequency-domain search plot in figure 3.19. Simu- lation results of this system’s force and position tracking are illustrated in figure 3.20. As expected, the system experiences hunting.

Target force: 50N • Maximum steady state force: 77N • Minimum steady state force: 22N • Error: 25N • ±

Case 2. Increased target damping.   2000 0 B   • des =   0 2000

In this case, all controller parameters except target damping are set at the same values as in case 1. Passivity Analysis 69

Figure 3.20. Force plot - Case 1 - Significant hunting

The system is passive, as seen in the frequency-domain search plot in figure

3.21. Simulation results of this system’s force and position tracking are illustrated in

figure 3.22. The system exhibits a lower magnitude of hunting as compared to case 1.

Target force: 50N • Maximum steady state force: 69N • Minimum steady state force: 30N • Error: 19N • ±

Case 3. Increased target damping.   10000 0 B   • des =   0 10000

In this case, all controller parameters except target damping are set at the same values as in case 1. Passivity Analysis 70

Figure 3.21. Frequency domain passivity plot - Case 2

Figure 3.22. Force plot - Case 2 - Significant hunting

This increased target damping value is able to completely suppress any peri- odic oscillations. Passivity Analysis 71

Figure 3.23. Frequency domain passivity plot - Case 3

Target force: 50N • Maximum steady state force: 50N • Minimum steady state force: 50N • Error: 0N • ±

From the above cases, it can be observed that increasing the target damping reduces the magnitude of hunting oscillations experienced by the system.

3.4.3 Friction suppression

A major advantage of force-feedback over open loop force control is that a con- troller can suppress the negative effects of friction arising from hunting. By actively mea- suring and compensating for the forces and torques at the port of contact, the controller Passivity Analysis 72

Figure 3.24. Force plot - Case 3 - No hunting is able to minimize tracking errors arising from friction. However, a force-feedback con- troller is susceptible to instability in contact operations arising from the non-linear er- rors in contact forces and torques. To study the extent to which the chosen controller can mitigate the detrimental effects of friction, it can be included into the linear model as additional joint and link damping. Destabilizing effects of friction can be considered to be suppressed or masked successfully when, due to the action of the force-feedback controller, the manipulator arm presents an endpoint damping that is much lower than its natural value while still preserving the systems passivity. For this analysis, the end- point damping of a robot arm has been expressed in terms of the damping at its joints and links using the virtual work equivalence mentioned in equation 3.2. The endpoint damping can be expressed as:

¡ 1¢T 1 B J− (B B )J− (3.12) nat = links + acts Passivity Analysis 73

Here, Bnat represents the natural endpoint damping of a robot arm without the influ- ence of a controller. The ability of the controller to suppress a robot arm’s internal damping can be studied using the ratio of the robot’s target endpoint damping and nat- ural endpoint damping. If the controller can preserve the system’s passivity in situation where the ratio is less than unity, it can stably mask internal friction in the robot arm.

Figure 3.25 contains a plot illustrating the controller’s effect on friction sup- pression. The ratio between natural and target damping is plotted on the Y-axis and the ratio between velocity servo gain and the total inertia in the arm is plotted on the X-axis.

The plot represents the lowest possible values for target damping that preserve passivity.

The plot suggests that the chosen interaction controller can suppress the arm’s endpoint damping to 5% of its natural value by choosing the servo gains correctly. Hence, the con- troller is shown to successfully ensure stable operation while suppressing the effects of non-linear Coulomb friction in the arm using force-feedback, even in situations with controller latency. The controller parameters chosen for this study are:   1000 0 K   • des =   0 1000   2000 0 M   • des =   0 2000 Bandwidth: 2.5Hz • Latency = 10ms • Passivity Analysis 74

Figure 3.25. Friction suppression 75

4 Experiments on compliant behav- iors

A controller, after theoretically being analyzed for passivity, can be implemented on a real robot to achieve compliant motion. A robot capable of compliant motion can be used to test and develop behaviors and techniques that will be utilized in operations with remote supervisory control. This chapter is divided into the following. Section 4.1 contains information about the robot used for experiments along with the processes in- volved in setting up an industrial robot for soft real-time control. Section 4.2 explains the different operations carried out using the interaction controller and compares their performance.

4.1 The robot

An ABB IRB 120 robot, interfaced through an ABB IRC 5 controller is chosen for its ability to communicate with an external device in soft real-time. As most robot controllers only allow for a trajectory downloading interface with little to no feedback, Experiments on compliant behaviors 76

they cannot be used in active force feedback applications. At the time of writing, the

IRC 5 was the only industrial robot controller which provided a soft real-time control interface. The controller provides a functionality called EGM that lets an external device read and write commands to the robot at a high rate. From the interaction control per- spective, this is useful as the compliance controller has to provide motions corrections at each time step based on the sensory input it receives.

4.1.1 Externally Guided Motion

Externally Guided Motion, or EGM, is a feature available in ABB’s IRC 5 con- trollers that exposes a lower level of robot control to the operator. This interface pro- vides the functionality to read and write commands at a high rate by circumventing a lot of the processes that cause significant delays. By commanding position and velocity commands through EGM, the trajectory generation and path planning components of the controller are circumvented. However, crucial checks for collision detection, singu- larity avoidance, and joint-limit tolerances are still implemented. EGM position guid- ance can be used to read positions from and write positions to, the motion system at a high rate of 4ms with a control lag of 15ms. Since the EGM position guidance system still implements necessary filtering, safety supervision, and state handling, there is a de- lay between the time of writing a new position till that given position starts to affect the actual robot. ABB claims an average of 20ms delay in this process.

To use Externally Guided Motion in a way that feedback can be collected from the robot, it must be set up to communicate via User Datagram Protocol (UDP). The

UDP interface uses an Ethernet connection to transmit data over a network. The EGM Experiments on compliant behaviors 77

Figure 4.1. EGM interface data flow

controller can be set up to accept position commands from an external device. Op- tionally, these position commands can be accompanied by a velocity command. Once position commands are read by the controller, it implements its position control loop with the velocity commands as reference. The EGM controller also provides a choice between joint space and Cartesian space commands.

A disadvantage of the UDP interface is that it is susceptible to loss of data pack- ets [38]. Two devices communicating over Ethernet using UDP do not perform any in- tegrity checks on the data. In comparison with TCP,which is used by a majority of robot controllers in the market, UDP does not require initial handshaking before transmission or acknowledgment of every packet of data being communicated. Without a system for acknowledgments, it is possible that all data packets sent over the network are not re- ceived. Although this is not ideal, it helps in keeping latency at a minimum. Additionally, since the high-level compliance controller commands fine motion steps, the intermit- tent loss of data packets does not affect its performance very much. Experiments on compliant behaviors 78

Figure 4.2. EGM interface block diagram

4.1.2 Implementing EGM on the IRC5

The IRC5 controller needs to be configured to interface with an external con- troller using EGM position guidance. The robot and the computer must be set up on the same network. The computer’s IP address and the port number need to be set in the IRC

5 controller to ensure that it accepts data packets from the computer. This also ensures that the controller communicates with the correct device on a network with multiple devices. A program is run on the controller that creates an EGM client on the robot. This is preceded by the robot first moving to a predefined safe-pose. The setup of an EGM server provides scope for flexibility in control methods. Parameters can be set that de- termines whether the robot controller should expect position commands in Cartesian space or joint space. A complete description of these parameters is available in table

4.1. While pose mode increases latency due to low-level inverse kinematics and mo- tion planning, it offers the ability to command positions in different frames of reference.

This is useful to accurately control the motion of a robot with a tool attached to its flange without increasing the computational requirements of the high-level controller.

Figure 4.2 illustrates a simplified model of the EGM control loop. Experiments on compliant behaviors 79

Table 4.1. EGM system parameters

Parameter Description External motion interface type. Offers choice between: analog input (EGMSetup AI), Name analog output(EGMSetup AO), group input(EGMSetupGI), and UDP (EGMSetupUC). The level at which corrections are applied: Level 0: Raw corrections as input to the • servos Level Level 1: Filters input but adds latency • Level 2: Used with path correction • Determines if the external motion interface exe- cution should automatically restart after the con- Restart motors after off troller has been in the motors off state, for instance after emergency stop. Determines if axes currently running external mo- Return to Programmed Position when Stopped tion interface should return to the programmed position when program execution is stopped. Defines the default total time for stopping external Default Ramp Time motion interface movements when external mo- tion interface execution is stopped. Defines the default proportional gain of the exter- Default Proportional Position Gain nal motion interface position feedback control. Defines the default bandwidth of the low-pass fil- Default Low Pass Filter Bandwidth ter used to filter the speed contribution from the external motion interface execution.

4.1.3 Implementing EGM on the high level controller

The high-level controller, implemented as a collection of ROS nodes on a Linux computer, is interfaced with the IRC 5 controller over Ethernet. Due to the way EGM is implemented in the IRC5 controller, the computer acts as a server in this scenario.

This means that data transfer cannot be initiated by the computer, it must first wait for the IRC 5 controller to send a message. After this, data can be sent independently in either direction. There are also no special connect or disconnect messages. All messages Experiments on compliant behaviors 80

simply consist of either the feedback robot state, if originating from the robot controller, or a command for robot state, if originating from the computer.

For the computer to communicate with the controller over UDP, data needs to go through a process of serialization/de-serialization at each step. Google Protocol

Buffers, or Protobuf, is used to encode and decode between robot state messages and strings.

The high-level compliance controller is implemented in ROS-Kinetic [39]. ROS was chosen as a middleware as it provides simple and effective interfaces for various methods of communication between parallel processes. Additionally, ROS enforces spe- cific message types and communication architectures, which are useful in a controller that collects data from multiple sources at each update step. The IRC 5 robot controller expects messages in a format incompatible with ROS. Hence, a bridge node was built to bridge communications between ROS nodes and the UDP controller. This node is responsible for:

Read robot commands from the compliance controller through ROS topics • Convert them into protobuf compatible messages • Serialize them using the Protocol Buffer generated encoding • Send these messages over Ethernet to the robot using its IP address and port • number

Receive serialized data streams from the robot which contain information about • the robot’s state

Decode these serial messages using the encoding provided by protobuf • Experiments on compliant behaviors 81

Figure 4.3. Components of the EGM message protocol

Convert them into ROS compatible messages and publish them for other nodes • to access

Google Protocol Buffers. Protobuf is a language and platform-neutral serialization li- brary that converts structured data into a binary stream for transmission. Each protocol buffer message is a small logical record of information, containing a series of name- value pairs. Protocol buffers for EGM control contain key-value pairs of different com- ponents of a robot’s state like positions, velocities, and control modes. A structured record of data, written into a .pr oto file, can be compiled with protobuf to create a li- brary that provides an API between serial data streams and structured data records.

EGM specific protocol buffer. The protocol buffer message for EGM is illustrated in fig- ure 4.3. On the highest level, it contains two separate message types, EgmRobot and

EgmSensor . The EgmRobot message structure is sent from the robot to the computer, while the controller expects messages of type EgmSensor to be sent to it. Each of these messages contains header fields, which contain a timestamp and a sequence number. Experiments on compliant behaviors 82

Figure 4.4. Joint 5 following sinusoidal command with latency

The EgmRobot message contains a EgmFeedback sub-message, which contains in-

formation about the current robot state. The EgmSensor contains a EgmPl anned

sub-message, which contains the commands to the controller. Each joint’s position

command can be represented as a double-precision floating-point number. In Carte-

sian mode, orientations can be represented in quaternions or Euler angles. Apart from

position feedback, messages from the robot also contain information about its current

state.

4.1.4 Controller Latency

ABB advertises their EGM controller to have a latency of 10-20ms, depending

on the type of robot. Interfacing the robot with a higher level compliance controller that Experiments on compliant behaviors 83

performs multiple computations at each update step could increase this latency. Since the compliance controller reads the information available to it and calculates a motion update at each time step, its performance depends on temporal precision. The effect of controller latency in feedback loops has previously been explored in [40]. Due to these delays, the feedback signal is phase shifted. A phase-shifted feedback signal can cause the controller to exhibit undesirable behavior. Calculating a better estimate of latency would allow for it to be modeled into the compliance controller, hence mitigating its negative impact.

The time delays in this system are dominated by the latency of the EGM con- troller. Other sources of delay like computation overheads are negligible in comparison to the control lag. As the high-level compliance controller can be analyzed for passivity with a predefined control lag, it is useful to measure and determine an approximation for the total delay in the system. This measurement is performed by commanding a mo- tion to a joint in which the position commands are sampled from a sine wave of arbitrary frequency. The robot provides position feedback throughout the process, making it pos- sible to gauge the delay by comparing the input wave with the output wave. These waves will be phase shifted by an amount proportional to the latency in the system. Figure 4.4 shows a plot of such a test run on joint 5 of the robot. The output wave matches the frequency with a phase shift, φ. This phase shift can be expressed in terms of the input wave’s time period to get an approximation for the latency.

φ del ay Tinput (4.1) = 2πf

The estimated value of latency from these experiments is found to be 15ms Experiments on compliant behaviors 84

4.2 Virtual attractor strategies

A virtual attractor strategy is a set of poses that the robot must reach during different sections of the operation. These strategies are based on the forces and torques that a manipulator must exert on its environment to complete a task, along with the lo- cations in 3D space at which these must be exerted. Each step in the strategy typically corresponds to an atomic step in the process like move, push, pull, etc. Transitions be- tween these steps are based on the occurrence of events, typically, a transition between two virtual attractor poses happens when a measured quantity, such as force or torque along an axis, exceeds a threshold.

4.2.1 Move until touch

A crucial component of typical force-controlled tasks like machining is the ini- tial step where the robot’s end-effector must come into contact with the workpiece. The robot transitions from a state where it is free of any external forces into a state where it exerts a constant contact force. This behavior, dubbed move until touch, is a precur- sor to most tasks where the robot is expected to interact with a surface without causing damage. The move until touch strategy comprises of two steps: (a) The robot moves towards a surface until the force sensor measures forces or torques implying contact.

(b) on sensing external forces due to contact with the surface, the robot converges to a state where there is no relative motion between its end effector and the surface. The transition between the two states is important to observe from the context of stability.

The passivity-based analysis carried out in earlier chapters can predict conditions for stability for a system where the robot is coupled with an environment. With a transition Experiments on compliant behaviors 85

Figure 4.5. Attractor strategy 1 for move until touch

like this, there is a sudden introduction of external dynamics on the system at the mo- ment when the end effector comes into contact with its environment. A passive system is assured to exhibit stable behavior after contact, so, it is useful to observe if a passive system can handle the transition such that the robot eventually converges to a stable state. An important factor that must be considered here is that in the absence of ex- ternal forces, the robot can accelerate to velocities of large magnitude. When the robot encounters a surface with high velocity, the impulse generated is of a large magnitude.

A large impulse on contact is undesirable. Hence, The move until touch behavior will be analyzed with the robot starting at a location considerably close to the point of contact, preventing large velocities. In the context of performing manipulation tasks, this setup resembles one where a robot uses a pure position controller to reach a point in space that is close to the surface of interest and then switches into impedance control before initiating contact.

Attractor strategy 1. In the first variant of the move until touch strategy, the robot is simply commanded a virtual attractor that is placed at a location embedded inside the Experiments on compliant behaviors 86

Figure 4.6. Strategy 1 implementation

surface. This is illustrated in figure 4.5. The force exerted by the robot after contact can be dictated by setting the attractor’s location to a specified offset from the surface. An implementation of this on the real robot is shown in figure 4.6. The attractor was set such that the robot applies a force of 15N on the environment. The robot starts at a distance from the surface moves towards the virtual attractor until it senses contact. On contact, the controller adjusts the robot’s torques until the reaction force from the surface equals the predefined target force. This approach suffers from limitations that arise from a lack of flexibility in the virtual attractor. The robot’s acceleration is proportional to the sum of all forces and torques acting on it, hence, in the absence of reaction forces and torques, the robot will move very slowly due to low magnitudes of virtual/target forces. With this approach, it would be impossible to command the robot to move faster while ensuring Experiments on compliant behaviors 87

that it exerts the same target force. In the context of performance for a robot undertak- ing many operations, it is desirable to minimize the cycle time while ensuring stability.

This is explored further as attractor strategy 2. Depending on the operation, it could also be desirable to ensure that the magnitude of the force on impact does not exceed the desired steady-state force. In this situation, acceleration is traded off to reduce the possibility of causing any damage to the robot’s environment. This approach is explored further in attractor strategy 3.

Attractor strategy 2. Taking inspiration from the intuitive human behavior of reaching for surfaces when exposed to only/pure tactile input, a new virtual attractor strategy for move until touch was devised. In this strategy, the instant of contact is treated as a state transition event to change the virtual attractor location. This is illustrated in

figure 4.7. Initially, the attractor is set to provide an arbitrary large spring deflection along the vector connecting the and the surface. This results in a large virtual force on the robot, accelerating the robot to a high velocity and reducing the time taken by the robot to move a constant distance. When the environment starts exerting force on the robot, i.e, on contact, a new virtual attractor pose is set by adding an offset to the end-effector pose. This offset serves as the spring deflection and is responsible for the steady-state force exerted by the robot on the surface. This strategy allows the robot to achieve a greater velocity during its approach and counteracts a drawback of attractor strategy 1. However, both of these strategies require some knowledge about the location of the surface with respect to the robot. Additionally, due to the integral effect of the controller, the robot can accelerate to velocities of large magnitudes while Experiments on compliant behaviors 88

Figure 4.7. Attractor strategy 2 for move until touch

it moves towards a surface. This leads to a possibility of the robot impacting the surface at a high velocity, resulting in a high impact force, which could be undesirable.

Figure 4.8 illustrates an implementation of this strategy with a plot of force and position along the axis where motion is being commanded. This strategy assumes that forces greater than the target force are acceptable. There is a trade-off between a high impulse force and the time taken by the robot to reach the surface. The attractor is set Experiments on compliant behaviors 89

Figure 4.8. Strategy 2 implementation

Figure 4.9. Attractor strategy 3 for move until touch

such that the virtual deflection is large in magnitude, providing high acceleration to the robot. Experiments on compliant behaviors 90

Figure 4.10. Strategy 3 implementation

Attractor strategy 3. There could be some applications of a move until touch behavior where the force exerted on the surface at the instant of contact must not exceed the de- sired target force. To satisfy this condition, the virtual spring deflection must not exceed the value that results in the maximum allowable force. Although, if the end effector and the surface are separated by a distance greater than the maximum allowable virtual de-

flection, the robot does not reach its target position and fails to make contact with the surface. The generic virtual attractor strategy can be modified to accommodate these limitations. In this strategy, the virtual attractor updated at each control step to have a constant offset to the end effector position throughout the robot’s motion in free space.

On contact, the strategy transitions into setting the attractor at a constant offset from the location of the end effector at the first instant of contact. This prevents the virtual attractor from getting affected by any oscillations of the end effector until it reaches a steady-state. Since the virtual spring deflection is constant, the robot never accelerates Experiments on compliant behaviors 91

enough to exert a force that is larger than the acceptable steady-state force. This is illus- trated in figure 4.9. Figure 4.10 illustrates an implementation of this strategy using plots of position and force along the axis where motion is being controlled. The maximum allowed force on impact here is set to 25N while the steady-state force target is 10N. The virtual attractor changes along with the end effector position to ensure that constant vir- tual force is being exerted on the robot while it is in free space. This allows controlling the magnitude of the force at the instant of contact. 92

5 Conclusions and future work

The first goal of this thesis was to derive conditions sufficient to assure the sta- ble behavior of a force-feedback enabled manipulator coupled with an environment.

The thesis proposes a method to analyze a robot arm’s stability in interaction using the concepts passivity as described in chapter 2. This method has been proven to be ef- fective by validating its results with experiments on a real robot arm. Linear models capturing the dynamics of a 2 DOF robot arm have been developed to analyze coupled stability. By validating the results of this linear model on a simulated and real robot, it has been shown that the model can predict the stable interaction behavior of robots with non-linear dynamics like Coulomb friction.

Further, modeling each link as a two-mass system provides insight into the ef- fect of transmission compliance, which causes noncolocation between actuation and sensing, on force-feedback stability. This model can easily be extended to analyze the stability of a serial link manipulator with an arbitrary number of degrees of freedom.

The strength of this is that it makes very simple assumptions about the environment that a robot is coupled with. It only requires that the environment present a passive Conclusions and future work 93

impedance at the port of coupling, a category that includes most, if not all, environ- ments that a robot typically interacts with.

This study provides an understanding of the effect of various components of a typical force-feedback implementation on stable interaction control. By modeling the chosen interaction controller along with the robot arm, the relationship between con- trol gains, system dynamics, controller latency, and passivity has been studied and pre- sented. Using a simulation, crucial non linear dynamics like Coulomb friction and their effect on stability has been studied. Further, the utility of force-feedback in reducing detrimental effects on Coulomb friction has been shown. Exploring stable ranges for all of these parameters facilitates optimizing a controller while preserving its stability. By modeling controller latency, this thesis provides insight into prescribing an interaction controller that can preserve robustness in implementations suffering from communica- tion delays.

Finally, the utility of stable interaction control in contact tasks is shown by im- plementing a simple move-until-touch operation using virtual attractors. This opera- tion can be used as a building block to specify virtual attractor strategies for complicated contact tasks. To validate the analysis, its results were used to implement a controller on an industrial robot performing stable move until touch operations.

5.1 Future work

Experiments on a 6DOF industrial robot have shown that a two-link model of the manipulator performs well in analyzing its stability under force-feedback control, Conclusions and future work 94

especially since it captures the effects of the dominant links’ dynamics and the non- colocation of sensors and actuators. However, this analysis could be extended by mod- eling all the links of a robot arm to provide a more accurate representation of its dynam- ics.

Finally, this thesis could be extended by further analyzing the stability relation- ships and providing a more general set of conditions for a generic control law to assure stable contact behavior under force-feedback. While the method presented and used in this thesis is generic enough that can analyze the stability of any force-feedback con- troller implemented on a robot arm with arbitrary controller latency, it doesn’t provide a comprehensive and specific set of rules for force-feedback gain choices that will assure interaction stability. The variance in the dynamics of different robots, coupled with the high number of tunable and fixed parameters, makes this a non-trivial task. Bibliography 95

Complete References

[1] T. Yoshikawa. Force control of robot manipulators. In Proceedings 2000 ICRA. Millennium Conference. IEEE International Conference on Robotics and Automation. Symposia Proceedings (Cat. No.00CH37065), volume 1, pages 220–226 vol.1, April 2000.

[2] Daniel E Whitney. Force feedback control of manipulator fine motions. 1977.

[3] Matthew T Mason. Compliance and force control for computer controlled manip- ulators. IEEE Transactions on Systems, Man, and Cybernetics, 11(6):418–432, 1981.

[4] Marc H Raibert and John J Craig. Hybrid position/force control of manipulators. Journal of dynamic systems, measurement, and control, 103(2):126–133, 1981.

[5] Neville Hogan. Impedance Control: An Approach to Manipulation:. page 24.

[6] H. Kazerooni, B. J. Waibel, and S. Kim. On the Stability of Robot Compliant Motion Control: Theory and Experiments. Journal of Dynamic Systems, Measurement, and Control, 112(3):417, 1990.

[7] N. Hogan. On the stability of manipulators performing contact tasks. IEEE Journal on Robotics and Automation, 4(6):677–686, December 1988.

[8] J Kenneth Salisbury. Active stiffness control of a manipulator in cartesian co- ordinates. In 1980 19th IEEE conference on decision and control including the symposium on adaptive processes, pages 95–100. IEEE, 1980.

[9] Michael J Ryan. Implementation of robotic force control with position accommo- dation. 1992.

[10] Steven Eppinger and Warrenp Seering. Understanding bandwidth limitations in ro- bot force control. In Proceedings. 1987 IEEE international conference on robotics and automation, volume 4, pages 904–909. IEEE, 1987.

[11] D. Whitney. Historical perspective and state of the art in robot force control. In 1985 IEEE International Conference on Robotics and Automation Proceedings, vol- ume 2, pages 262–268, March 1985. Bibliography 96

[12] W. Townsend and J. Salisbury. The effect of coulomb friction and stiction on force control. In Proceedings. 1987 IEEE International Conference on Robotics and Automation, volume 4, pages 883–889, March 1987.

[13] Riccardo Schiavi, Antonio Bicchi, and Fabrizio Flacco. Integration of active and passive compliance control for safe human-robot coexistence. In 2009 IEEE International Conference on Robotics and Automation, pages 259–264. IEEE, 2009.

[14] Ronald van Ham, Thomas Sugar, Bram Vanderborght, Kevin Hollander, and Dirk Lefeber. Compliant actuator designs. IEEE Robotics & Automation Magazine, 3(16):81–94, 2009.

[15] Eric W Weisstein. Euler angles. 2009.

[16] J.J. Wlassich. Nonlinear Force Feedback Impedance Control. Massachusetts Insti- tute of Technology, Department of Mechanical Engineering, 1986.

[17] S. Eppinger and W. Seering. On dynamic models of robot force control. In Proceedings. 1986 IEEE International Conference on Robotics and Automation, volume 3, pages 29–34, April 1986.

[18] William R Ferrell. Delayed force feedback. Human factors, 8(5):449–455, 1966.

[19] J Vertut. Short transmission delay in a force refrective bilateral manipulator. Proc. of the 4th Rom-An-Sy, Warsaw, pages 269–285, 1981.

[20] Robert J Anderson and Mark W Spong. Bilateral control of teleoperators with time delay. In Proceedings of the 1988 IEEE International Conference on Systems, Man, and Cybernetics, volume 1, pages 131–138. IEEE, 1988.

[21] Ye Zhao and Luis Sentis. Distributed Impedance Control of Latency-Prone Robotic Systems with Series Elastic Actuation. arXiv:1811.11573 [cs], November 2018. arXiv: 1811.11573.

[22] W. S. Newman. Stability and Performance Limits of Interaction Controllers. Journal of Dynamic Systems, Measurement, and Control, 114(4):563–570, 1992.

[23] Chae H. An and John M. Hollerbach. The role of dynamic models in cartesian force control of manipulators. The International Journal of Robotics Research, 8(4):51– 72, 1989. Bibliography 97

[24] Wyatt S. Newman and Yuandao Zhang. Stable interaction control and coulomb friction compensation using natural admittance control. J. Field Robotics, 11:3–11, 1994.

[25] Louis Weinberg. Network analysis and synthesis, volume 17.

[26] J Wyatt, Leon Chua, Joel Gannett, I Goknar, and Douglas Green. Energy concepts in the state-space theory of nonlinear n-ports: Part i-passivity. IEEE transactions on Circuits and Systems, 28(1):48–61, 1981.

[27] P. Moylan. Implications of passivity in a class of nonlinear systems. IEEE Transactions on Automatic Control, 19(4):373–381, August 1974.

[28] D.J. Hill and P.J. Moylan. Stability results for nonlinear feedback systems. Automatica, 13(4):377–382, July 1977.

[29] J Edward Colgate. The control of dynamically interacting systems. PhD thesis, Mas- sachusetts Institute of Technology, 1988.

[30] Otto Brune. Synthesis of a finite two-terminal network whose driving-point impedance is a prescribed function of frequency. Journal of Mathematics and Physics, 10(1-4):191–236, 1931.

[31] Jan C Willems. Dissipative dynamical systems part i: General theory. Archive for rational mechanics and analysis, 45(5):321–351, 1972.

[32] Richard J Adams and Blake Hannaford. A two-port framework for the design of un- conditionally stable haptic interfaces. In Proceedings. 1998 IEEE/RSJ International Conference on Intelligent Robots and Systems. Innovations in Theory, Practice and Applications (Cat. No. 98CH36190), volume 2, pages 1254–1259. IEEE, 1998.

[33] Blake Hannaford and Jee-Hwan Ryu. Time-domain passivity control of haptic in- terfaces. IEEE transactions on Robotics and Automation, 18(1):1–10, 2002.

[34] O. Khatib. A unified approach for motion and force control of robot manipulators: The operational space formulation. IEEE Journal on Robotics and Automation, 3(1):43–53, February 1987.

[35] Mark W Spong and Mathukumalli Vidyasagar. Robot dynamics and control. John Wiley & Sons, 2008. Bibliography 98

[36] J Maples and Joseph Becker. Experiments in force control of robotic manipulators. In Proceedings. 1986 IEEE International Conference on Robotics and Automation, volume 3, pages 695–702. IEEE, 1986.

[37] R.H.A. Hensen and M.J.G. van de Molengraft. Friction induced hunting limit cy- cles: an event mapping approach. In Proceedings of the 2002 American Control Conference (IEEE Cat. No.CH37301), pages 2267–2272 vol.3, Anchorage, AK, USA, 2002. IEEE.

[38] Jon Postel. User datagram protocol. Isi, 1980.

[39] Morgan Quigley, Ken Conley, Brian Gerkey, Josh Faust, Tully Foote, Jeremy Leibs, Rob Wheeler, and Andrew Y Ng. Ros: an open-source robot operating system. In ICRA workshop on open source software, volume 3, page 5. Kobe, Japan, 2009.

[40] Gene F Franklin, J David Powell, Abbas Emami-Naeini, and J David Powell. Feedback control of dynamic systems, volume 3. Addison-Wesley Reading, MA, 1994.