compliant motion control for robotic manipulators · 2006. 8. 3. · many applications of robot...

113
Compliant Motion Control for Robotic Manipulators Alexander Lanzon Wolfson College Robot Control Group Department of Engineering University of Cambridge A dissertation submitted for the degree of Master of Philosophy September 1997

Upload: others

Post on 22-Jan-2021

6 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Compliant Motion Controlfor Robotic Manipulators

Alexander Lanzon

Wolfson College

ARobot Control Group

Department of Engineering

University of Cambridge

A dissertation submitted for

the degree of Master of Philosophy

September 1997

Page 2: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

To my parents

for their

unfailing love and patience

Page 3: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Preface

This work is the conclusion of one year of research in the Department of Engineeringat the University of Cambridge.

I would like to express my sincere gratitude to my supervisor, Dr R J Richards,for his support and encouragement. I am also indebted to Dr Richards and ProfessorGlover for believing in me when I first came and for giving me the opportunity to studyhere.

This work has contributed from the suggestions of numerous people. I am especiallygrateful to Michael Cantoni, Bob Richards, Paresh Date and Richard Ford for proof-reading this thesis and for providing many helpful comments.

I would also like to thank all the members of the control group for providing com-pany and a pleasant research environment throughout this year. I am especially gratefulto Richard Ford for generously spending many hours discussing research work and forproviding numerous interesting ideas.

My M.Phil. studies have been financially supported by a Cambridge ODA Scholar-ship (c/o the Cambridge Commonwealth Trust and the Association of CommonwealthUniversities), for which I am very grateful.

On a more personal level, I would like to thank my parents who have been a con-tinuous source of love and support and have provided the security needed in momentsof trouble. I would also like to thank Thomas Wesener, Polykarpos Papadopoulos,Rajesh Amin, Sofia Dermataki and Ida Marandola who have been, and will continueto be, great friends.

Declaration: As required by University Statute, I hereby declare that this dissertationis not substantially the same as any that I have submitted for a degree or diploma orother qualification at any other university. I further state that no part of this disserta-tion has already been or is being concurrently submitted for any such degree, diplomaor other qualification. This dissertation is the result of my own work and includesnothing which is the outcome of work done in collaboration. I also declare that thelength of this thesis is not more than 15,000 words.

Alexander LanzonCambridge, August 1997

ii

Page 4: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Abstract

In this thesis, a novel robust trajectory/force controller is developed based on a com-bination of sliding-mode and adaptive control techniques. Exact knowledge of robotdynamics and environment stiffness is not required. The controller is constructed soas to track reference trajectories in the unconstrained directions and to regulate forceat a desired value in the constrained directions. Changes in constraints are also takeninto account in the design of the control law. The synthesis presented assumes a non-redundant rigid manipulator and known location/geometry of environment. Simulationand experimental results are also presented in this thesis.

Keywords: compliant motion control, trajectory/force control, constrained motioncontrol, robust robot control, sliding-mode control, adaptive control

iii

Page 5: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Contents

Preface ii

Abstract iii

Table of Contents iv

Notation and Abbreviations vi

1 Introduction 11.1 Motivation and Object of Study . . . . . . . . . . . . . . . . . . . . . . 11.2 Compliant Motion Control Literature Review . . . . . . . . . . . . . . 21.3 Outline of Thesis . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4

2 Problem Formulation 62.1 Problem Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 62.2 Transformation of the Robot Dynamics . . . . . . . . . . . . . . . . . . 62.3 Controller Structure . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9

3 Controller Design: Simple Case 123.1 Known Environment Stiffness and Simplified Dynamics . . . . . . . . . 12

3.1.1 Controller Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 123.1.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . 24

3.2 Known Environment Stiffness and Complete Dynamics . . . . . . . . . 293.2.1 Controller Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 293.2.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . 35

3.3 Unknown Environment Stiffness and Complete Dynamics . . . . . . . . 393.3.1 Controller Synthesis . . . . . . . . . . . . . . . . . . . . . . . . 393.3.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . 43

4 Controller Design: General Case 494.1 Known Environment Stiffness . . . . . . . . . . . . . . . . . . . . . . . 494.2 Unknown Environment Stiffness . . . . . . . . . . . . . . . . . . . . . . 514.3 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 53

5 Physical Implementation 635.1 Experimental Setup . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 635.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65

iv

Page 6: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

CONTENTS v

5.3 Comparison with Simulation Results . . . . . . . . . . . . . . . . . . . 68

6 Conclusions 706.1 Brief Summary . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 706.2 Outline of Contributions . . . . . . . . . . . . . . . . . . . . . . . . . . 706.3 Future Research . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 71

A Complete Derivations for General Case Controller Design 73A.1 Complete Derivation for Section 4.1 Controller . . . . . . . . . . . . . . 73A.2 Complete Derivation for Section 4.2 Controller . . . . . . . . . . . . . . 79

B ξ and ωn Optimisation 83B.1 Optimisation Program . . . . . . . . . . . . . . . . . . . . . . . . . . . 83B.2 Optimisation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . 84

C Simulink Block Diagrams 85

D Computer Program Listings 91D.1 Control Program . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 91D.2 AD/DA Interface Program . . . . . . . . . . . . . . . . . . . . . . . . . 99

Bibliography 102

Page 7: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Notation and Abbreviations

Notation

R field of real numbers

<· real part of

L· Laplace of

∈ belongs to

≈ approximately equal to

2 end of proof

AT transpose of matrix A

sat(x) saturation function of x

min(x) minimum of x

max(x) maximum of x

Abbreviations

AD/DA analog to digital/digital to analog

LHS left hand side

LPF low pass filter

LTI linear time invariant

MIMO multiple-input multiple-output

RCC remote center of compliance

RHS right hand side

SISO single-input single-output

SPR strictly positive real

w.r.t. with respect to

vi

Page 8: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 1

Introduction

This chapter starts by introducing Compliant Motion Control. The associated prob-lems are then listed together with the techniques used in this thesis to address theseproblems. A brief literature review of Compliant Motion Control is also given. Thisincludes several references to related literature. The chapter ends with a short outlineof the dissertation.

1.1 Motivation and Object of Study

Many applications of robot manipulators to date have been based on position1 control.However, when a robot manipulator makes contact with an external surface (from nowon referred to as the environment), the control of both force and position is required.Position control strategies are adequate for tasks such as material transfer and spotwelding where the manipulator is not interacting significantly with the environment.However, tasks such as assembly, fine polishing, grasping, grinding and deburring,which involve extensive contact with the environment, are better handled by directlycontrolling the forces of interaction between the manipulator and the environment.The task then is to exert a desired profile of force in the constrained degrees of freedomwhile following the reference trajectory in the unconstrained degrees of freedom [52].This problem is generally referred to as the Compliant Motion Control problem.

The problem is non-trivial because:

1. the location and geometry of the environment are usually not well known,

2. the environment stiffness is also usually unknown,

3. force control on very stiff environments may lead to instability known as hardcontact instability,

4. ways must be found of combining force-control commands and position-controlcommands—when regulating force in a direction normal to the environment andfollowing a trajectory along the environment,

1Hereafter we use position to mean position and/or orientation, and force to mean force and/ortorque.

1

Page 9: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

1.2 Compliant Motion Control Literature Review 2

5. trajectory tracking and force regulation must occur in the presence of modeluncertainty and disturbances,

6. the controller must be capable of handling changes in constraints (i.e. collisionphenomena must be taken into account),

7. the force measurement is usually very noisy—thus prohibiting force derivativesto be computed.

In this thesis, we choose to address the above problems through a combination of adap-tive and sliding-mode control techniques. Sliding-mode control is a natural candidatefor this problem because it is a robust technique which explicitly takes care of thenonlinear plant dynamics. It gives robustness against parametric uncertainty and un-modelled dynamics in the sense that it ensures bounded trajectory-tracking errors andforce-regulation errors in the presence of bounded uncertainty. Adaptation is only usedto estimate the unknown environment stiffness. This is estimated through an adaptivealgorithm, rather than designing a controller which is robust to its variations, becauseit varies considerably (typically, from 104 to 108 N/m) depending on the material fromwhich the environment is made.

1.2 Compliant Motion Control Literature Review

The Compliant Motion Control problem has attracted considerable attention over thepast decade. Currently available compliant motion control techniques may be cat-egorised in two basic types. One is passive compliance where some ‘soft’ device isinserted near the end-effector. This can be the force sensor itself. Whitney [52] andRoberts [40] showed that a soft force sensor can lead to stable behaviour with stiff envi-ronments. However, drawbacks of soft sensors include the reduction in dynamic rangeof the force response and positional accuracy. The most well known passive compliancedevice is the Remote Center of Compliance (RCC) [53] although many different versionshave been developed in Japan [4, 47], France [30, 39], Germany [15] and USA [7, 13].The other compliant motion control category is active compliance where complianceis achieved through joint-torques, either by setting a linear relation between the forceand displacement (or force and velocity) such as impedance control [21], damping con-trol [51], stiffness control [41] and resolved acceleration control [27,42]; or by controllingforce in certain directions while controlling position in the remaining directions, suchas hybrid control [38], compliance and force control [28] and compliance control [36].Many papers have been published about hybrid position/force control to improve thebasic scheme [23, 29, 54].

Most of the force control schemes mentioned in the above references have been de-vised on Cartesian coordinates at the end-effector or at an external compliance frame.The rationale for Cartesian position/force control is that the geometry of the exter-nal world defines a set of natural coordinates that can be partitioned into position-controlled variables and force-controlled variables [26, 28]. Control, therefore, is castin terms of these variables, necessitating a kinematic transformation to joint variables.Care must be taken to ensure that the kinematic instabilities recently explained by

Page 10: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

1.2 Compliant Motion Control Literature Review 3

Fisher and Mujtaba [18] and previously seen by An and Hollerbach [3] and Zhang [56]are well avoided.

As stated earlier, the controller must be able to handle changes in constraints (i.e.when some unconstrained directions become constrained and vice-versa). A detailedanalysis of collision phenomena is given in [1, 8, 19].

Several control techniques have been proposed in the literature in an attempt tofind a lasting solution to the above problems. Some of the most recent papers are:Paul et al. [37] proposed hybrid control with passive compliance; Dawson et al. [14]investigated the problem by using impedance control; Wang and McClamroch [50]and later Cai and Song [9] used Lyapunov’s Direct Method to design their controllers;Paromtchik et al. [33] and Grabbe and Bridges [20] used sliding-mode control; Canudasde Wit and Brogliato [10] used impedance control with adaptive estimation of the envi-ronment stiffness; Panteley and Stotsky [32] used pure adaptive control; and Kwan [24]and Parra-Vega and Arimoto [34] used a combination of adaptive and sliding-modecontrol techniques.

In the remaining part of this section, some references for the theory used in therest of this thesis will be given. A non-rigorous brief overview of sliding-mode controlis also included for convenience.

Robot Analysis and Control Design

An extensive treatment of robot kinematics, statics and dynamics is given in [2,5,12,46].Trajectory control, force control and compliant motion control are also thoroughly dis-cussed in [5, 12, 46]. Dynamic stability and kinematic stability issues in force controlare very well presented in [2].

Sliding-Mode Control

An introduction to sliding-mode control is given in [5,43,46] but more rigorous mathe-matical derivations are given in [22,48,49]. Mathematical arguments about differentialequations with discontinuous right-hand sides are found in Filippov [17].

The basic idea behind sliding-mode control is to create a surface in state-space andchoose a control input which ensures that all trajectories outside the surface convergeto the surface in finite time. If this is achieved and the control input is maintained, thenall trajectories will be ‘locked’ on the surface and hence must satisfy the equation ofthe surface. Now, if the axes which span the state-space were chosen to be dynamicallyrelated variables such as X = (x, ˙x, ¨x, . . . , x(n−1))T ∈ Rn, where x is the error betweenthe actual and reference position, then the equation of the surface is itself a differentialequation. By clever choice of surface, one can ensure that the corresponding differentialequation has a unique solution X ≡ 0. This guarantees that all trajectories ‘locked’ onthe surface and hence satisfying this differential equation have a steady-state solutionX = 0.

Consequently, the difficult part is to find a control input which ensures that alltrajectories outside the surface converge to the surface in finite time in the presence ofmodel uncertainty. However, once this is done and the trajectory lies on the surface,the system is robust to parametric uncertainty and unmodelled dynamics because the

Page 11: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

1.3 Outline of Thesis 4

trajectory must remain on the surface and hence satisfy the dynamics of the corre-sponding differential equation. Note that this differential equation is chosen at thedesign stage and hence the closed-loop system is independent of plant dynamics anduncertainty.

However, it turns out that control laws which satisfy the above conditions are dis-continuous and hence give rise to control chattering which may excite high frequencyunmodelled dynamics. To avoid this, the ideal discontinuous control law is approxi-mated with a continuous control law. This gives rise to a trade-off between controlbandwidth and tracking precision.

Adaptive Control

A detailed explanation of Adaptive Control is found in Astrom and Wittenmark [6] andmore specifically to robot manipulators in Craig [11]. However, adaptation will only beused in this thesis to estimate the unknown environment stiffness. The adaptive algo-rithm proposed in Section 3.3.1 follows the lines of Canudas de Wit and Brogliato [10].

1.3 Outline of Thesis

The rest of the thesis is organised as follows:

Chapter 2: Problem Formulation

Chapter 2 starts by clearly defining the problem to be studied. It is then shown thatthe standard equation describing robot dynamics in joint space can be transformedto a form which is more suitable for sliding-mode control synthesis by the use of aninverse dynamics control law. It is also pointed out that this transformed equation canbe regarded as our ‘new plant’ and that the general problem of designing a controllerfor the manipulator reduces to designing a controller for this ‘new plant’. The chapterends by proposing a general structure for the design of an adaptive sliding-mode con-troller.

Chapter 3: Controller Design – Simple Case

It will be pointed out in this chapter that the full problem of designing a controllerfor this ‘new plant’ is made much simpler if some simplifying assumptions are firstmade, and then each one of these assumptions relaxed in stages. Consequently, asingle-input single-output (SISO) system (i.e. a 1-degree of freedom robot) is assumedhere. This chapter is divided into 3 sections. In the first section, it is further assumedthat the environment stiffness is completely known and that there is no uncertain termmultiplying the control input. The latter assumption is relaxed in the second sectionand the former assumption is removed in the third section where an adaptive algorithmis derived to estimate the environment stiffness. The controller synthesis in the firsttwo sections is based on sliding-mode control theory. Simulation results are given atthe end of each section.

Page 12: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

1.3 Outline of Thesis 5

Chapter 4: Controller Design – General Case

Chapter 4 generalises the results obtained in Chapter 3 to the multivariable case. Thatis, the SISO assumption is also removed. Since the derivations in Chapter 3 can beeasily generalised to the multivariable case with some more involved algebra and amore cumbersome suffix notation, the detailed synthesis is omitted from this chapter.Only the resulting controllers will be stated and an intuitive justification given. Thefull derivations are given in Appendix A for completeness. Simulation results for thecomplete multivariable controller are shown at the end of the chapter.

Chapter 5: Physical Implementation

This chapter presents the results obtained by implementing the complete multivariableadaptive sliding-mode control law on a 2-link robot arm. The chapter starts by de-scribing the experimental setup used. This is followed by an illustration of the resultsobtained, an interpretation of these results and a comparison of these experimentalresults with the simulation results.

Chapter 6: Conclusions

We conclude this thesis with a short summary of the dissertation, an outline of thecontributions and some directions for future research which are mostly unsolved prob-lems that remain open in this thesis.

The appendices contain a detailed derivation of the generalised multivariable controller,Simulink simulation block diagrams and relevant computer program listings.

Page 13: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 2

Problem Formulation

This chapter starts by clearly defining the problem to be studied. It is then shown thatthe well-known robot dynamics, H(q)q+ h(q, q) = τ + JTo (q)Fo, can be transformed toa form which is more suitable for sliding-mode control synthesis. The chapter ends byoutlining the general structure of the controller to be designed in Chapters 3 and 4.

2.1 Problem Definition

The problem that will be studied in this thesis is that of controlling a general n-degreeof freedom non-redundant rigid manipulator to:

• track reference trajectories in the unconstrained directions, and to

• regulate force at a desired value in the constrained directions,

in the presence of model uncertainty and unknown environment stiffness. If there areno constrained directions, then pure trajectory control should be achieved; whereas ifthere are no unconstrained directions, then pure force control should be achieved. Afurther issue which will be addressed is that of ensuring stability whenever one or moreconstraints change.

2.2 Transformation of the Robot Dynamics

In this section, we show how the standard equation describing the robot dynamics,H(q)q + h(q, q) = τ + JTo (q)Fo, can be transformed to a form which is more suitablefor subsequent sliding-mode control synthesis.

Consider the 2-D planar manipulator arm illustrated in Figure 2.1. This figure willonly be used to depict notation. All subsequent theory is valid for any non-redundant1

manipulator with n-degrees of freedom. Here, let q be the vector of joint displacements,τ be the vector of joint torques, H(q) be the manipulator inertia matrix, and the non-linear term h(q, q) contain centrifugal, Coriolis and gravitational forces. Furthermore,

1This is required so that the manipulator Jacobian is square.

6

Page 14: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

2.2 Transformation of the Robot Dynamics 7

F

Compliance Frame

Env

iron

men

t Stif

fnes

s

Environment Stiffness

Contact Force

Base Frame

(Task Space)

k

k

Oo

O1

O2 Oc

xo

x1

x2

xc

yo

y1

y2

yc

τ1

τ2

θ1

θ2

l1

l2

Figure 2.1: 2-D Planar manipulator arm

let Jo(q) denote the Manipulator Jacobian and Fo be the environment reaction forceread with respect to the base coordinate system. Also, let oRc denote the rotationmatrix which transforms vectors read with respect to the compliance frame to vectorsread with respect to the base coordinate system. This is illustrated in Figure 2.2.

xo

xc

yo

yc

oRc

Figure 2.2: Rotation matrix between compliance frame and base frame

Then, the manipulator dynamics in joint space2 are given by [12, pp. 205,211]:

H(q)q + h(q, q) = τ + JTo (q)Fo (2.1)

⇒ H(q)q + h(q, q) = τ + JTo (q)(oRcF

), (2.2)

where F is measured in the Compliance Frame. Now let dq be a differential change inthe joint displacements, dxo be the corresponding differential change in end-effector po-sition read with respect to the base coordinate system and dxc be the same differentialchange in end-effector position but read in the compliance coordinate system. Thendxo = Jodq and dxc = cRodxo implying dxc = (cRoJo)dq. Hence (cRoJo) is the Jacobian

2When the manipulator dynamics are written in terms of the vector of joint displacements q, wesay that they are written in joint space. Similarly, when the dynamics are written in terms of the taskspace coordinates (i.e. in the compliance frame), we say that they are written in task space.

Page 15: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

2.2 Transformation of the Robot Dynamics 8

of the transformation mapping joint space to task space. Denote this TransformationJacobian by J(q). Then we have JT (q) = JTo (q)cRT

o = JTo (q)oRc and so equation (2.2)gives:

H(q)q + h(q, q) = τ + JT (q)F. (2.3)

Now let x be the position vector of the end-effector measured from the compliance frameand T (·) be the transformation mapping joint space to task space. Then [2, pp. 5,6]

x = T (q) ⇒ q = T−1(x),

x = J(q)q ⇒ q = J(q)−1x, (2.4)

x = J(q)q + J(q)q ⇒ q = J(q)−1(x− J(q)q

).

Here it is assumed that the manipulator arm does not pass through a manipulatorsingularity. This is necessary so that inverse transformations are possible. It shouldbe clear that T (·) is composed of the forward kinematics, describing the end-effectorposition with respect to the base coordinate system in terms of the joint angles, and ahomogeneous transformation mapping this position read with respect to the base co-ordinates to the compliance frame. As shown above, the Jacobian J(q) is the Jacobianof the transformation T (·). It is not the same as the Manipulator Jacobian Jo(q). Infact, from above we have J(q) = cRoJo(q).

Dropping the operands for clarity (they are all in joint space) we have

Hq + h = τ + JTF

(2.4)⇒ HJ−1(x− J q) + h = τ + JTF.

From here we may proceed to obtain the manipulator dynamics in task space in theform H∗(x)x + h∗(x, x) = Q∗(x) + F , where H∗ is the manipulator inertia matrixreferred to task space, h∗ is the nonlinear term representing the centrifugal, Coriolisand gravitational forces also referred to task space, and Q∗(x) is the generalised forceinputs in task space. However, the actual physical input to the robot is τ and notQ∗(x). Hence, we prefer to invert the dynamics at this stage and let

τ = HJ−1(u− ˙

Jq)

+ h− JTF, (2.5)

where H, h and J are estimates of H , h and J respectively and u represents a newinput to the system which is yet to be chosen. With this torque input τ we get

HJ−1(x− J q

)+ h = HJ−1

(u− ˙

Jq)

+ h− JTF + JTF,

which on rearrangement3 gives

x = JH−1HJ−1u+ JH−1(HJ−1J − HJ−1 ˙

J)q +

(h− h

)+ JH−1(JT − JT )F.

(2.6)

3H is always positive definite [24] and hence invertible.

Page 16: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

2.3 Controller Structure 9

Note that

JH−1HJ−1 is a matrix function of q,

JH−1(HJ−1J − HJ−1 ˙

J)q +

(h− h

)is a vector function of q and q,

JH−1(JT − JT ) is a matrix function of q.

Moreover, according to equations (2.4) we have q = T−1(x) and q = J(q)−1x and soby letting X = (x, x) and defining

G(X) = JH−1HJ−1,

f(X) = JH−1(HJ−1J − HJ−1 ˙

J)q +

(h− h

),

M(X) = JH−1(JT − JT ),

we can write equation (2.6) as:

x = G(X)u+ f(X) +M(X)F. (2.7)

Here x, u, F ∈ Rn, X = (x, x) ∈ Rn×2, f : Rn×2 → Rn and G,M : Rn×2 → Rn×n.Equation (2.7) is now suitable for sliding-mode controller synthesis [43]. It will beanalysed in detail in the following chapters. Designing a controller for this equationimmediately yields a controller for the robot arm H(q)q+ h(q, q) = τ + JTo (q)Fo, sinceequation (2.5) provides a mapping from the control input u to the torque input τ .

2.3 Controller Structure

As seen above, substituting equation (2.5)—commonly referred to as the Inverse Dy-namics Control Law—into the manipulator dynamical equation (2.1), gives the newsystem described by equation (2.7). This is illustrated in Figure 2.3.

RobotDynamicsDynamics

Inverse ForwardKinematics

&

New Plant

&

F

u τ q q x x

Figure 2.3: New plant given by equation (2.7)

Thus, the problem of designing a controller for the robot dynamics of equation (2.1)reduces to the problem of designing a controller for this ‘new plant’ described byequation (2.7). It is interesting to note that if the robot dynamics were known perfectly,then G(X) = I, f(X) = 0 and M(X) = 0 yielding the simple uncoupled dynamicalequation x = u. In this case, the controller synthesis is trivial and can be adequately

Page 17: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

2.3 Controller Structure 10

handled by standard linear control theory4. However, in general, this is not the caseand a more sophisticated (possibly nonlinear) control law which explicitly takes intoaccount the above dynamics must be sought. The control challenge is then:

• to design a control law u to effectively account for parameter uncertainty and thepresence of high frequency unmodelled dynamics,

• to explicitly quantify the resulting modelling/performance trade-offs.

These issues are easily addressed by using the concepts and notations of sliding-modecontrol theory [45, 48, 55]. To solve the Compliant Motion Control problem, we havetwo main objectives:

• to track the reference trajectory in the unconstrained directions, and

• to regulate the force in the constrained directions.

The problem of trajectory-tracking can be solved by designing a sliding-mode controllerof the form illustrated in Figure 2.4. Here α = 0 so that xd(t) = xr(t). α(t) is

RobotDynamicsDynamics

Inverse ForwardKinematics

TrajectoryController_ _

&

New Plant

&+

+

F

α = 0 x

x

xr

xd x xq qu τ

Figure 2.4: Trajectory controller

an internal control signal which will be non-zero when the system is in force control.Treating the whole closed-loop system in Figure 2.4 as a new plant, we may now designa sliding-mode force controller around it to achieve the second objective. In this case,α(t) will be in general non-zero. This structure is shown in Figure 2.5. It is extremely

RobotDynamicsDynamics

Inverse ForwardKinematics

TrajectoryController

ForceController

+

_ _ _&

New Plant

&+

+

F

F

FdF α x

x

xr

xd x xq qu τ

Figure 2.5: Trajectory/force controller

important to note that force control is not simply achieved by the force controllergiving positional commands to the trajectory controller and the latter controlling the

4Even classical control would suffice as the system is decoupled.

Page 18: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

2.3 Controller Structure 11

plant since both the force controller and the trajectory controller share some commonterms which are not easy to show diagrammatically. Hence both controllers interactand are not completely separate entities! This may be thought of as the force controllerdominating the loop during force control and the trajectory command signals beingoffset by the force control signals.

Finally, since the environment stiffness is unknown in practice, an adaptive al-gorithm will be designed to estimate this. The overall simplified structure for thecontroller, together with the plant, is shown in Figure 2.6. The underlying details ofthe controller will become clear in the following chapters.

RobotDynamicsDynamics

Inverse ForwardKinematics

TrajectoryController

ForceController

&

+

_ _ _&

Adaptation

New Plant

&+

+

F

F

F

Fd

FdF α x

x

xr

xd x xq qu

Ωθ

τ

Figure 2.6: Simplified structure for controller and plant

Page 19: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 3

Controller Design: Simple Case

This chapter considers the simplified problem of designing a controller for a single-input single-output (SISO) system of the form of equation (2.7). The problem isgreatly reduced in the SISO case as there are no cross-coupling terms. Furthermore, aSISO design enables us to illustrate the concepts involved more clearly due to simplenotation. This chapter is divided into three sections. In section 3.1, it will be furtherassumed that the environment stiffness k is completely known and that there is nouncertain term multiplying the control input u. This second assumption will be relaxedin section 3.2 and the first assumption will be removed in section 3.3 where an adaptivealgorithm will be derived to estimate the environment stiffness k. Simulation resultsfor each design stage are given at the end of each section.

3.1 Known Environment Stiffness and Simplified

Dynamics

In this section we assume that the environment stiffness k is completely known andthat there is no uncertain term multiplying the control input u.

3.1.1 Controller Synthesis

Consider the SISO system with dynamics:

x = u+ f(X) +m(X)F, (3.1)

where

F =

−kx if x ≥ 0

0 otherwise

and ∣∣∣f(X)− f(X)∣∣∣ ≤ U(X),

|m(X)− m(X)| ≤W (X).

Here u is the actuating force (i.e. the control input). X = (x, x) is the state-vector,where x is the output position. F is the reaction force exerted by an environment

12

Page 20: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 13

placed at x = 0 and having environment stiffness k. f(X) and m(X) are, in general,nonlinear functions of the state. They are not exactly known but the extent of im-precision from their nominal functions f(X) and m(X) is bounded above by functionsU(X) and W (X) respectively. Thus the uncertainty in the system can be covered byspecified functions U(X) and W (X). Due to the inverse dynamics control law de-scribed by equation (2.5) and illustrated in Figure 2.3, equation (2.7) will be such thatour estimates G(X), f(X) and M(X) to the uncertain matrix functions G(X), f(X)and M(X) are I, 0 and 0 respectively. Hence here we choose f(X) = 0 and m(X) = 0.

Let λ be a design parameter which can be interpreted as the desired control band-width [5]. Define x = x− xd as the error between the actual position and the desiredposition and let the desired position xd be obtained by subtracting some internal con-trol signal α(t) from the reference signal xr (i.e. xd = xr − α). Later it will be seenthat α(t) plays a very important role in force control. α(t) = 0 in trajectory control,hence giving xd(t) = xr(t), and varies so that force control is achieved when the systemis in contact with the environment. Furthermore, define X = (x, ˙x) as the state-vectorfor the error dynamics. Formally let the variable of interest be

∫ tx(T ) dT (where T is

a dummy variable of integration) and define a time-varying sliding surface s(t) in thestate-space Rr by the scalar equation s(X, t) = 0, where

s =

(d

dt+ λ

)r−1 ∫ t

x dT.

Note that∫ tx dT is defined to within a constant1. The constant can be chosen such

that s(t = 0) = 0 regardless of X(t = 0).∫ tx dT was chosen as the variable of interest

rather than simply x so as to augment the state-space by one dimension and hence passthe sliding surface through the initial condition. In this case, the state is initially onthe sliding surface and we need not wait for the state to converge to the surface beforesliding occurs. Here r = 3 as the system described by equation (3.1) is third-orderwith respect to the variable of interest. Hence the surface s(t) is a plane which ‘lives’in R3. An argument which shows that the choice of dynamics used to define the abovesliding surface is the “best-conditioned” among linear dynamics, in the sense that itguarantees the best tracking performance for a given desired control bandwidth and agiven extent of parameter uncertainty, is given in Slotine and Li [43, p. 300]. Thus,

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0)︸ ︷︷ ︸so that

s = 0 at t = 0

, (3.2)

givings = ¨x+ 2λ ˙x+ λ2x

= x− xd + 2λ ˙x+ λ2x

= u+ f(X) +m(X)F − xd + 2λ ˙x+ λ2x.

1This is because there is no lower limit of integration.

Page 21: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 14

Let ‘sat’ denote the saturation function defined as follows:

sat y =

−1 if y < −1

y if |y| ≤ 1

1 if y > 1

and let Φ be the (non-constant) thickness of a boundary layer neighbouring the switch-ing surface s(t) = 0. This boundary layer is required so that we can approximate theswitched control law (which causes control chattering) with a continuous control lawinside this boundary [44]. If we now choose

u = xd − 2λ ˙x− λ2x−Ψ sats

Φ, (3.3)

where Ψ is the extent of nonlinearity required to guarantee that state-trajectoriesoutside the boundary layer converge to within the boundary layer, we have

s = f(X) +m(X)F −Ψ sats

Φ.

When |s| > Φ, we want all state-trajectories to converge to within the sliding region.Hence we want to satisfy the Lyapunov Condition [43, p. 293]:

1

2

d

dts2 = ss = f(X)s+m(X)Fs−Ψ |s| ≤ (Φ− η) |s|

where η is a positive constant required to ensure that trajectories outside the boundarylayer converge to within the sliding region in finite time [5, p. 142].Thus we must select Ψ such that

(Ψ + Φ− η) |s| ≥ |f(X)| |s|+ |m(X)| |F | |s| ,

or substituting the uncertainty bounds

Ψ ≥ η + U(X) +W (X) |F | − Φ.

Hence by choosing

Ψ = η + U(X) +W (X) |F | − Φ (3.4)

we ensure Boundary Layer Attractiveness.

When |s| ≤ Φ, we have

s+

Φ

)s = f(X) +m(X)F. (3.5)

Thus letΨ

Φ= λ ⇒ Ψ = λΦ. (3.6)

Page 22: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 15

This condition is known as the Balanced Condition. It specifies the best tracking per-formance attainable, given the desired control bandwidth and the extent of parameteruncertainty [43, p. 298].

Using equations (3.4), (3.5) and (3.6) we get

Φ + λΦ = η + U(X) +W (X) |F | (3.7)

and s+ λs = f(X) +m(X)F. (3.8)

Let the Laplace complex variable be denoted by q. Since equations (3.2), (3.7) and (3.8)are strictly linear, they can be illustrated graphically as follows:

qsΦη + U(X) +W (X) |F | f(X) +m(X)F x

R t x dT⇒1

q+λ1

q+λ1

q+λ1

q+λ

(3.7) (3.8) (3.2)

Figure 3.1: Closed-loop system behaviour when balanced condition is achieved

Figure 3.1 illustrates that the balance condition amounts to tuning up the closed-loop system so that it mimics a third-order critically damped system. If the balancedcondition is satisfied (left diagram), then s will be a low-pass filtered version of theperturbations and x will be a further low-pass filtered version of s (right diagram).Therefore Φ is a measure of the uncertainty in our model and s is a measure of the per-turbation between our nominal model and the actual physical system [43, pp. 294,295].

From the above synthesis we see that when α = 0, the control input u will make xfollow xr; hence Trajectory Control is achieved. Following the argument adopted byAsada and Slotine [5, pp. 149–151] and using Figure 3.1, one could show that the guar-anteed tracking precision is given by |x− xr| ≤ 2Φ/λ. Furthermore, when α 6= 0, thecontrol input u will make x follow xd [= (xr − α)]. Thus Force Control is achieved ifwe vary α(t) such that F remains constant at the desired contact force Fd when thesystem is in contact with the environment.

We may attempt to find such an α(t) analytically as follows:

(3.1) ⇒ x = u+ f(X) +m(X)F.

Substituting in our control input from equations (3.3) and (3.6) we get

¨x+ 2λ ˙x+ λ2x = f(X) +m(X)F − (λΦ) sats

Φ. (3.9)

This equation represents the closed-loop dynamics of the system. The solution to thisequation is Uniformly Ultimately Bounded2 [22, p. 211] [46, p. 327].

2If the condition 12ddts

2 ≤ (Φ − η) |s| is satisfied, then s converges to the sliding region in finitetime. This implies that s is ultimately bounded and hence so will x be.

Page 23: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 16

During contact (i.e. x ≥ 0),

F = −kx, F = F − Fd,

F = −kx, ˙F = F = −kx, [Fd = const.]

F = −kx, ¨F = F = −kx.

Since F is negative, the desired contact force Fd should also be defined negative.

Substituting the above equations in equation (3.9) we get:

¨F + 2λ ˙F + λ2F = −λ2Fd − k

(xr + 2λxr + λ2xr)− (α + 2λα+ λ2α)

+f(X) +m(X)F − (λΦ) sat s/Φ . (3.10)

For asymptotic stability of F (i.e. F → 0 as t → ∞), it is sufficient to choose α(t)such that RHS ≡ 0 ∀t (during contact). However, practically this cannot be done sincef(X) and m(X) are uncertain.

Again taking a sliding-mode control approach—formally let the variable of interest be∫ t F (T )−k dT and define a time-varying sliding surface p(t) in the state-space Rr by the

scalar equation p(X, t) = 0, where

p =

(d

dt+ λ

)r−1 ∫ t F

−k dT where r = 3.

Thus

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0)︸ ︷︷ ︸so that

p = 0 at t = 0

, (3.11)

giving

p =1

−k ( ¨F + 2λ ˙F + λ2F ).

Using equation (3.10) we get

p =λ2Fdk

+ (xr + 2λxr + λ2xr)− (α + 2λα + λ2α) + f(X) +m(X)F − (λΦ) sats

Φ.

Similarly to above, let φ be the thickness of a boundary layer neighbouring the forcecontrol switching surface p(t) = 0 and let ψ be the extent of nonlinearity required toensure that state-trajectories outside this boundary layer converge to within it. Thenby choosing

α + 2λα+ λ2α =λ2Fdk

+ (xr + 2λxr + λ2xr)− (λΦ) sats

Φ+ ψ sat

p

φ(3.12)

we havep = f(X) +m(X)F − ψ sat

p

φ.

Page 24: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 17

By an analogous argument to above,

When |p| > φ ⇔ |−kp| > (kφ), we want to satisfy the following Lyapunov condition:

1

2

d

dtp2 = pp = f(X)p+m(X)Fp− ψ |p| ≤ (φ− η) |p| .

Thus we select ψ such that

(ψ + φ− η) |p| ≥ |f(X)| |p|+ |m(X)| |F | |p| ,

or substituting the uncertainty bounds

ψ ≥ η + U(X) +W (X) |F | − φ.

Hence by choosing

ψ = η + U(X) +W (X) |F | − φ (3.13)

we ensure Boundary Layer Attractiveness.

When |p| ≤ φ ⇔ |−kp| ≤ (kφ), we have

p+

φ

)p = f(X) +m(X)F. (3.14)

Thus letψ

φ= k ⇒ ψ = (kφ). (3.15)

Using equations (3.13), (3.14) and (3.15) we get

φ+ (kφ) = η + U(X) +W (X) |F | (3.16)

and p+ kp = f(X) +m(X)F. (3.17)

Again, let the Laplace complex variable be denoted by q. Since equations (3.11), (3.16)and (3.17) are strictly linear, they can be illustrated graphically as follows:

−kpkφη + U(X) +W (X) |F | f(X) +m(X)F FR t F dT

⇒ qkq+k

−kq+k

1q+λ

1q+λ

(3.16) (3.17) (3.11)

Figure 3.2: Closed-loop system behaviour when system is in contact with environment

Note that for a rigid environment k is very large (of the order of 107) and hence kq+k≈ 1

at normal frequencies. This is illustrated in Figure 3.3.

Page 25: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 18

−20

−10

0

Frequency (rad/sec)G

ain

dB

−30

−60

−90

0

Frequency (rad/sec)

Pha

se d

eg

0.01k

0.01k

0.1k

0.1k

k

k

10k

10k

Figure 3.3: Bode diagram for kq+k

Therefore, since k is very large, equations (3.16) and (3.17) become approximatelyalgebraic. Hence kφ and −kp follow η + U(X) + W (X) |F | and − (f(X) +m(X)F )very closely. This however does not imply that there will be high control activity(leading to control chattering) since by equation (3.15) we have

ψ satp

φ≡ −(kφ) sat

(−kp)(kφ)

.

So although φ was made very small due to k, p was made small by the same factor k.Thus, the ratio p/φ remains unchanged and it is this fraction which is directly relatedto the control activity [5, p. 156].

Again, as above, kφ is a measure of the uncertainty in our model and −kp is a mea-sure of the perturbation between our nominal model and the actual physical system.Furthermore, one can see from the above synthesis that Force Control is achieved bychoosing α(t) as in equation (3.12) and ψ as in equation (3.13). Once more, followingthe argument adopted by Asada and Slotine [5, pp. 149–151] and using Figure 3.2, onecould show that the guaranteed force-tracking precision is given by |F − Fd| ≤ 2(kφ)/λwhere (kφ) ≈ η + U(X) +W (X) |F |.

Substituting equation (3.12) in (3.10) we get the following closed-loop contact dynam-ics:

¨F + 2λ ˙F + λ2F = −k(f(X) +m(X)F + (kφ) sat

(−kp)(kφ)

). (3.18)

Notice the similarity between this equation and equation (3.9). A similar argument tobefore shows that the solution to this equation is also Uniformly Ultimately Bounded.

Page 26: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 19

Therefore using equations (3.3), (3.7), (3.12) and (3.16) we get:

When not in contact [α(t) = 0], apply

u = xr − 2λ(x− xr)− λ2(x− xr)− (λΦ) sats

Φ,

where Φ + λΦ = η + U(X) +W (X) |F |

and when in contact [α(t) given by equation (3.12)], apply

u = −2λx− λ2

(x+

Fdk

)+ (kφ) sat

(−kp)(kφ)

,

where φ+ (kφ) = η + U(X) +W (X) |F | .

However, if we apply the above two different control laws and switch between themwhen the system is entering or leaving contact, then it is difficult to prove that theoverall closed-loop system is stable at these switching instances. The system may entera limit cycle with the manipulator oscillating to and fro between the two control lawswhen it crosses the boundary between contact and non-contact repeatedly at sufficienthigh frequency. This situation may occur during impact with the environment dueto the bouncing effect caused by the coefficient of restitution of the environment asillustrated in Figure 3.4.

Non

-con

tact

Con

tact

Con

tact

Non

-con

tact

Con

tact

Non

-con

tact

Trajectory Control Bouncing Force Control

F=0 F<0 F=0 F<0 F=0 F<0

Figure 3.4: Contact/non-contact sequence during bouncing

Notice that this problem is caused by the fact that we have two different control laws,and at these boundaries

ucontact 6= unon-contact

⇒ Discontinuity in the Control Law.

The above control law is discontinuous because α(t) is discontinuous [non-contactα(t) = 0, while contact α(t) is given by equation (3.12)]. This is illustrated in Fig-ure 3.5.

We may attempt to solve this situation by applying one control law for both the contactand non-contact phases as follows:

Page 27: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 20

Trajectory Control Bouncing Force Control

zero level

contact

non-contact

F=0 F<0 F=0 F<0 F=0 F<0

This is the RHS of equation (3.12)

α(t)

Figure 3.5: Discontinuous behaviour in α(t)

Letu = xd − 2λ ˙x− λ2x− (λΦ) sat

s

Φ,

with

x = x− xd, xd = xr − α,Φ + λΦ = η + U(X) +W (X) |F | ,φ+ (kφ) = η + U(X) +W (X) |F | ,

α + 2λα + λ2α =

λ2Fdk

+ (xr + 2λxr + λ2xr)− (λΦ) sats

Φ

− (kφ) sat(−kp)(kφ)

Lµ(xr, xr),

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0),

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0),

where Lµ(xr, xr) is defined by Lµ(xr, xr) =

1 if xr + µxr ≥ 0

0 otherwise.

−10−5

05

10

−10−5

05

10−1

0

1

2

xrxr

L µ(x

r,x

r)

Figure 3.6: This figure depicts L1(xr, xr)

Page 28: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 21

As xr varies with time, it is moving in the xr-xr plane and hence generating a gatingsignal Lµ(xr, xr). This is depicted in Figure 3.7.

trajectories traced by as time is advancing

xr

xr

−µ

Lµ = 0

Lµ = 1

xr + µxr = 0

xr

Figure 3.7: Variation in Lµ(xr, xr) as xr varies with t

The advantage of using such a function is that the system changes to force controlbefore actually hitting the environment—hence avoiding bouncing. This is desirable,so that the system can slowly decrease its momentum and hit the environment withvery small speed. Notice that the faster the system is approaching the environment,the greater the distance allowed by the function to decelerate. The same reasoningapplies when we are going from force control to trajectory control. Time (and henceits equivalent distance) is required to accelerate the system, which was initially at rest,to a speed equal to that of the reference trajectory3.

With this gating signal, α(t) will vary as shown in Figure 3.8.

zero level

xr < 0 xr < 0xr < 0 xr > 0 xr > 0

Lµ = 0Lµ = 0 Lµ = 1

This is the RHS of equation (3.12) × Lµ(xr , xr)

α(t)

Figure 3.8: α(t) is now continuous

The advantages of using such a control law are:

• one control law for both the contact and non-contact phases,

• α(t) is continuous ∀t.3Due to this, the end-effector will loose contact early—or at least the force starts decreasing towards

the end.

Page 29: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 22

The remaining problem is that u(t) is still not continuous for all t; even though α(t)is. The reason for this is that the expression for u(t) contains terms in α(t) and α(t),and hence for u(t) to be continuous we must ensure that α(t) is twice differentiableeverywhere.

It turns out that if we low-pass filter our gating signal Lµ(xr, xr), we obtain continuityin u(t). But a first-order low-pass filter (LPF) causes a big delay in going to forcecontrol if the LPF is very fast, or a large overshoot in force if the LPF is very slow.This can be most easily explained as follows:

Very slow LPF (large time constant)

1. α ≈ 0 for very long time,

2. xd ≈ xr during this time,

3. x which is following xd hits the environment with the same velocity as xd does,

4. hence large overshoot in force.

Very fast LPF (small time constant)

1. gating signal converges to 1 very quickly,

2. xd + 2λxd + λ2xd converges to −λ2Fd/k very quickly,

3. u(t) converges to uforce-control(t) very quickly,

4. exponential decay of position with time-constant λ,

5. takes very long time before impact with environment occurs since −Fd/k is verysmall (as k is very large). This is shown in Figure 3.9.

clearancedue to

environmentimpact with

time constant

x

t

λ

Lµ(xr, xr)

−Fdk

Figure 3.9: Large delay before impact with environment

We thus have to consider a second-order LPF of the form ω2n

q2+2ξωnq+ω2n. The optimal ξ

and ωn can be found by optimisation to satisfy the following objectives:

• the low-pass filtered Lµ(xr, xr) should remain zero as long as possible so that xcontinues to follow xr for as long as possible,

Page 30: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 23

• the low-pass filtered Lµ(xr, xr) should go to 1 and settle at 1 as fast as possiblethereafter so that F converges to Fd as fast as possible.

The constraint on the optimisation is that during this period, the overshoot in forceshould be small otherwise the optimal ξ and ωn might give large force overshoot.

clearancedue to

impact withenvironment

xd

xd

t

Lµ(xr, xr)

−Fdk

Figure 3.10: Minimisation of shaded area

These objectives can be expressed mathematically as:

minξ,ωn

∫ ∞0

(Fdk

+ xd

)2

t dt : max(xd) ≤(−1.5Fdk

)and are illustrated in Figure 3.10. A program to solve this optimisation is listed inAppendix B.1 and its results are given in Appendix B.2.

In summary, for both the contact and non-contact phases apply:

u = xd − 2λ ˙x− λ2x− (λΦ) sats

Φ,

with

x = x− xd, xd = xr − α,Φ + λΦ = η + U(X) +W (X) |F | ,φ+ (kφ) = η + U(X) +W (X) |F | ,

α + 2λα+ λ2α =

λ2Fdk

+ (xr + 2λxr + λ2xr)− (λΦ) sats

Φ

− (kφ) sat(−kp)(kφ)

Lξ,ωnµ (xr, xr),

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0),

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0),

where Lξ,ωnµ (xr, xr) is the low-pass filtered version of Lµ(xr, xr) through ω2n

q2+2ξωnq+ω2n.

Here, only the equation for α(t) is different from what we had on Page 20.

Page 31: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 24

Modifications in −kp equation

• To avoid integrator windup in the expression for −kp, stop integrating when intrajectory control mode (i.e. α = 0),

• Reset the integrator to zero and reset ˙F (0), 2λF (0) such that (−kp) = 0 everytime the system enters force control mode,

• Create a fictitious mathematical environment above the actual physical environ-ment so that when the system changes from trajectory control to force controlbefore actually hitting the physical environment, −kp gives feedback accordingto this fictitious environment. Let this fictitious mathematical environment havethe same environment stiffness k as the actual physical environment.

3.1.2 Simulation Results

The above controller was simulated using Simulink 2.0 and the following results wereobtained. Figure 3.11(a) illustrates the reference trajectory to be followed and thecontrolled output position. The corresponding velocities are shown in Figure 3.11(b).Note that xr > 0 means inside the environment whilst xr < 0 means outside the envi-ronment. This peculiar reference trajectory was chosen because it has some interestingcharacteristics which enable us to test the controller’s trajectory and force control ca-pabilities. This reference trajectory is made up from three parts. The first part isa sine-wave varying outside the environment. This enables us to test the trajectory-tracking performance. The second part is a spline which was designed, for ease ofuse, to have exactly 1ms−1 velocity at the moment of crossing xr = 0. This enablesus to test the behaviour of the controller at the moment of impact and just after theend-effector leaves the environment. Finally, the third part composing this referencetrajectory is again a sine-wave, but this time varying inside the environment. Thisenables us to test the force-regulation performance. Note that an inherent assumptionthroughout the controller synthesis of Section 3.1.1 was that xr is twice differentiable.This assumption is quite mild and can easily be satisfied in practice.

Figures 3.11(c) and 3.11(d) show the position and velocity trajectory-tracking errorsrespectively. Note that the position trajectory tracking error is of the order of 10−4m.Figures 3.11(e) and 3.11(f) are a magnification of Figure 3.11(a) and illustrate thebehaviour of x as it approaches and hits the environment and as it subsequently leavesthe environment.

Figures 3.12(a) and 3.12(b) show the behaviour of α(t) and xd(t) respectively. Notethat xd(t) = xr(t) when xr(t) < 0 and converges to −Fd/k (very small) when xr(t) > 0.The position and force boundary layer thicknesses are depicted in Figures 3.12(c)and 3.12(d). The corresponding variables s and (−kp) are shown in Figures 3.12(e)and 3.12(f) respectively. Note that the variations in s and (−kp) are due to the pertur-bation between our nominal model and the actual physical system. During simulation,the nominal model was taken to be x = u and the actual physical system was takento be x = u + f(X) + m(X)F with f(X) and m(X) as shown in Figures 3.13(d)and 3.13(e) respectively.

Page 32: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 25

The control input is given in Figure 3.13(a). Note that it is everywhere continuous.The negative spikes are due to the fact that when the manipulator is approaching theenvironment, it must undergo rapid deceleration and when it is leaving the environment(after force control), it must be accelerated very quickly in the negative x-direction.The desired contact force and the actual force are shown in Figure 3.13(b). The gatingfunctions are illustrated in Figure 3.13(c) and the uncertainty functions f(X) andm(X) are depicted in Figures 3.13(d) and 3.13(e) respectively.

Page 33: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 26

0 5 10 15 20 25−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time [s]

A

C D

x

xr

xan

dxr

[m]

(a) Position trajectories

0 5 10 15 20 25

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time [s]

B

x

xr

xan

dxr

[ms−

1]

(b) Velocity trajectories

9 9.5 10 10.5 11 11.5 12 12.5

−1

−0.5

0

0.5

1

1.5

x 10−4

Time [s]

A

(x−xr)

[m]

(c) Trajectory control position-error

9 9.5 10 10.5 11 11.5 12 12.5

−1

−0.5

0

0.5

1

x 10−3

Time [s]

B

(x−xr)

[ms−

1]

(d) Trajectory control velocity-error

2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95−0.035

−0.03

−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

Time [s]

C

xxr

xan

dxr

[m]

(e) Just before hitting environment

7.9 7.95 8 8.05 8.1 8.15 8.2 8.25−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

Time [s]

D

x xr

xan

dxr

[m]

(f) Just after leaving environment

Figure 3.11: Simulation Results

Page 34: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 27

0 5 10 15 20 25−0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Time [s]

α[m

]

(a) Internal force-control signal

0 5 10 15 20 25−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

Time [s]

xd

[m]

(b) Desired position

0 5 10 15 20 250.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

0.5

0.55

0.6

Time [s]

Φ[m

s−1]

(c) Position boundary layer thickness

0 5 10 15 20 252

4

6

8

10

12

14

16

Time [s]

[Ns−

1]

(d) Force boundary layer thickness

0 5 10 15 20 25−0.07

−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

0.02

0.03

Time [s]

s[m

s−1]

(e) Algebraic measure of perturbations

0 5 10 15 20 25−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time [s]

−kp

[Ns−

1]

(f) Algebraic measure of perturbations

Figure 3.12: Simulation Results

Page 35: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.1 Known Environment Stiffness and Simplified Dynamics 28

0 5 10 15 20 25−12

−10

−8

−6

−4

−2

0

2

4

6

Time [s]

u[m

s−2]

(a) Control input

0 5 10 15 20 25−12

−10

−8

−6

−4

−2

0

2

Time [s]

F

Fd

Fan

dFd

[N]

(b) Reaction force

0 5 10 15 20 25−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time [s]

Gat

eS

ign

als

(c) Gating functions

−1−0.5

00.5

1

−2−1

01

2−2

−1

0

1

2

x [m]x [ms−1]

f(X

)[m

s−2]

Model Uncertainty: f(X)

(d) Model uncertainty

−1−0.5

00.5

1

−2−1

01

2−1

−0.5

0

0.5

1

x [m]x [ms−1]

m(X

)[K

g−1]

Model Uncertainty: m(X)

(e) Model uncertainty

Figure 3.13: Simulation Results

Page 36: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 29

3.2 Known Environment Stiffness and Complete

Dynamics

In this section, the environment stiffness k is still assumed to be completely known butthe assumption that there is no uncertain term multiplying the control input u is nowremoved; i.e. here we consider the complete SISO dynamics. The controller synthesisis essentially the same as that presented in Section 3.1.1 but with some very importantdifferences.

3.2.1 Controller Synthesis

Consider the SISO system with dynamics:

x = g(X)u+ f(X) +m(X)F, (3.19)

where

F =

−kx if x ≥ 0

0 otherwise

andV (X)−1 ≤ g(X)

g(X)≤ V (X),

∣∣∣f(X)− f(X)∣∣∣ ≤ U(X),

|m(X)− m(X)| ≤W (X).

Here g(X) is, in general, a nonlinear function of the state. It is not exactly knownbut is of known sign (i.e. g(X) > 0)4 and the extent of imprecision from its nominalfunction g(X) is bounded by functions V (X)−1 and V (X). Note that V (X) ≥ 1, forif it were < 1, then V (X)−1 > V (X) which is not sensible. All the other variablesand functions are defined as in Section 3.1.1. As before, our estimates G(X), f(X)and M(X) to the uncertain matrix functions G(X), f(X) and M(X) are I, 0 and 0respectively. Hence here we choose g(X) = 1, f(X) = 0 and m(X) = 0.

As before, formally let the variable of interest be∫ tx dT and define a time-varying

sliding surface s(t) in the state-space Rr by the scalar equation s(X, t) = 0, where

s =

(d

dt+ λ

)r−1 ∫ t

x dT where r = 3.

Thus, as in equation (3.2), we have

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0)︸ ︷︷ ︸so that

s = 0 at t = 0

, (3.20)

4This assumption is very mild. It only means that u contributes to x with known sign.

Page 37: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 30

givings = ¨x+ 2λ ˙x+ λ2x

= x− xd + 2λ ˙x+ λ2x

= g(X)u+ f(X) +m(X)F − xd + 2λ ˙x+ λ2x.

As before, if we choose

u = xd − 2λ ˙x− λ2x−Ψ sats

Φ(3.21)

we get

s = (g(X)− 1)(xd − 2λ ˙x− λ2x) + f(X) +m(X)F − g(X)Ψ sats

Φ.

Again when |s| > Φ, we want to satisfy the Lyapunov Condition:

1

2

d

dts2 = ss ≤ (Φ− η) |s| .

That is

(g(X)− 1)(xd − 2λ ˙x− λ2x)s+ f(X)s+m(X)Fs− g(X)Ψ |s| ≤ (Φ− η) |s| .

Thus we select Ψ such that

(g(X)Ψ + Φ− η) |s| ≥ (g(X)− 1)(xd − 2λ ˙x− λ2x)s+ f(X)s+m(X)Fs,

or (Ψ + g(X)−1Φ− g(X)−1η) |s| ≥ (1− g(X)−1)(xd − 2λ ˙x− λ2x)s+ g(X)−1f(X)s+ g(X)−1m(X)Fs,

or Ψ + g(X)−1Φ− g(X)−1η ≥∣∣1− g(X)−1

∣∣ ∣∣xd − 2λ ˙x− λ2x∣∣

+∣∣g(X)−1

∣∣ |f(X)|+∣∣g(X)−1

∣∣ |m(X)| |F | .

Hence Ψ must verify

Ψ ≥ g(X)−1η +∣∣g(X)−1 − 1

∣∣ ∣∣xd − 2λ ˙x− λ2x∣∣

+∣∣g(X)−1

∣∣ |f(X)|+∣∣g(X)−1

∣∣ |m(X)| |F | − g(X)−1Φ,

or Ψ ≥∣∣g(X)−1

∣∣ η +∣∣g(X)−1 − 1

∣∣ ∣∣xd − 2λ ˙x− λ2x∣∣

+ V (X)U(X) + V (X)W (X) |F | − g(X)−1Φ,

or Ψ ≥ V (X)η + (V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)U(X) + V (X)W (X) |F | − g(X)−1Φ,

or Ψ ≥ V (X)(η + U(X) +W (X) |F |)+ (V (X)− 1)

∣∣xd − 2λ ˙x− λ2x∣∣− g(X)−1Φ.

Page 38: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 31

Consequently by choosing

Ψ =

(V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)(η + U(X) +W (X) |F |)− V (X)−1Φ

when Φ ≥ 0

(V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)(η + U(X) +W (X) |F |)− V (X)Φ

when Φ < 0

(3.22)

we ensure Boundary Layer Attractiveness. Notice that Ψ is now split into two expres-sions, which is different from what we had in Section 3.1.1.

When |s| ≤ Φ, we have

s+

(g(X)Ψ

Φ

)s = (g(X)− 1)(xd − 2λ ˙x− λ2x) + f(X) +m(X)F. (3.23)

Thus let (g(X)Ψ

Φ

)max

= λ.

Then [g(X)

]max

Ψ

Φ= λ ⇒ V (X)

Ψ

Φ= λ ⇒ Ψ = V (X)−1λΦ. (3.24)

This condition is again the Balanced Condition.

Using equations (3.22) and (3.24) we get

Φ + λΦ = V (X)(V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)2(η + U(X) +W (X) |F |) when Φ ≥ 0

Φ + V (X)−2λΦ = (1− V (X)−1)∣∣xd − 2λ ˙x− λ2x

∣∣+ (η + U(X) +W (X) |F |) when Φ < 0

. (3.25)

We now need to show that only one of the above equations can be active at any onetime. This can be easily seen if we rearrange equation (3.25) as follows:

Φ = P (X)

(1− V (X)−1)∣∣xd − 2λ ˙x− λ2x

∣∣+ (η + U(X) +W (X) |F |)− V (X)−2λΦ,

where

P (X) =

V (X)2 when Φ ≥ 0

1 when Φ < 0.

Now since V (X) ≥ 1 then P (X) ≥ 1. This in turn implies that P (X) cannot affect thesign of Φ and thus there is no conflict in selecting between the two equations appearingin equation (3.25).

Also, from equations (3.23) and (3.24), we have

s+ λs ≈ (g(X)− 1)(xd − 2λ ˙x− λ2x) + f(X) +m(X)F. (3.26)

Page 39: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 32

In the above equation, the LHS ≈ RHS rather than the LHS = RHS because now thebalanced condition is, in general, not exactly achieved. Also, as before, Φ is a measureof the uncertainty in our model and s is a measure of the perturbation between ournominal model and the actual physical system.

Again, from the above synthesis we see that when α = 0, the control input u will makex follow xr; hence Trajectory Control is achieved. Extending this argument, whenα 6= 0, the control input u will make x follow xd [= (xr − α)]. Thus Force Control canbe achieved if we vary α(t) such that F remains constant at Fd when the system is incontact with the environment.

We may attempt to find such an α(t) analytically as follows:

(3.19) ⇒ x = g(X)u+ f(X) +m(X)F.

Substituting in our control input from equation (3.21) we get

x = g(X)(xd − 2λ ˙x− λ2x) + f(X) +m(X)F − g(X)Ψ sats

Φ.

Putting x = g(X)x− (g(X)− 1)x we have

g(X)(¨x+ 2λ ˙x+ λ2x) = (g(X)− 1)x+ f(X) +m(X)F − g(X)Ψ sats

Φ,

and rearranging gives

¨x+ 2λ ˙x+ λ2x = (1− g(X)−1)x+ g(X)−1f(X) + g(X)−1m(X)F −Ψ sats

Φ. (3.27)

This equation represents the closed-loop dynamics of the system. As before, the solu-tion to this equation is Uniformly Ultimately Bounded.

During contact (i.e. x ≥ 0),

F = −kx, F = F − Fd,

F = −kx, ˙F = F = −kx, [Fd = const.]

F = −kx, ¨F = F = −kx.

Substituting the above equations in equation (3.27) we get:

¨F + 2λ ˙F + λ2F = −λ2Fd − k

(xr + 2λxr + λ2xr)− (α + 2λα+ λ2α)

+ (1− g(X)−1)x+ g(X)−1f(X) + g(X)−1m(X)F −Ψ sat s/Φ. (3.28)

For F → 0 as t → ∞, it is sufficient to choose α(t) such that RHS ≡ 0 ∀t (duringcontact). However, practically this cannot be done since g(X), f(X) and m(X) areuncertain and x is difficult to measure.

Page 40: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 33

As in the previous section, taking a sliding-mode approach—formally let the variableof interest be

∫ t F−k dT and define a time-varying sliding surface p(t) in the state-space

Rr by the scalar equation p(X, t) = 0, where

p =

(d

dt+ λ

)r−1 ∫ t F

−k dT where r = 3.

Thus

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0)︸ ︷︷ ︸so that

p = 0 at t = 0

, (3.29)

giving

p =1

−k ( ¨F + 2λ ˙F + λ2F ).

Using equation (3.28) we get

p =λ2Fdk

+ (xr + 2λxr + λ2xr)− (α+ 2λα + λ2α)

+ (1− g(X)−1)x+ g(X)−1f(X) + g(X)−1m(X)F −Ψ sats

Φ.

Then by choosing

α+ 2λα + λ2α =λ2Fdk

+ (xr + 2λxr + λ2xr)−Ψ sats

Φ+ ψ sat

p

φ(3.30)

we get

p = (1− g(X)−1)x+ g(X)−1f(X) + g(X)−1m(X)F − ψ satp

φ.

Note that x is difficult to measure. So using equation (3.19) we have

p = (1− g(X)−1) [g(X)u+ f(X) +m(X)F ] + g(X)−1f(X)

+ g(X)−1m(X)F − ψ satp

φ

in which u is computable. Simplifying this equation we get

p = (g(X)− 1)u+ f(X) +m(X)F − ψ satp

φ.

When |p| > φ ⇔ |−kp| > (kφ), we once more want to satisfy the Lyapunov Condition:

1

2

d

dtp2 = pp = (g(X)− 1)up+ f(X)p+m(X)Fp− ψ |p| ≤ (φ− η) |p| .

Page 41: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 34

Thus we select ψ such that

(ψ + φ− η) |p| ≥ |g(X)− 1| |u| |p|+ |f(X)| |p|+ |m(X)| |F | |p| ,

or substituting the uncertainty bounds

ψ ≥ η + (V (X)− 1) |u|+ U(X) +W (X) |F | − φ.

Hence by choosing

ψ = η + (V (X)− 1) |u|+ U(X) +W (X) |F | − φ (3.31)

we ensure Boundary Layer Attractiveness.

When |p| ≤ φ ⇔ |−kp| ≤ (kφ), we have

p +

φ

)p = (g(X)− 1)u+ f(X) +m(X)F. (3.32)

Thus letψ

φ= k ⇒ ψ = (kφ). (3.33)

Using equations (3.31), (3.32) and (3.33) we get

φ+ (kφ) = η + U(X) +W (X) |F |+ (V (X)− 1) |u| (3.34)

and p+ kp = f(X) +m(X)F + (g(X)− 1)u. (3.35)

Once more, kφ is a measure of the uncertainty in our model and −kp is a measure ofthe perturbation between our nominal model and the actual physical system.

Substituting equation (3.30) in (3.28) we have the following closed-loop contact dy-namics:

¨F + 2λ ˙F + λ2F = −k

(1− g(X)−1)x+ g(X)−1f(X)

+ g(X)−1m(X)F − ψ satp

φ

.

(3.36)

Notice the similarity between this equation and equation (3.27). The solution to thisequation is thus also Uniformly Ultimately Bounded.

The same reasoning as in Section 3.1.1 shows that we should not apply two differentcontrol laws for the contact and non-contact phases. Instead we apply one law asfollows:

Page 42: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 35

Letu = xd − 2λ ˙x− λ2x−

(V (X)−1λΦ

)sat

s

Φ, (3.37)

with

x = x− xd, xd = xr − α, (3.38)

Φ + λΦ = V (X)(V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)2(η + U(X) +W (X) |F |) when Φ ≥ 0

Φ + V (X)−2λΦ = (1− V (X)−1)∣∣xd − 2λ ˙x− λ2x

∣∣+ (η + U(X) +W (X) |F |) when Φ < 0

, (3.39)

φ+ (kφ) = η + U(X) +W (X) |F |+ (V (X)− 1) |u| , (3.40)

α + 2λα + λ2α =

λ2Fdk

+ (xr + 2λxr + λ2xr)−(V (X)−1λΦ

)sat

s

Φ

− (kφ) sat(−kp)(kφ)

Lξ,ωnµ (xr, xr),

(3.41)

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0), (3.42)

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0). (3.43)

The same modifications as described on page 24 should be performed on equation (3.43)above.

3.2.2 Simulation Results

The above controller was simulated using Simulink 2.0 and the following results wereobtained. Most of the graphs presented here have the same interpretation as in Sec-tion 3.1.2. Consequently, only the important differences will be pointed out.

Figure 3.14 again shows the reference trajectory and the controlled output position,the corresponding velocities, the trajectory-tracking errors, and magnifications of x justbefore hitting the environment and just after leaving the environment.

It can be seen that Figures 3.15(c) and 3.15(d) are now affected by the controlinput waveform u. This is due to the uncertain term g(X). This again confirmsour interpretation that Φ and (kφ) are measures of the uncertainty in our model.Figure 3.16(b) is a magnification of Figure 3.16(a) at the moment of impact. This showsthat there is no control chattering and that the control input waveform is smooth. Theuncertainty function g(X) is depicted in Figure 3.16(d). This uncertainty function hasa mean-value of 1.

Page 43: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 36

0 5 10 15 20 25−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time [s]

A

C D

x

xr

xan

dxr

[m]

(a) Position trajectories

0 5 10 15 20 25

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time [s]

B

x

xr

xan

dxr

[ms−

1]

(b) Velocity trajectories

9 9.5 10 10.5 11 11.5 12 12.5

−4

−3

−2

−1

0

1

2

3

4

x 10−5

Time [s]

A

(x−xr)

[m]

(c) Trajectory control position-error

9 9.5 10 10.5 11 11.5 12 12.5

−3

−2

−1

0

1

2

3

x 10−4

Time [s]

B

(x−xr)

[ms−

1]

(d) Trajectory control velocity-error

2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95−0.035

−0.03

−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

Time [s]

C

xxr

xan

dxr

[m]

(e) Just before hitting environment

7.9 7.95 8 8.05 8.1 8.15 8.2 8.25−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

Time [s]

D

x xr

xan

dxr

[m]

(f) Just after leaving environment

Figure 3.14: Simulation Results

Page 44: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 37

0 5 10 15 20 25−0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Time [s]

α[m

]

(a) Internal force-control signal

0 5 10 15 20 25−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

Time [s]

xd

[m]

(b) Desired position

0 5 10 15 20 250.1

0.12

0.14

0.16

0.18

0.2

0.22

Time [s]

Φ[m

s−1]

(c) Position boundary layer thickness

0 5 10 15 20 252

2.5

3

3.5

4

4.5

5

Time [s]

[Ns−

1]

(d) Force boundary layer thickness

0 5 10 15 20 25−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

Time [s]

s[m

s−1]

(e) Algebraic measure of perturbations

0 5 10 15 20 25−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Time [s]

−kp

[Ns−

1]

(f) Algebraic measure of perturbations

Figure 3.15: Simulation Results

Page 45: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.2 Known Environment Stiffness and Complete Dynamics 38

0 5 10 15 20 25−12

−10

−8

−6

−4

−2

0

2

4

6

Time [s]

E

u[m

s−2]

(a) Control input

2.6 2.8 3 3.2 3.4 3.6−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time [s]

E

u[m

s−2]

(b) Control input at moment of impact

0 5 10 15 20 25−12

−10

−8

−6

−4

−2

0

2

Time [s]

F

Fd

Fan

dFd

[N]

(c) Reaction force

−1−0.5

00.5

1

−2−1

01

20.9

0.95

1

1.05

1.1

1.15

x [m]x [ms−1]

g(X

)Model Uncertainty: g(X)

(d) Model uncertainty

−1−0.5

00.5

1

−2−1

01

2−0.4

−0.2

0

0.2

0.4

0.6

x [m]x [ms−1]

f(X

)[m

s−2]

Model Uncertainty: f(X)

(e) Model uncertainty

−1−0.5

00.5

1

−2−1

01

2−0.2

−0.1

0

0.1

0.2

x [m]x [ms−1]

m(X

)[K

g−1]

Model Uncertainty: m(X)

(f) Model uncertainty

Figure 3.16: Simulation Results

Page 46: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 39

0 5 10 15 20 25−0.2

0

0.2

0.4

0.6

0.8

1

Time [s]

Gat

eS

ign

als

Figure 3.17: Gating Functions

3.3 Unknown Environment Stiffness and Complete

Dynamics

In Section 3.2, the environment stiffness k was assumed to be completely known. Nowwe will relax this remaining assumption and derive an Adaptive Algorithm that willestimate the environment stiffness.

3.3.1 Controller Synthesis

Adaptation only makes sense when the system is in contact with the environment andis in force control5. During this time Lξ,ωnµ (xr, xr) = 1 [see equation (3.41)]. The pro-cedure adopted in this section to derive an adaptive observer uses some of the ideas ofCanudas de Wit and Brogliato [10], although the techniques used in their study werequite different from what is presented here.

In practice k is unknown—we only have an estimate k. Now since α(t) depends on k[see equation (3.41)], then we only have an estimate to α(t). Denote this estimate byα(t). If we use this estimate in our control law, then equation (3.37) becomes

u = (xr − ¨α)− 2λ[x− (xr − ˙α)

]− λ2

[x− (xr − α)

]−(V (X)−1λΦ

)sat

s

Φ. (3.44)

Substituting (3.44) in (3.19) and using the fact that F = −kx we get

F + 2λF + λ2F = −k

(xr + 2λxr + λ2xr)− (¨α + 2λ ˙α + λ2α) + (1− g(X)−1)x

+ g(X)−1f(X) + g(X)−1m(X)F −(V (X)−1λΦ

)sat

s

Φ

. (3.45)

5This is because force feedback is only available during this time, and it is this force feedback whichprovides information about the actual environment stiffness.

Page 47: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 40

Now using equation (3.41) in (3.45) we get6

¨F + 2λ ˙F + λ2F = k

(¨α+ 2λ ˙α + λ2α)− (1− g(X)−1)x− g(X)−1f(X)

− g(X)−1m(X)F − (kφ) sat(−kp)(kφ)

(3.46)

where α = α − α. Equation (3.46) represents the closed-loop contact error dynamics.The terms on the RHS are due to the uncertainty.

Also, equation (3.41) can be parameterised as follows:

α + 2λα + λ2α = θΩ + (xr + 2λxr + λ2xr)−(V (X)−1λΦ

)sat

s

Φ− (kφ) sat

(−kp)(kφ)

(3.47)

where θ = 1/k, θ = 1/k and Ω = λ2Fd. Equation (3.47) can be used as a basis forthe design of an adaptive observer. For consistency of notation, again let the Laplacecomplex variable be denoted by q.

Lemma 3.3.1 Let W (q) = k (q+ρ)(q+λ)2 where k, ρ, λ > 0. Then W (q) is strictly positive

real (SPR) if ρ < 2λ.

Proof. The proof easily follows from the facts:

• W (q) has no poles in <q ≥ 0 or at infinity,

• Since W (jω) = k (jω+ρ)(jω+λ)2 then <W (jω) =

k(2λω2−ρω2+ρλ2)(λ2+ω2)2 .

Thus <W (jω) > 0 ∀ω if ρλ2

ω2 > (ρ− 2λ) ∀ω. That is if ρ− 2λ < 0.2

Proposition 3.3.2 Consider the system described by equation (3.19), together withthe control law given by equation (3.44) and the following adaptive observer structure:

¨α + 2λ ˙α + λ2α =θΩ +

˙θΩ

+

(xr + 2λxr + λ2xr)−

(V (X)−1λΦ

)sat

s

Φ

− (kφ) sat(−kp)(kφ)

(3.48)

with ˙Ω + ρΩ = Ω, ρ > 0, (3.49)

˙θ = −γΩF , γ > 0, (3.50)

W (q) = k(q + ρ)

(q + λ)2is SPR. (3.51)

Then θ → θ (i.e. k → k) and F → 0 as t→∞.

6Recall that during contact and force control Lξ,ωnµ (xr , xr) = 1.

Page 48: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 41

Proof. Subtracting equation (3.47) from equation (3.48) we get:

¨α + 2λ ˙α+ λ2α =θΩ +

˙θΩ− θΩ

− (kφ) sat

(−kp)(kφ)

+ (kφ) sat(−kp)(kφ)

.

Introducing θ = θ − θ and noting that ˙θ =˙θ since θ is constant, we get:

¨α + 2λ ˙α+ λ2α =θΩ + ˙θΩ

− (kφ) sat

(−kp)(kφ)

+ (kφ) sat(−kp)(kφ)

(3.49)⇒ =θ ˙Ω +

˙θΩ + ρθΩ

− (kφ) sat

(−kp)(kφ)

+ (kφ) sat(−kp)(kφ)

=

(d

dt+ ρ

)θΩ− (kφ) sat

(−kp)(kφ)

+ (kφ) sat(−kp)(kφ)

. (3.52)

Using equation (3.52) in equation (3.46) we get

¨F + 2λ ˙F + λ2F = k

(d

dt+ ρ

)θΩ− (1− g(X)−1)x− g(X)−1f(X)

− g(X)−1m(X)F − (kφ) sat(−kp)(kφ)

.

Taking the Laplace Transform L we have

F (q) = k(q + ρ)

(q2 + 2λq + λ2)︸ ︷︷ ︸W (q)

LθΩ− k

(q2 + 2λq + λ2)L

(1− g(X)−1)x+ g(X)−1f(X)

+ g(X)−1m(X)F + (kφ) sat(−kp)(kφ)

.

This equation is illustrated in Figure 3.18. The second input will be approximately

+

LθΩ

L

(1− g(X)−1)x+ g(X)−1f(X) + g(X)−1m(X)F + (kφ) sat (−kp)

(kφ)

k (q+ρ)(q2+2λq+λ2)

k(q2+2λq+λ2)

F (q)

Figure 3.18: Inputs affecting F (q)

Page 49: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 42

equal to zero since (−kp) is varying so as to cancel out the affects of the other terms7.Hence

F (q) ≈W (q)LθΩ. (3.53)

Let W (q) have a state-space representation of the form

[A bcT 0

]where A is Hurwitz.

Then equation (3.53) gives

σ = Aσ + bθΩ

(3.54)

F = cTσ (3.55)

where σ is the state vector.

Since W (q) is strictly positive real whenever ρ < 2λ (By Lemma 3.3.1), then by theKalman-Yakubovich-Popov lemma [25] we have

∃ P = P T > 0, Q = QT > 0 : ATP + PA = −Q (3.56)

bTP = cT . (3.57)

Choose a Lyapunov candidate function,

V = σTPσ +θ2

γ.

Then V = σTPσ + σTP σ + 2θ˙θ

γ

(3.54)⇒ V =[Aσ + bθΩ

]TPσ + σTP

[Aσ + bθΩ

]+ 2θ

˙θ

γ

∴ V = σT(ATP + PA

)σ + θΩbTPσ + σTPbθΩ+ 2θ

˙θ

γ

(3.56)⇒ V = − σTQσ + 2θΩbTPσ + 2θ˙θ

γ

(3.57) & (3.55)⇒ V = − σTQσ + 2θ

[ΩF +

˙θ

γ

](3.50)⇒ V = − σTQσ ≤ 0.

Now V ≡ 0 ⇔ σ ≡ 0 ⇒ σ = 0. So by equation (3.55) we have F = 0 (i.e. F → 0 ast→∞); and by equation (3.54) we have 0 = bθΩ⇒ θ = 0 (i.e. θ → θ as t→∞).

2

7This can be seen, after some algebra, by eliminating u from equations (3.19) and (3.35).

Page 50: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 43

In summary, for both the contact and non-contact phases, apply:

u = xd − 2λ ˙x− λ2x−(V (X)−1λΦ

)sat

s

Φ, (3.58)

with

x = x− xd, xd = xr − α, (3.59)

Φ + λΦ = V (X)(V (X)− 1)∣∣xd − 2λ ˙x− λ2x

∣∣+ V (X)2(η + U(X) +W (X) |F |) when Φ ≥ 0

Φ + V (X)−2λΦ = (1− V (X)−1)∣∣xd − 2λ ˙x− λ2x

∣∣+ (η + U(X) +W (X) |F |) when Φ < 0

, (3.60)

φ+ (kφ) = η + U(X) +W (X) |F |+ (V (X)− 1) |u| , (3.61)

¨α + 2λ ˙α+ λ2α =

[θΩ +

˙θΩ]

+ (xr + 2λxr + λ2xr)−(V (X)−1λΦ

)sat

s

Φ

− (kφ) sat(−kp)(kφ)

Lξ,ωnµ (xr, xr),

(3.62)

˙Ω + ρΩ = Ω, 0 <ρ < 2λ, Ω = λ2Fd, (3.63)

˙θ = −γΩF , γ > 0, k =

1

θ, (3.64)

s = ˙x+ 2λx+ λ2

∫ t

0

x dT − ˙x(0)− 2λx(0), (3.65)

(−kp) = ˙F + 2λF + λ2

∫ t

0

F dT − ˙F (0)− 2λF (0). (3.66)

The same modifications as described on page 24 should be performed on equation (3.66)above. Recall that adaptation is only sensible when the system is in contact with theenvironment and is in force control. Thus switch on equations (3.63) and (3.64) onlyin this situation.

3.3.2 Simulation Results

The above controller was simulated using Simulink 2.0 and the following results wereobtained. Most of the graphs in this section have the same interpretation as in theprevious sections.

Figure 3.19 again shows the reference trajectory and the controlled output positionunder several different situations. The effects of adaptation can be clearly seen onFigures 3.20(c) to 3.20(f) and Figure 3.21(c). Furthermore, the adaptation of k isshown in Figure 3.22(a) and its time-varying gain Ω is given in Figure 3.22(b). A point

Page 51: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 44

which needs to be made here is that γ was chosen small enough so that adaptation isslow when compared to the normal system dynamics. This was required to ensure twodifferent time-scales in design [6]. That is, to ensure that the controller can be firstdesigned by assuming that k is completely known and then relaxing this assumptionby adaptively estimating k for that controller.

Page 52: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 45

0 5 10 15 20 25 30 35 40−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time [s]

A

C D

x

xr

xan

dxr

[m]

(a) Position trajectories

0 5 10 15 20 25 30 35 40

−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1

Time [s]

B

x

xr

xan

dxr

[ms−

1]

(b) Velocity trajectories

9 9.5 10 10.5 11 11.5 12 12.5

−4

−3

−2

−1

0

1

2

3

4

x 10−5

Time [s]

A

(x−xr)

[m]

(c) Trajectory control position-error

9 9.5 10 10.5 11 11.5 12 12.5

−3

−2

−1

0

1

2

3

x 10−4

Time [s]

B

(x−xr)

[ms−

1]

(d) Trajectory control velocity-error

2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95−0.035

−0.03

−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

Time [s]

C

xxr

xan

dxr

[m]

(e) Just before hitting environment

7.9 7.95 8 8.05 8.1 8.15 8.2 8.25−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

Time [s]

D

x xr

xan

dxr

[m]

(f) Just after leaving environment

Figure 3.19: Simulation Results

Page 53: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 46

0 5 10 15 20 25 30 35 40−0.05

0

0.05

0.1

0.15

0.2

0.25

0.3

0.35

0.4

0.45

Time [s]

α[m

]

(a) Internal force-control signal

0 5 10 15 20 25 30 35 40−0.45

−0.4

−0.35

−0.3

−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

Time [s]

xd

[m]

(b) Desired position

0 5 10 15 20 25 30 35 400.1

0.12

0.14

0.16

0.18

0.2

0.22

Time [s]

Φ[m

s−1]

(c) Position boundary layer thickness

0 5 10 15 20 25 30 35 402

2.5

3

3.5

4

4.5

5

Time [s]

[Ns−

1]

(d) Force boundary layer thickness

0 5 10 15 20 25 30 35 40−0.02

−0.015

−0.01

−0.005

0

0.005

0.01

Time [s]

s[m

s−1]

(e) Algebraic measure of perturbations

0 5 10 15 20 25 30 35 40−0.25

−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

Time [s]

−kp

[Ns−

1]

(f) Algebraic measure of perturbations

Figure 3.20: Simulation Results

Page 54: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 47

0 5 10 15 20 25 30 35 40−12

−10

−8

−6

−4

−2

0

2

4

6

Time [s]

E

u[m

s−2]

(a) Control input

34.6 34.8 35 35.2 35.4 35.6 35.8−0.5

−0.4

−0.3

−0.2

−0.1

0

0.1

0.2

0.3

0.4

0.5

Time [s]

E

u[m

s−2]

(b) Control input at moment of impact

0 5 10 15 20 25 30 35 40−12

−10

−8

−6

−4

−2

0

2

Time [s]

F

Fd

Fan

dFd

[N]

(c) Reaction force

−1−0.5

00.5

1

−2−1

01

20.9

0.95

1

1.05

1.1

1.15

x [m]x [ms−1]

g(X

)Model Uncertainty: g(X)

(d) Model uncertainty

−1−0.5

00.5

1

−2−1

01

2−0.4

−0.2

0

0.2

0.4

0.6

x [m]x [ms−1]

f(X

)[m

s−2]

Model Uncertainty: f(X)

(e) Model uncertainty

−1−0.5

00.5

1

−2−1

01

2−0.2

−0.1

0

0.1

0.2

x [m]x [ms−1]

m(X

)[K

g−1]

Model Uncertainty: m(X)

(f) Model uncertainty

Figure 3.21: Simulation Results

Page 55: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

3.3 Unknown Environment Stiffness and Complete Dynamics 48

0 5 10 15 20 25 30 35 400

2

4

6

8

10

12x 10

7

Time [s]

Ad

apta

tion

:k

[Nm−

1]

(a) Environment stiffness adaptation

0 5 10 15 20 25 30 35 40−300

−250

−200

−150

−100

−50

0

50

Time [s]

Ω[N

s−1]

(b) Adaptation time-varying gain

0 5 10 15 20 25 30 35 40−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time [s]

Gat

eS

ign

als

(c) Gating functions

Figure 3.22: Simulation Results

Page 56: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 4

Controller Design: General Case

In this chapter, we are concerned with designing a multivariable controller for themultiple-input multiple-output (MIMO) system described by equation (2.7). Conse-quently, the results obtained in Chapter 3 are generalised here. Since the derivations inthe last chapter can be easily generalised to the multivariable case with some more in-volved algebra and a more cumbersome suffix notation, the detailed synthesis is omittedhere. Only the resulting controllers will be stated and an intuitive justification given.However, the full derivations are given in Appendix A for completeness. This chapteris divided into three sections. In the first section, the environment stiffness k is againassumed to be completely known so as to design a sliding-mode controller for the multi-variable system. This assumption is relaxed in section 4.2 where k is estimated throughan adaptive algorithm. Simulation results for the complete multivariable controller aregiven in the final section.

4.1 Known Environment Stiffness

Consider the MIMO system with dynamics:

x = G(X)u+ f(X) +M(X)F, (4.1)

where x, u, F ∈ Rn, X = (x, x) ∈ Rn×2, f : Rn×2 → Rn and G,M : Rn×2 → Rn×n. Letthe components of f(X) be denoted by f(X)i and the elements of G(X) and M(X)be g(X)ij and m(X)ij respectively.

The definition of all variables and functions in this section is an obvious extension tothe multivariable case of the definition given in Sections 3.1.1 and 3.2.1 for the single-variable case. Throughout the rest of this chapter let i, j = 1 . . . n.

Here

Fi =

−kxi if xi ≥ 0

0 otherwise

49

Page 57: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.1 Known Environment Stiffness 50

and the nominal functions are chosen as:

G(X) = I ⇒ g(X)ii = 1 and g(X)ij

∣∣∣j 6=i

= 0,

f(X) = 0 ⇒ f(X)i = 0,

M(X) = 0 ⇒ m(X)ij = 0.

Expressing equation (4.1) in component form we get

xi =∑j

[g(X)ijuj] + f(X)i +∑j

[m(X)ijFj ]

⇒ xi = g(X)iiui +

f(X)i +

∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi. (4.2)

The uncertain matrix functions f(X), M(X) and G(X) are bounded component-wiseby the matrix functions U : Rn×2 → Rn, W : Rn×2 → Rn×n and V : Rn×2 → Rn×nrespectively as follows:

V (X)−1ii ≤

g(X)iig(X)ii

≤ V (X)ii,

[j 6= i] |g(X)ij − g(X)ij| ≤ V (X)ij ,∣∣∣f(X)i − f(X)i

∣∣∣ ≤ U(X)i,

|m(X)ij − m(X)ij| ≤W (X)ij;

where U(X)i are the components of U(X) and W (X)ij and V (X)ij are the elementsof W (X) and V (X) respectively. Here we are assuming that g(X)ii > 01. Note thatV (X)ii ≥ 1, for if it were < 1, then V (X)−1

ii > V (X)ii which is not sensible.

A complete derivation, using sliding-mode control theory, for the multivariable sys-tem of equation (4.1) is detailed in Appendix A.1. It is essentially a straight-forwardgeneralisation of the derivation in Section 3.2.1. Here we only state the resulting con-troller which can be easily justified by comparing equation (4.2) with equation (3.19)in Section 3.2.1. From this comparison, the following analogies are noticed:

In Section 3.2.1 In this Sectionx xiu uiF Fi

g(X) g(X)iif(X) f(X)i +

∑j 6=i[g(X)ijuj +m(X)ijFj

]m(X) m(X)ii

V (X) V (X)iiU(X) U(X)i +

∑j 6=i[V (X)ij |uj |+W (X)ij |Fj |

]W (X) W (X)ii

1This assumption is very mild. It only means that ui contributes to xi with known sign.

Page 58: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.2 Unknown Environment Stiffness 51

It is interesting to note that the summation terms appearing in the multivariable caseare due to cross-coupling between the individual sub-systems. This cross-coupling iscaused by non-zero off-diagonal terms in the uncertain matrix functions G(X) andM(X).

Using this table and equations (3.37) to (3.43) in section 3.2.1, one can see that themultivariable controller, for the dynamical system of equation (4.1), is given by:

ui = xdi − 2λ ˙xi − λ2xi −(V (X)−1

ii λΦi

)sat

siΦi, (4.3)

with

xi = xi − xdi , xdi = xri − αi, (4.4)

Φi + λΦi = V (X)ii(V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)2ii

(η + U(X)i

+∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|

)if Φi ≥ 0

Φi + V (X)−2ii λΦi = (1− V (X)−1

ii )∣∣xdi − 2λ ˙xi − λ2xi

∣∣+(η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi|

)if Φi < 0

, (4.5)

φi + (kφi) = η + U(X)i +∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|+ (V (X)ii − 1) |ui| ,

(4.6)

αi + 2λαi + λ2αi =λ2Fdk

+ (xri + 2λxri + λ2xri)−(V (X)−1

ii λΦi

)sat

siΦi

− (kφi) sat(−kpi)(kφi)

Lξ,ωnµ (xri , xri),

(4.7)

si = ˙xi + 2λxi + λ2

∫ t

0xi dT − ˙xi(0)− 2λxi(0), (4.8)

(−kpi) = ˙F i + 2λFi + λ2

∫ t

0Fi dT − ˙F i(0)− 2λFi(0). (4.9)

Again, equation (4.9) should be modified as described on page 24.

4.2 Unknown Environment Stiffness

In the preceding section, we again assumed that the environment stiffness k was com-pletely known. This assumption is removed here. A detailed derivation will not be givenin this section since it is essentially a straight-forward generalisation of the derivationgiven in Section 3.3.1. However, the complete proof is detailed in Appendix A.2 forcompleteness.

Page 59: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.2 Unknown Environment Stiffness 52

Using the insight gained from sections 3.3.1 and 4.1, one can immediately see that thecomplete multivariable controller, for the dynamical system described by equation (4.1)with unknown environment stiffness k, is given by2:

ui = xdi − 2λ ˙xi − λ2xi −(V (X)−1

ii λΦi

)sat

siΦi, (4.10)

with

xi = xi − xdi , xdi = xri − αi, (4.11)

Φi + λΦi = V (X)ii(V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)2ii

(η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi|

)if Φi ≥ 0

Φi + V (X)−2ii λΦi = (1− V (X)−1

ii )∣∣xdi − 2λ ˙xi − λ2xi

∣∣+(η + U(X)i

+∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|

)if Φi < 0

, (4.12)

φi + (kφi) = η + U(X)i +∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|+ (V (X)ii − 1) |ui| ,

(4.13)

¨αi + 2λ ˙αi + λ2αi =[θΩ + ˙

θΩi

]+ (xri + 2λxri + λ2xri)−

(V (X)−1

ii λΦi

)sat

siΦi

− (kφi) sat(−kpi)(kφi)

Lξ,ωnµ (xri , xri),

(4.14)

˙Ωi + ρΩi = Ω, 0 <ρ < 2λ, Ω = λ2Fd, (4.15)

˙θ = −γΩiFi, γ > 0, k =

1

θ, (4.16)

si = ˙xi + 2λxi + λ2

∫ t

0xi dT − ˙xi(0)− 2λxi(0), (4.17)

(−kpi) = ˙F i + 2λFi + λ2

∫ t

0Fi dT − ˙F i(0)− 2λFi(0). (4.18)

The same modifications as described on page 24 should be performed on equation (4.18)above. Recall that adaptation is only sensible when the system is in contact with theenvironment and is in force control. Thus switch on equations (4.15) and (4.16) onlyin this situation. Note that since k is taken as the same for all i, we only have oneadaptation law.

2This follows by comparing equations (3.58) to (3.66) in Section 3.3.1 and equations (4.3) to (4.9)in Section 4.1.

Page 60: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 53

4.3 Simulation Results

The above controller was simulated using Simulink 2.0 and the following results wereobtained. Each figure is divided into two sub-plots—the first one showing the compo-nent of the variable parallel to the x1-axis and the second one showing the componentof the variable parallel to the x2-axis.

The reference position and the controlled-output position are shown in Figure 4.1(a)and their corresponding velocities given in Figure 4.1(b). The position and velocitytrajectory-tracking errors are depicted in Figures 4.1(c) and 4.1(d). Note that theposition trajectory-tracking error is of the order of 10−4m. A magnification of thecontrolled-output position just before hitting the environment and just after leavingthe environment is given in Figures 4.1(e) and 4.1(f) respectively.

The trajectory and force-control boundary layer thicknesses are illustrated in Fig-ures 4.2(a) and 4.2(b). These figures also show the cross-coupling between the two indi-vidual sub-systems due to non-zero off-diagonal terms in the uncertain matrix functionsG(X) and M(X). Note also that Φi and (kφi) vary with the level of uncertainty inour model. The higher the uncertainty, the greater the boundary layer thickness. Thecorresponding variables si and (−kpi) are shown in Figures 4.2(c) and 4.2(d). Theyare a measure of the perturbation between our nominal model and the actual physicalsystem. Hence they vary in such a way as to provide extra control effort to keep thestate-trajectory inside the sliding region (i.e. they try to compensate against the effectsof the uncertainty). The adaptation of k is given in Figure 4.2(e) and its time-varyinggains are shown in Figure 4.2(f). Note that k converges to k in about 25 seconds.

The internal force-control signal αi(t) is shown in Figure 4.3(a) and the controlinput ui is illustrated in Figure 4.3(b). Note that due to the cross-coupling terms,each control input is affected by the other control input. The desired trajectory xdi(t)is given in Figure 4.3(c) together with its magnification during force control in Fig-ure 4.3(d). The reaction forces exerted by the environment on the end-effector areshown in Figure 4.3(e) and a magnification of the error between the actual force andthe desired contact force is given in Figure 4.3(f). It is worth noting that the overshootin force is less than 0.5%. It is also interesting to analyse the cause of the variationsfrom the nominal curves in Figures 4.3(d) and 4.3(f). From these figures, it can beseen that if model uncertainty or disturbances cause the force to “increase negatively”more than the nominal curve (i.e. pushing more than necessary into the environment),then xd will vary (due to a variation in α) so as to pull the manipulator from pushingfurther into the environment (i.e. xd goes negative). If on the other hand, disturbancesor model uncertainty cause the manipulator to push less than desired on the environ-ment (i.e. F starts increasing), then xd will vary (due to a variation in α) so as tomake the manipulator push more into the environment (i.e. xd goes largely positive tocounteract this uncertainty).

The gating signals are depicted in Figure 4.4(a). Figure 4.4(b) shows portraits ofthe reference and controlled-output position and velocity trajectories. The environ-ment is placed at x1 = 0 and x2 = 0. It can be clearly seen that the end-effectorfollows the trajectory when unconstrained and stays at the surface of the environment(regulating the force) when the reference trajectory goes inside the environment. Itfollows force control in the constrained direction and maintains trajectory control in

Page 61: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 54

the unconstrained direction.Figure 4.5(a) shows the behaviour of the end-effector just before hitting the envi-

ronment whilst Figure 4.5(b) shows its behaviour just after leaving the environmentand shows also the initial condition.

Figure 4.6 shows the uncertainty terms f1(X) and f2(X). Since X = (x, x) ∈ R2×2,then internal dummy functions z1 and z2 had to be used to create the functions f1(X)and f2(X). The model uncertainty for M(X) is shown in Figure 4.7 while that forG(X) is shown in Figure 4.8.

Page 62: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 55

0 5 10 15 20 25 30 35 40−0.6

−0.4

−0.2

0

0.2

0.4

0 5 10 15 20 25 30 35 40−0.6

−0.4

−0.2

0

0.2

0.4

Time [s]

Time [s]

A1

A2

C1

C2

D1

D2

x1

xr1

x2

xr2

x1

andxr 1

[m]

x2

andxr 2

[m]

(a) Position trajectories

0 5 10 15 20 25 30 35 40−1

−0.5

0

0.5

1

0 5 10 15 20 25 30 35 40−1

−0.5

0

0.5

1

Time [s]

Time [s]

B1

B2

x1

xr1

x2

xr2

x1

andxr 1

[ms−

1]

x2

andxr 2

[ms−

1]

(b) Velocity trajectories

9 9.5 10 10.5 11 11.5 12 12.5−2

−1

0

1

2x 10

−4

12 12.5 13 13.5 14 14.5 15 15.5−1.5

−1

−0.5

0

0.5

1

x 10−4

Time [s]

Time [s]

A1

A2

(x1−xr 1

)[m

](x

2−xr 2

)[m

]

(c) Trajectory control position-errors

9 9.5 10 10.5 11 11.5 12 12.5−6

−4

−2

0

2

4

6x 10

−3

12 12.5 13 13.5 14 14.5 15 15.5−4

−2

0

2

x 10−3

Time [s]

Time [s]

B1

B2

(x1−xr 1

)[m

s−1]

(x2−xr 2

)[m

s−1]

(d) Trajectory control velocity-errors

2.6 2.65 2.7 2.75 2.8 2.85 2.9 2.95−0.04

−0.03

−0.02

−0.01

0

0.01

5.35 5.4 5.45 5.5 5.55 5.6 5.65 5.7−0.04

−0.03

−0.02

−0.01

0

0.01

Time [s]

Time [s]

C1

C2

x1xr1

x2xr2

x1

andxr 1

[m]

x2

andxr 2

[m]

(e) Just before hitting environment

8 8.1 8.2 8.3 8.4 8.5−0.06

−0.04

−0.02

0

0.02

10.8 10.9 11 11.1 11.2−0.06

−0.04

−0.02

0

0.02

Time [s]

Time [s]

D1

D2

x1 xr1

x2 xr2

x1

andxr 1

[m]

x2

andxr 2

[m]

(f) Just after leaving environment

Figure 4.1: Simulation Results

Page 63: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 56

0 5 10 15 20 25 30 35 400.1

0.15

0.2

0.25

0.3

0.35

0 5 10 15 20 25 30 35 400.1

0.15

0.2

0.25

0.3

0.35

Time [s]

Time [s]

Φ1

[ms−

1]

Φ2

[ms−

1]

(a) Position boundary layer thicknesses

0 5 10 15 20 25 30 35 402

3

4

5

6

0 5 10 15 20 25 30 35 402

3

4

5

6

Time [s]

Time [s]

1[N

s−1]

2[N

s−1]

(b) Force boundary layer thicknesses

0 5 10 15 20 25 30 35 40−0.05

−0.04

−0.03

−0.02

−0.01

0

0 5 10 15 20 25 30 35 40−0.1

−0.08

−0.06

−0.04

−0.02

0

Time [s]

Time [s]

s 1[m

s−1]

s 2[m

s−1]

(c) Algebraic measure of perturbations

0 5 10 15 20 25 30 35 40−0.5

0

0.5

1

1.5

0 5 10 15 20 25 30 35 40−1

0

1

2

Time [s]

Time [s]

−kp 1

[Ns−

1]

−kp 2

[Ns−

1]

(d) Algebraic measure of perturbations

0 5 10 15 20 25 30 35 400

1

2

3

4

5

6

7

8

9

10

11x 10

7

Time [s]

Ad

apta

tion

:k

[Nm−

1]

(e) Environment stiffness adaptation

0 5 10 15 20 25 30 35 40

−300

−200

−100

0

0 5 10 15 20 25 30 35 40

−300

−200

−100

0

Time [s]

Time [s]

Ω1

[Ns−

1]

Ω2

[Ns−

1]

(f) Adaptation time-varying gains

Figure 4.2: Simulation Results

Page 64: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 57

0 5 10 15 20 25 30 35 40−0.1

0

0.1

0.2

0.3

0.4

0 5 10 15 20 25 30 35 40−0.1

0

0.1

0.2

0.3

0.4

Time [s]

Time [s]

α1

[m]

α2

[m]

(a) Internal force-control signals

0 5 10 15 20 25 30 35 40−10

−5

0

5

0 5 10 15 20 25 30 35 40−10

−5

0

5

Time [s]

Time [s]

u1

[ms−

2]

u2

[ms−

2]

(b) Control inputs

0 5 10 15 20 25 30 35 40−0.6

−0.4

−0.2

0

0.2

0 5 10 15 20 25 30 35 40−0.6

−0.4

−0.2

0

0.2

Time [s]

Time [s]

E1

E2

xd

1[m

]xd

2[m

]

(c) Desired trajectories

25.5 26 26.5 27 27.5 28 28.5 29 29.5 30−2

0

2

4

x 10−4

28.5 29 29.5 30 30.5 31 31.5 32 32.5 33

−5

0

5

x 10−4

Time [s]

Time [s]

E1

E2

xd

1[m

]xd

2[m

]

(d) Desired traj. magnification

0 5 10 15 20 25 30 35 40

−10

−5

0

0 5 10 15 20 25 30 35 40

−10

−5

0

Time [s]

Time [s]

G1

G2

F1

Fd1

F2Fd2

F1

andFd

1[N

]F

2an

dFd

2[N

]

(e) Reaction forces

25.5 26 26.5 27 27.5 28 28.5 29 29.5 30−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

28.5 29 29.5 30 30.5 31 31.5 32 32.5 33−0.03

−0.02

−0.01

0

0.01

Time [s]

Time [s]

G1

G2

F1

[N]

F2

[N]

(f) Magnification of reaction forces

Figure 4.3: Simulation Results

Page 65: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 58

0 5 10 15 20 25 30 35 40−0.2

0

0.2

0.4

0.6

0.8

1

1.2

0 5 10 15 20 25 30 35 40−0.2

0

0.2

0.4

0.6

0.8

1

1.2

Time [s]

Time [s]

Gat

eS

ign

als 1

Gat

eS

ign

als 2

(a) Gating functions

−0.5 −0.4 −0.3 −0.2 −0.1 0 0.1 0.2 0.3 0.4 0.5

−0.4

−0.2

0

0.2

0.4

0.6Position Trajectory

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.5

0

0.5

1Velocity Trajectory

H

I x

xr

x

xr

x1 [m]

x2

[m]

x1 [ms−1]

x2

[ms−

1]

(b) Position and velocity trajectory portraits

Figure 4.4: Simulation Results

Page 66: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 59

−0.01 −0.008 −0.006 −0.004 −0.002 0 0.002 0.004 0.006 0.008 0.01−0.42

−0.4

−0.38

−0.36

−0.34

−0.32

−0.3Position Trajectory

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.5

0

0.5

1Velocity Trajectory

x

xr

x

xr

x1 [m]

x2

[m]

x1 [ms−1]

x2

[ms−

1]

(a) Just before hitting environment, H

−0.405 −0.4 −0.395 −0.39 −0.385 −0.38 −0.375

−0.15

−0.1

−0.05

0

Position Trajectory

−1 −0.8 −0.6 −0.4 −0.2 0 0.2 0.4 0.6 0.8 1−1

−0.5

0

0.5

1Velocity Trajectory

x

xr

x

xr

Initial Condition

x1 [m]

x2

[m]

x1 [ms−1]

x2

[ms−

1]

(b) Just after leaving environment and initial condition, I

Figure 4.5: Simulation Results

Page 67: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 60

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.5

0

0.5

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.5

0

0.5

x1 [m] x2 [m]x1 [ms−1] x2 [ms−1]

z1(x1, x1)z1(x1, x1)

z 1(x

1,x

1)

z2(x2, x2)z2(x2, x2)

z 2(x

2,x

2)

f1(X

)

f2(X

)

Internal Function: z1(x1, x1) Internal Function: z2(x2, x2)

f1(X) = f1(z1(x1, x1), z2(x2, x2)) f2(X) = f2(z1(x1, x1), z2(x2, x2))

Figure 4.6: Model uncertainty

Page 68: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 61

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.2

−0.15

−0.1

−0.05

0

0.05

0.1

0.15

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.1

−0.05

0

0.05

0.1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.1

−0.05

0

0.05

0.1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.15

−0.1

−0.05

0

0.05

0.1

0.15

0.2

x1 [m] x2 [m]x1 [ms−1] x2 [ms−1]

z3(x1, x1)z3(x1, x1)

z3(x1, x1)z3(x1, x1)

z 3(x

1,x

1)

z4(x2, x2)z4(x2, x2)

z4(x2, x2)z4(x2, x2)

z 4(x

2,x

2)

m11(X

)

m12(X

)

m21(X

)

m22(X

)

Internal Function: z3(x1, x1) Internal Function: z4(x2, x2)

m11(X) = m11(z3(x1, x1), z4(x2, x2)) m12(X) = m12(z3(x1, x1), z4(x2, x2))

m21(X) = m21(z3(x1, x1), z4(x2, x2)) m22(X) = m22(z3(x1, x1), z4(x2, x2))

Figure 4.7: Model uncertainty

Page 69: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

4.3 Simulation Results 62

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−2

−1

0

1

2−1

−0.5

0

0.5

1

−1−0.5

00.5

1

−1

−0.5

0

0.5

10.9

0.95

1

1.05

1.1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.1

−0.05

0

0.05

0.1

−1−0.5

00.5

1

−1

−0.5

0

0.5

1−0.1

−0.05

0

0.05

0.1

−1−0.5

00.5

1

−1

−0.5

0

0.5

10.9

0.95

1

1.05

1.1

x1 [m] x2 [m]x1 [ms−1] x2 [ms−1]

z5(x1, x1)z5(x1, x1)

z5(x1, x1)z5(x1, x1)

z 5(x

1,x

1)

z6(x2, x2)z6(x2, x2)

z6(x2, x2)z6(x2, x2)

z 6(x

2,x

2)

g11(X

)

g12(X

)

g21(X

)

g22(X

)

Internal Function: z5(x1, x1) Internal Function: z6(x2, x2)

g11(X) = g11(z5(x1, x1), z6(x2, x2)) g12(X) = g12(z5(x1, x1), z6(x2, x2))

g21(X) = g21(z5(x1, x1), z6(x2, x2)) g22(X) = g22(z5(x1, x1), z6(x2, x2))

Figure 4.8: Model uncertainty

Page 70: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 5

Physical Implementation

The complete multivariable adaptive sliding-mode control law derived in Chapters 3and 4, and given in Section 4.2 on Page 52, was implemented on a planar 2-degreeof freedom robot arm. This chapter starts by describing the experimental setup used.The experimental results obtained are then presented, followed by a comparison ofthese results with the simulation results.

5.1 Experimental Setup

A planar 2-degree of freedom manipulator arm exhibits most of the nonlinear and cou-pling effects which are present in multi-link robots, and hence was considered suitableto test the effectiveness of the controller. The arm used in the experiments is depictedin Figure 5.1. This arm is equipped with two d.c. motors, one at each joint. Link 1

Figure 5.1: Planar 2-degree of freedom manipulator arm

is 300mm long and weighs 484g. Link 2 is 270mm long and weighs 260g. At eachjoint, there is a potentiometer and a tacho-generator which measure the link angular

63

Page 71: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.1 Experimental Setup 64

position and velocity respectively. The d.c. motors are driven from two power amplifier(not shown). Since our compliant motion control task demands that the end-effectorcomes in contact with a rigid surface, an environment had to be constructed. This en-vironment was made out of perspex and strain-gauges were mounted behind it to givecontact force feedback1. This is illustrated in Figure 5.2, where one can also see thestrain-gauge amplifiers at the back. The compound environment stiffness is unknown

Figure 5.2: Environment

(and need not be known since the adaptive algorithm estimates it) but is of the order of104 N/m. The interaction of the robot end-effector with the environment is illustratedin Figure 5.3. The control law was coded in Borland Pascal 7 (the program is listed in

Figure 5.3: End-effector and environment

Appendix D) and was run on a 486 PC with 120MHz CPU clock speed. The samplingrate was 250Hz—much more than is actually required. The entire configuration usedin the experiments is shown in Figure 5.4.

1The force sensor was mounted behind the environment rather than on the end-effector due to easeof construction.

Page 72: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.2 Experimental Results 65

Figure 5.4: Entire configuration

5.2 Experimental Results

The experimental results are shown in Figures 5.5 and 5.6. For simplicity, the nominalmodel used to describe the robot dynamics was chosen to be a lumped model. Thatis, the link mass was assumed to be concentrated at the end—hence the centre ofgravity of the link is also at the end and the moment of inertia about this point iszero. In reality, the link mass is distributed—thus giving a centre of gravity which isnot exactly at the end of the link and a moment of inertia about this point which isnon-zero. The results in this section show that even with such a large model mismatch,the manipulator is controlled to an acceptable level of performance.

The notation in this section is consistent with the notation in the preceding chapters.Let the suffix i = 1, 2. Then xri and xi denote the end-effector reference position andend-effector actual position respectively, read with respect to the compliance frame.The joint angular positions are denoted by qi. Also, τi denote the joint torques exertedby the d.c. motors on their respective links, and ui represent the control inputs to the‘new plant’ described in Section 2.3 and illustrated in Figure 2.3. F1 is the reactionforce exerted by the environment on the robot end-effector. Finally, Figure 5.6(f) showsthe motion traced by the end-effector while moving in the x1-x2 plane.

Page 73: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.2 Experimental Results 66

0 5 10 15 20 25−0.08

−0.06

−0.04

−0.02

0

0.02

0.04

0.06

0.08

Time [s]

xr 1

[m]

(a) End-effector reference position 1

0 5 10 15 20 25−0.3

−0.28

−0.26

−0.24

−0.22

−0.2

−0.18

−0.16

−0.14

Time [s]

xr 2

[m]

(b) End-effector reference position 2

0 5 10 15 20 25−0.08

−0.07

−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

0.01

Time [s]

x1

[m]

(c) End-effector actual position 1

0 5 10 15 20 25−0.3

−0.28

−0.26

−0.24

−0.22

−0.2

−0.18

−0.16

−0.14

−0.12

Time [s]

x2

[m]

(d) End-effector actual position 2

0 5 10 15 20 250.8

0.9

1

1.1

1.2

1.3

1.4

1.5

Time [s]

q 1[r

ad]

(e) Joint angular position 1

0 5 10 15 20 25

0.7

0.8

0.9

1

1.1

1.2

1.3

1.4

Time [s]

q 2[r

ad]

(f) Joint angular position 2

Figure 5.5: Experimental Results

Page 74: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.2 Experimental Results 67

0 5 10 15 20 25−10

−5

0

5

10

15

Time [s]

u1

[ms−

2]

(a) Internal control input 1

0 5 10 15 20 25−25

−20

−15

−10

−5

0

5

10

15

20

Time [s]

u2

[ms−

2]

(b) Internal control input 2

0 5 10 15 20 25−5

−4

−3

−2

−1

0

1

2

3

4

5

Time [s]

τ 1[N

m]

(c) Joint torque 1

0 5 10 15 20 25−2

−1.5

−1

−0.5

0

0.5

1

Time [s]

τ 2[N

m]

(d) Joint torque 2

0 5 10 15 20 25−4

−3

−2

−1

0

1

2

Time [s]

F1

[N]

(e) Reaction force

−0.3 −0.28 −0.26 −0.24 −0.22 −0.2 −0.18 −0.16 −0.14−0.08

−0.07

−0.06

−0.05

−0.04

−0.03

−0.02

−0.01

0

x1

[m]

x2 [m]

(f) End-effector motion in x1-x2 plane

Figure 5.6: Experimental Results

Page 75: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.3 Comparison with Simulation Results 68

5.3 Comparison with Simulation Results

In this section, we will comment on the salient differences between the experimentalresults and the simulation results. Note that the reference trajectories used in theexperiments were simple sine-waves to simplify programming. The radius of the re-sulting circular trajectory was 7cm with the environment placed on the diameter ofthis trajectory. This is depicted in Figure 5.7. Hence, we would expect the end-effector

Environment Stiffness Compliance Frame

Reference Trajectory

x1

x2

k

Figure 5.7: Compliance frame, reference trajectory and environment

to follow the semi-circle which lies outside the environment and slide along the surfacewhen the reference trajectory is tracing the remaining semi-circle which is inside theenvironment. This is shown in Figure 5.6(f). The raggedness is presumably due tostiction and lack of control action between the sampling instances.

In Figure 5.5(c), we see a “kink” in the curve as it approaches x1 = 0 (i.e. the envi-ronment). This is because the manipulator starts decreasing its end-effector velocity asit approaches the environment, so that it hits the environment with small momentum.

Something which is definitely worth pointing out is the similarity between Fig-ure 5.6(a), depicting the control input to our so-called ‘new plant’, and the correspond-ing simulation result shown in Figure 4.3(b). Here again, the large negative spikes aredue to the controller trying to decelerate the end-effector velocity as it approaches theenvironment. Figure 5.6(b) is however quite different from Figure 5.6(a) because themanipulator is simply following the reference trajectory in the x2-direction and is notchanging from trajectory control to force control and vice-versa.

Figures 5.6(c) and 5.6(d) show the corresponding joint torques τi obtained from uithrough the use of the inverse dynamics control law. These output signals are noisy dueto the noise in the force measurement and quantisation errors in the A/D conversion.

Finally, Figure 5.6(e) reveals several interesting points. The effects of adaptationare clearly seen here. Moreover, the overshoot in force caused by the end-effector hittingthe environment was reasonably large in the experiments, especially when comparedto the simulation result of Figure 4.3(e). One of the main reasons for this, is the delaybefore the controller starts reacting to the force signal. This delay is caused by threemajor sources:

• The inertia of the environment acts like a low-pass filter which stores the kineticenergy transmitted to it during impact. Since the strain-gauges are mountedbehind the environment, they only detect a force change after the environmenthas moved.

Page 76: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

5.3 Comparison with Simulation Results 69

• The inevitable delay caused by the fact that we are sampling each signal (at 4ms)and hence giving corrective control action only at these sampling instances.

• The physical delay of the electronic circuits together with the time required tocompute the control law.

Another important issue is that here the manipulator is unable to regulate the forceat the desired value of −3N. This is due to:

• unrepeatability in the strain-gauge measurements2, and

• the large discrepancy between our lumped nominal model describing the robotdynamics and the actual physical dynamics.

A final point worth mentioning is the oscillation in the force signal after the manipulatorleaves the environment. This is again caused by the fact that the force sensor is placedbehind the environment which swings slightly after the manipulator loses contact.

Consequently, the largest problems in the experiments were caused by the fact thatthe force sensor was placed behind the environment. The above experimental resultscan be thus improved by mounting the force sensor on the end-effector instead. Otherminor improvements may be obtained by speeding up the computation of the controllaw.

2A constant force of −3N was applied to the environment 20 times and the variation in forcemeasurement was up to ±10%.

Page 77: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Chapter 6

Conclusions

We conclude this thesis with a short summary of the dissertation, an outline of the con-tributions and some directions for future research which are mostly unsolved problemsthat remain open in this thesis.

6.1 Brief Summary

The problem of controlling a general n-degree of freedom non-redundant rigid manip-ulator to:

• track reference trajectories in the unconstrained directions, and to

• regulate force at a desired value in the constrained directions,

in the presence of model uncertainty and unknown environment stiffness has beenstudied. Changes in constraints were also taken into account in the design of thecontroller. A single control law, using a combination of adaptive and sliding-modecontrol techniques, was derived which satisfies the above requirements and simulationresults were presented for each design stage. The complete multivariable adaptivesliding-mode controller was implemented on a planar 2-degree of freedom manipulator.The experimental results were illustrated and a comparison with the simulation resultswas given.

6.2 Outline of Contributions

The contributions of this thesis are mainly two:

1. A single control law was derived to control the manipulator during both thetrajectory control phase and the force control phase by introducing the continuousvariable α(t) which varies depending on whether the system is in trajectory orforce control. Having a single control law is desirable because it is easier to provestability of the closed-loop system throughout the entire operational space1. Thisis preferable to designing separate controllers for the trajectory control phase

1This is especially true when an unconstrained direction becomes constrained or vice-versa.

70

Page 78: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

6.3 Future Research 71

and the force control phase, and then switching between the two controllers (orinterpolating between the two control laws) when the system changes constraints.The ‘price’ paid for using only one control law is increased controller complexity.The controller derived in this thesis is made up from 10n equations (where nis the number of degrees of freedom of the manipulator) as shown on Page 52,whereas controllers designed only for trajectory control or force control are likelyto be described by much fewer equations.

2. An adaptive observer was also derived to estimate the unknown environmentstiffness. This observer is presented in Propositions 3.3.2 and A.2.1. It is anextension of the ideas presented by Canudas de Wit and Brogliato in [10], wherethey considered a SISO linear system with no uncertain dynamics and derivedan adaptive algorithm to relax the a priori knowledge of the environment stiff-ness. This algorithm was used, in their study, in conjunction with an impedancecontroller and their synthesis was limited to the contact phase. These ideas wereextended, in this thesis, to a MIMO (hence also coupled) nonlinear system withuncertain dynamics and the control law derived here is valid during both thecontact and non-contact phases. The resulting observer structure is quite differ-ent due to the fact that sliding-mode control was used here to take care of theuncertain dynamics.

6.3 Future Research

The work presented in this dissertation represents a starting-point to solve the generalcompliant motion control problem. However, further research is required to extend thiscontroller to a more general case. Some of the areas which need further investigationare listed below.

• In this thesis, known location of the environment was assumed. This is unusualin practice and ways of relaxing this assumption need to be sought.

• Furthermore, as is usual in most papers [31,32,35,50], we have assumed known ge-ometry of the environment (a plane for simplicity). However, robots are nowadaysrequired to interact with highly unstructured environments and it is extremelyunlikely that the environment geometry would be precisely known.

• The environment was also considered to be stationary with respect to the ma-nipulator base. An attempt was made to relax this assumption and in fact thecontroller presented can be generalised quite easily to take care of known dy-namic changes in the environment. However, the general problem requires thecontroller to take care of unknown dynamic variations in the environment.

• Some tasks are accomplished better using redundant manipulators, especiallyin restricted workspace. The control law presented in this thesis assumes a non-redundant manipulator (so as to be able to use inverse kinematic transformations)and hence further work is required to generalise this controller for redundantmanipulators.

Page 79: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

6.3 Future Research 72

• Some applications require light weight robots—hence links and joints are likelyto be flexible. Further research needs to be carried out in this area, especiallywith reference to the compliant motion control problem [16].

• Collision of the end-effector with the environment also needs further investigation.In this thesis, the end-effector velocity was decelerated before collision so as to hitthe environment with small speed. But in applications demanding fast operation,collision with the unstructured environment is inevitable.

Page 80: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Appendix A

Complete Derivations for GeneralCase Controller Design

A.1 Complete Derivation for Section 4.1 Controller

Here, we again assume that the environment stiffness k is completely known. Thisassumption will be relaxed in the following section. The definition of all functions andvariables in this appendix is similar to that in Chapters 3 and 4. Throughout the restof this appendix let i, j = 1 . . . n.

As before, formally let the variables of interest be∫ txi dT and define time-varying

sliding surfaces si(t) in state-spaces Rr by the scalar equations si(X, t) = 0, where

si =

(d

dt+ λ

)r−1 ∫ t

xi dT where r = 3.

Thussi = ˙xi + 2λxi + λ2

∫ t

0

xi dT − ˙xi(0)− 2λxi(0)︸ ︷︷ ︸so that

si = 0 at t = 0

, (A.1)

giving si = ¨xi + 2λ ˙xi + λ2xi

= xi − xdi + 2λ ˙xi + λ2xi

= g(X)iiui +(f(X)i +

∑j 6=i

[g(X)ijuj +m(X)ijFj

])+m(X)iiFi − xdi + 2λ ˙xi + λ2xi.

If, as before, we choose

ui = xdi − 2λ ˙xi − λ2xi −Ψi satsiΦi

(A.2)

we get

si = (g(X)ii − 1)(xdi − 2λ ˙xi − λ2xi) + f(X)i +∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi − g(X)iiΨi sat

siΦi

.

73

Page 81: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.1 Complete Derivation for Section 4.1 Controller 74

When |si| > Φi, we want to satisfy the Lyapunov Condition:

1

2

d

dts2i = sisi ≤ (Φi − η) |si| .

That is, we want to satisfy

(g(X)ii − 1)(xdi − 2λ ˙xi − λ2xi)si + f(X)isi +∑j 6=i

[g(X)ijuj +m(X)ijFj

]si

+m(X)iiFisi − g(X)iiΨi |si| ≤ (Φi − η) |si| .

Thus we select Ψi such that(Ψi + g(X)−1

ii Φi − g(X)−1ii η)|si|

≥∣∣1− g(X)−1

ii

∣∣ ∣∣xdi − 2λ ˙xi − λ2xi∣∣ |si|+ ∣∣g(X)−1

ii

∣∣ (|f(X)i| |si|

+∑j 6=i

[|g(X)ij| |uj |+ |m(X)ij | |Fj |

]|si|+ |m(X)ii| |Fi| |si|

),

or substituting the uncertainty bounds

Ψi ≥∣∣g(X)−1

ii

∣∣ η +∣∣g(X)−1

ii − 1∣∣ ∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)ii

(U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi|

)− g(X)−1

ii Φi.

Hence Ψi must verify

Ψi ≥ (V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)ii

(η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj|

]+W (X)ii |Fi|

)− g(X)−1

ii Φi.

Consequently by choosing

Ψi =

(V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)ii(η + U(X)i

+∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|

)− V (X)−1

ii Φi

if Φi ≥ 0

(V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)ii(η + U(X)i

+∑j 6=i

[V (X)ij |uj |+W (X)ij |Fj |

]+W (X)ii |Fi|

)− V (X)iiΦi

if Φi < 0

(A.3)

we ensure Boundary Layer Attractiveness.

Page 82: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.1 Complete Derivation for Section 4.1 Controller 75

When |si| ≤ Φi, we have

si +

(g(X)iiΨi

Φi

)si = (g(X)ii − 1)(xdi − 2λ ˙xi − λ2xi)

+ f(X)i +∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi.

(A.4)

Thus let (g(X)iiΨi

Φi

)max

= λ.

Then [g(X)ii

]max

Ψi

Φi

= λ ⇒ V (X)iiΨi

Φi

= λ ⇒ Ψi = V (X)−1ii λΦi. (A.5)

This is again the Balanced Condition.

Using equations (A.3) and (A.5) we get

Φi + λΦi = V (X)ii(V (X)ii − 1)∣∣xdi − 2λ ˙xi − λ2xi

∣∣+ V (X)2ii

(η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj|

]+W (X)ii |Fi|

)if Φi ≥ 0

Φi + V (X)−2ii λΦi = (1− V (X)−1

ii )∣∣xdi − 2λ ˙xi − λ2xi

∣∣+(η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi|

)if Φi < 0

.

(A.6)

Also, from equations (A.4) and (A.5), we have

si + λsi ≈ (g(X)ii − 1)(xdi − 2λ ˙xi − λ2xi)

+ f(X)i +∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi.

(A.7)

In the above equation, the LHS ≈ RHS rather than the LHS = RHS because now thebalanced condition is, in general, not exactly achieved. Also, as before, Φi is a measureof the uncertainty in our model and si is a measure of the perturbation between ournominal model and the actual physical system.

Again, from the above synthesis we see that when αi = 0, the control inputs will makexi follow xri; hence Trajectory Control is achieved. Extending this argument, whenαi 6= 0, the control inputs will make xi follow xdi [= (xri − αi)]. Thus Force Controlcan be achieved if we vary αi(t) such that Fi remains constant at Fd when the systemis in contact with the environment.

Page 83: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.1 Complete Derivation for Section 4.1 Controller 76

We may attempt to find such an αi(t) analytically as follows:

(4.2) ⇒ xi = g(X)iiui + f(X)i +∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi.

Substituting in our control input from equation (A.2) we get

xi = g(X)ii(xdi − 2λ ˙xi − λ2xi) + f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi − g(X)iiΨi sat

siΦi.

Putting xi = g(X)iixi − (g(X)ii − 1)xi we have

g(X)ii(¨xi + 2λ ˙xi + λ2xi) = (g(X)ii − 1)xi + f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi − g(X)iiΨi sat

siΦi,

which on rearranging gives

¨xi + 2λ ˙xi + λ2xi = (1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)−Ψi sat

siΦi

.(A.8)

This equation represents the closed-loop dynamics of the system.

During contact (i.e. xi ≥ 0),

Fi = −kxi, Fi = Fi − Fd,

Fi = −kxi, ˙F i = Fi = −kxi, [Fd = const.]

Fi = −kxi, ¨F i = Fi = −kxi.

Note that only one desired contact force is specified here.

Substituting the above equations in equation (A.8) we get:

¨F i + 2λ ˙F i + λ2Fi = −λ2Fd − k

(xri + 2λxri + λ2xri)

− (αi + 2λαi + λ2αi) + (1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)−Ψi sat

siΦi

. (A.9)

For asymptotic stability of Fi, it is sufficient to choose αi(t) such that RHS ≡ 0 ∀t(during contact). However, practically this cannot be done since g(X)ij, f(X)i andm(X)ij are uncertain and xi is difficult to measure.

Page 84: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.1 Complete Derivation for Section 4.1 Controller 77

Again taking a sliding-mode approach—formally let the variables of interest be∫ t Fi−k dT

and define time-varying sliding surfaces pi(t) in state-spaces Rr by the scalar equationspi(X, t) = 0, where

pi =

(d

dt+ λ

)r−1 ∫ t Fi−k dT where r = 3.

Thus

(−kpi) = ˙F i + 2λFi + λ2

∫ t

0

Fi dT − ˙F i(0)− 2λFi(0)︸ ︷︷ ︸so that

pi = 0 at t = 0

, (A.10)

giving

pi =1

−k ( ¨F i + 2λ ˙F i + λ2Fi).

Using equation (A.9) we get

pi =λ2Fdk

+ (xri + 2λxri + λ2xri)

− (αi + 2λαi + λ2αi) + (1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)−Ψi sat

siΦi.

Then by choosing

αi + 2λαi + λ2αi =λ2Fdk

+ (xri + 2λxri + λ2xri)−Ψi satsiΦi

+ ψi satpiφi

(A.11)

we get

pi = (1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)− ψi sat

piφi.

Note that xi is difficult to measure. So using equation (4.2) we have

pi = (1− g(X)−1ii )[g(X)iiui + f(X)i +

∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

]+ g(X)−1

ii

(f(X)i +

∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)− ψi sat

piφi

in which ui is computable. Simplifying this equation we get

pi = (g(X)ii − 1)ui + f(X)i +∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi − ψi sat

piφi.

Page 85: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.1 Complete Derivation for Section 4.1 Controller 78

When |pi| > φi ⇔ |−kpi| > (kφi), we again want to satisfy the Lyapunov Condition:

1

2

d

dtp2i = pipi = (g(X)ii − 1)uipi + f(X)ipi +

∑j 6=i

[g(X)ijuj +m(X)ijFj

]pi

+m(X)iiFipi − ψi |pi| ≤ (φi − η) |pi| .

Thus we select ψi such that

(ψi + φi − η) |pi| ≥ |g(X)ii − 1| |ui| |pi|+ |f(X)i| |pi|+∑j 6=i

[|g(X)ij| |uj|+ |m(X)ij| |Fj |

]|pi|+ |m(X)ii| |Fi| |pi| ,

or substituting the uncertainty bounds

ψi ≥ η+(V (X)ii−1) |ui|+U(X)i+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi|−φi.

Hence by choosing

ψi = η + (V (X)ii − 1) |ui|+ U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj |

]+W (X)ii |Fi| − φi (A.12)

we ensure Boundary Layer Attractiveness.

When |pi| ≤ φi ⇔ |−kpi| ≤ (kφi), we have

pi +

(ψiφi

)pi = (g(X)ii − 1)ui + f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi.

(A.13)

Thus letψiφi

= k ⇒ ψi = (kφi). (A.14)

Using equations (A.12), (A.13) and (A.14) we get

φi + (kφi) = (V (X)ii − 1) |ui|+ η + U(X)i

+∑j 6=i

[V (X)ij |uj|+W (X)ij |Fj|

]+W (X)ii |Fi| (A.15)

and pi + kpi = (g(X)ii − 1)ui + f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi (A.16)

Page 86: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.2 Complete Derivation for Section 4.2 Controller 79

Once more, kφi is a measure of the uncertainty in our model and −kpi is a measure ofthe perturbation between our nominal model and the actual physical system.

Substituting equation (A.11) in (A.9) we have the following closed-loop contact dy-namics:

¨F i + 2λ ˙F i + λ2Fi = −k

(1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)− ψi sat

piφi

. (A.17)

Notice the similarity between this equation and equation (A.8).

Hence, the resulting multivariable controller for the dynamical system of equation (4.1),assuming known k, is given by equations (A.1), (A.2), (A.6), (A.10), (A.11) and (A.15)as shown on page 51.

A.2 Complete Derivation for Section 4.2 Controller

We will now relax the assumption that the environment stiffness k is known and derivean Adaptive Algorithm that will estimate it. Adaptation only makes sense when thesystem is in contact with the environment and is in force control1. During this timeLξ,ωnµ (xri, xri) = 1. [see equation (4.7)]. The derivation in this section is very similarto Section 3.3.1.

In practice k is unknown—we only have an estimate k. Now since αi(t) depends on k[see equation (4.7)], then we only have an estimate to αi(t). Denote this estimate byαi(t). If we use this estimate in our control law, then equation (4.3) becomes

ui = (xri − ¨αi)− 2λ[xi − (xri − ˙αi)

]− λ2

[xi − (xri − αi)

]−(V (X)−1

ii λΦi

)sat

siΦi

.(A.18)

Substituting (A.18) in (4.2) and using the fact that Fi = −kxi we get

Fi + 2λFi + λ2Fi = −k

(xri + 2λxri + λ2xri)

− (¨αi + 2λ ˙αi + λ2αi) + (1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)−Ψi sat

siΦi

. (A.19)

1This is because force feedback is only available during this time, and it is this force feedback whichprovides information about the actual environment stiffness.

Page 87: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.2 Complete Derivation for Section 4.2 Controller 80

Now using equation (4.7) in (A.19) we get2

¨F i + 2λ ˙F i + λ2Fi = k

(¨αi + 2λ ˙αi + λ2αi)− (1− g(X)−1

ii )xi − g(X)−1ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)− (kφi) sat

(−kpi)(kφi)

(A.20)

where αi = αi−αi. Equation (A.20) represents the closed-loop contact error dynamics.The terms on the RHS are due to the uncertainty.

Also, equation (4.7) can be parameterised as follows:

αi + 2λαi + λ2αi = θΩ + (xri + 2λxri + λ2xri)

−(V (X)−1

ii λΦi

)sat

siΦi

− (kφi) sat(−kpi)(kφi)

(A.21)

where θ = 1/k, θ = 1/k and Ω = λ2Fd. Note that k is taken to be independentof i, thus implying one adaptation law. Equation (A.21) can be used as a basis forthe design of an adaptive observer. For consistency of notation, again let the Laplacecomplex variable be denoted by q.

Proposition A.2.1 Consider the system described by equation (4.1), together with thecontrol law given by equation (A.18) and the following adaptive observer structure:

¨αi + 2λ ˙αi + λ2αi =[θΩ +

˙θΩi

]+ (xri + 2λxri + λ2xri)

−(V (X)−1

ii λΦi

)sat

siΦi

− (kφi) sat(−kpi)(kφi)

(A.22)

with

˙Ωi + ρΩi = Ω, ρ > 0, (A.23)

˙θ = −γΩiFi, γ > 0, (A.24)

W (q) = k(q + ρ)

(q + λ)2is SPR. (A.25)

Then θ → θ (i.e. k → k) and Fi → 0 as t→∞.

Proof. Subtracting equation (A.21) from equation (A.22) we get:

¨αi + 2λ ˙αi + λ2αi =θΩ +

˙θΩi − θΩ

− (kφi) sat

(−kpi)(kφi)

+ (kφi) sat(−kpi)(kφi)

.

2Recall that during contact and force control Lξ,ωnµ (xri , xri) = 1.

Page 88: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.2 Complete Derivation for Section 4.2 Controller 81

Introducing θ = θ − θ and noting that ˙θ =˙θ since θ is constant, we get:

¨αi + 2λ ˙αi + λ2αi =θΩ + ˙θΩi

− (kφi) sat

(−kpi)(kφi)

+ (kφi) sat(−kpi)(kφi)

(A.23)⇒ =θ ˙Ωi +

˙θΩi + ρθΩi

− (kφi) sat

(−kpi)(kφi)

+ (kφi) sat(−kpi)(kφi)

=

(d

dt+ ρ

)θΩi

− (kφi) sat

(−kpi)(kφi)

+ (kφi) sat(−kpi)(kφi)

. (A.26)

Using equation (A.26) in equation (A.20) we get

¨F i + 2λ ˙F i + λ2Fi = k

(d

dt+ ρ

)θΩi

− (1− g(X)−1

ii )xi − g(X)−1ii

(f(X)i

+∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)− (kφi) sat

(−kpi)(kφi)

.

Taking the Laplace Transform L we have

Fi(q) = k(q + ρ)

(q2 + 2λq + λ2)︸ ︷︷ ︸W (q)

LθΩi

− k

(q2 + 2λq + λ2)L

(1− g(X)−1ii )xi

+ g(X)−1ii

(f(X)i +

∑j 6=i

[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)+ (kφi) sat

(−kpi)(kφi)

.

This equation is illustrated in Figure A.1. The second input will be approximately

+

LθΩi

L

(1− g(X)−1ii )xi + g(X)−1

ii

(f(X)i +

∑j 6=i[g(X)ijuj +m(X)ijFj

]+m(X)iiFi

)+ (kφi) sat (−kpi)

(kφi)

k (q+ρ)(q2+2λq+λ2)

k(q2+2λq+λ2)

Fi(q)

Figure A.1: Inputs affecting Fi(q)

equal to zero since (−kpi) is varying so as to cancel out the affects of the other terms3.Hence

Fi(q) ≈W (q)LθΩi

. (A.27)

3This can be seen, after some algebra, by eliminating ui from equations (4.2) and (A.16).

Page 89: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

A.2 Complete Derivation for Section 4.2 Controller 82

Let W (q) have a state-space representation of the form

[A bcT 0

]where A is Hurwitz.

Then equation (A.27) gives

σ = Aσ + bθΩi

(A.28)

Fi = cTσ (A.29)

where σ is the state vector.

Since W (q) is strictly positive real whenever ρ < 2λ (By Lemma 3.3.1), then by theKalman-Yakubovich-Popov lemma [25] we have

∃ P = P T > 0, Q = QT > 0 : ATP + PA = −Q (A.30)

bTP = cT . (A.31)

Choose a Lyapunov candidate function,

V = σTPσ +θ2

γ.

Then V = σTPσ + σTP σ + 2θ˙θ

γ

(A.28)⇒ V =[Aσ + bθΩi

]TPσ + σTP

[Aσ + bθΩi

]+ 2θ

˙θ

γ

∴ V = σT(ATP + PA

)σ + θΩibTPσ + σTPbθΩi+ 2θ

˙θ

γ

(A.30)⇒ V = − σTQσ + 2θΩibTPσ + 2θ

˙θ

γ

(A.31) & (A.29)⇒ V = − σTQσ + 2θ

[ΩiFi +

˙θ

γ

](A.24)⇒ V = − σTQσ ≤ 0.

Now V ≡ 0 ⇔ σ ≡ 0 ⇒ σ = 0. So by equation (A.29) we have Fi = 0 (i.e. Fi → 0 ast→∞); and by equation (A.28) we have 0 = bθΩi ⇒ θ = 0 (i.e. θ → θ as t→∞).

2

Hence, the resulting Adaptive Sliding-Mode Controller is given by equations (4.10)to (4.18) on page 52 according to Proposition A.2.1.

Page 90: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Appendix B

ξ and ωn Optimisation

B.1 Optimisation Program

The following program was written in Matlab 5.0.

% This is a program written to minimise the area between the x-curve

% and x=-F_d/k. It is used so that trajectory control is maintained for

% as long as possible & force control is achieved as fast as possible.

clear;

lambda = 25;

F_d =-10;

k = 1e9;

i=0;

t=0:1e-3:0.75;

xr = (t-0.1012)-1.1510*((t-0.1012).^3)+0.5633*((t-0.1012).^5);

xr_dot = 1-3.4530*((t-0.1012).^2)+2.8165*((t-0.1012).^4);

xr_2dot= -6.9060*(t-0.1012)+11.2660*((t-0.1012).^3);

for zeta=0.3:0.01:0.9

for wn=20:0.25:35

[a,b,c,d]=tf2ss([0 0 wn^2],[1 2*zeta*wn wn^2]);

sys=ss(a,b,c,d);

[lpf_gate,t]=step(sys,t);

input_Xd = -((lambda^2)*F_d/k)*lpf_gate - (xr_2dot+2*lambda*xr_dot ...

+(lambda^2)*xr)’.*(lpf_gate-1);

[a,b,c,d]=tf2ss([0 0 1],[1 2*lambda lambda^2]);

sys=ss(a,b,c,d);

[x_d,t]=lsim(sys,input_Xd,t,[0.9649 -0.10]);

if max(x_d)<(-1.5*F_d/k)

i=i+1;

sum_answer(i)=sum(((-x_d-(F_d/k)).^2).*(t)*1000);

zeta_answer(i)=zeta;

wn_answer(i)=wn;

end;

end;

end;

figure(1); plot(zeta_answer,sum_answer); grid on;

figure(2); plot(zeta_answer,wn_answer); grid on;

[min_sum,index]=min(sum_answer)

[wn_answer(index) zeta_answer(index)]

83

Page 91: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

B.2 Optimisation Results 84

B.2 Optimisation Results

The results from the above optimisation program are illustrated below:

0.65 0.7 0.75 0.8 0.85 0.99.8

10

10.2

10.4

10.6

10.8

11

11.2

11.4

11.6

11.8

ξ

Are

aun

derxd

curv

e

Optimum Cost = 9.87 at ξ = 0.8

Figure B.1: Cost function at various ξ, with ωn as a parameter at each ξ

0.65 0.7 0.75 0.8 0.85 0.929

30

31

32

33

34

35

ξ

ωn

Optimum occurs at ωn = 29.75, ξ = 0.8

Figure B.2: Cost function in ξ-ωn plane

Page 92: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Appendix C

Simulink Block Diagrams

Only the Simulink Block Diagrams for the simulation results of Section 4.3 will begiven here. All the other previous stages can be viewed as special cases of the onebelow.

theta_hat_dotselection

reference signal2

reference signal1

t

plot

coupling dueto uncertainties

Plant

Mux

Mux

DesignParameters

Controller2

Controller1

Clock

Figure C.1: Complete closed-loop system

85

Page 93: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Simulink Block Diagrams 86

1

parameters

20

rho

1

U

reciprocalk_hat

plot15

2

neta

9.7

mu

25

lamda

1.2e−11

gamma

[0.1 0.2]

W(X)_2j

[0.2 0.1]

W(X)_1j

[0.1 1.1]

V(X)_2j

[1.1 0.1]

V(X)_1j

[0.5 0.5]

U(X)_i Mux

Mux

s

1

Integrator

−10

F_d

1

theta_hat_dot

Figure C.2: Design Parameters

1

X_r

Repeating Sequence

Mux

Mux

1/s Integrator1

1/s Integrator

Figure C.3: Reference Signals 1/2

1

theta_hat_dot

Switch

Selector

S

R

Q

S−RFlip−Flop

Heaveside

Demux

3

theta_hat_dot2

2

theta_hat_dot1

1

x, x_dot & F

Figure C.4: ˙θ selection

2

coupling due touncertainties @ i=2

1

coupling due touncertainties @ i=1

Selector

Selector

Mux

Mux

f(u)

Fcn1

f(u)

Fcn

3

x, x_dot & F

2

u

1

DesignParameters

Figure C.5: Uncertainty Coupling

1

x, x_dot & F

1e7

k

f(X)

Sum

Selector

Selector

Selector

*

Product1

Mux

Mux

M(X).F

s

1

Integrator1s

1

Integrator1

Gain

G(X).u

−Heaveside

2

u

1

parameters

Figure C.6: Plant

Page 94: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Simulink Block Diagrams 87

2

theta_hat_dot

1

u

gating signals

Selector

Selector

Measurements

Control Law

Alpha calculation& its derivatives

Adaptation

"s" measurement

"phi_s"calculation

"k_phi_p"calculation

"−kp" measurement

4

3

x, x_dot & F

2

X_r

1

DesignParameters

Coupling due to

uncertainties @ i=1 or 2

Figure C.7: Controllers 1/2

1

s

s1

plot10

Sum2

Sum1

Sum

K Select x~

K

Select lamda

K

Select2 of 3 i/ps

*

Product1

*

Product

u(0)

Latches u(0)

1/s

Integrator2 Gain

u^2

Demux

Demux

4

X_r

3

2_Alphas

2

x, x_dot & F

1

parameters

Figure C.8: s measurement

1

−kp

minus_kp1

plot12

Sum8

Sum3

Sum2

Sum

K

Select lamda

K

Select F_d

K

Select −k

K

Select2 of 3 i/ps *

Product4

*

Product3

*

Product2

*

Product1

*

Product

NOT

In Out

Latches u(to).1

In Out

Latches u(to).

s

1

Integrator

[0]

IC

2

Gain

u^2

Fcn

Demux

3

−kpgating signal

2

x, x_dot & F

1

parameters

Figure C.9: −kp measurement

Page 95: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Simulink Block Diagrams 88

2

theta_hat_dot

1

omega_bar

omega_bar1

plot16

u^2

fcn2

Sum1

Sum

K

Select rho

K

Select lamda

K

Select F_d

K

Select F

K

Select −gamma

*

Product3

*

Product2

*

Product1

*

Product

s

1

Integrator

3

adaptationgating signal

2

x, x_dot & F

1

parameters

Figure C.10: Adaptation

3

−kpgating signal

2

alphagating signal

1

adaptationgating signal

gate_sig1

plot14

TransportDelay1

TransportDelay

31^2

s +2*0.80*31s+31^22

Terminator

SumK

Select mu

K

Select F

S

R

Q

S−RFlip−Flop

*

Product2

*

Product1

*

ProductMux

Mux3

Hit Crossing1

Hit Crossing

Heaveside

Demux

Demux

3

X_r

2

parameters

1

x, x_dot & F

Figure C.11: Gating Signals

1

phi_s

u^2

u^2

square phi_s1

plot9

1/u

fcn2

1/u

fcn1

Sum4

Sum3

Sum2

Sum1Sum

K

Select x_d..

K

Select neta

K

Select lamda

K

Select W(X)

K

Select V(X)

K

Select U(X)

K

Select F

K

Select2 of 3 i/ps

*

Product6

*

Product5

*

Product4

*

Product3

*

Product2

Mux

Muxs

1

Integrator

2

Gain

f(u)

Fcn

Demux

Demux

1

Constant

|u|

Abs1

Abs

5

Coupling dueto uncertainties

4

3_Alphas

3

X_r

2

x, x_dot & F

1

parameters

Figure C.12: Φ calculation

Page 96: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Simulink Block Diagrams 89

1

k_phi_p

k_phi_p1

plot11

Sum1

Sum

K

Select neta

K

Select k

K

Select W(X)

K

Select V(X)

K

Select U(X)

K

Select F

*

Product2

*

Product1*

Product

s

1

Integrator

1

Constant

Abs1

|u|

Abs

4

Coupling dueto uncertainties

3

u

2

x, x_dot & F

1

parameters

Figure C.13: kφ calculation

2

2_Alphas

1

3_Alphas

u^2

square

1/u

reciprocal

1/u

u^2

fcn2

1/u fcn1

1/u fcn

0

To eliminatealgebraic loop

Sum1

Sum

K

Select lamda

K

Select k

K

Select V(X)

K

Select F_d

Saturation1

Saturation

*

Product9

*

Product8

*

Product7

*

Product6

*

Product5

*

Product4

*

Product3

*

Product2

*

Product10

*

Product1

*

Product

Mux

Mux1

Mux

Mux

1/s

Integrator1

1/s

Integrator

2 Gain1

2

GainDemux

Demux

9

alphagating signal

8

theta_hat_dot

7

omega_bar

6

−kp

5

k_phi_p

4

s

3

phi_s

2

X_r

1

parameters

Figure C.14: α calculation

Page 97: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Simulink Block Diagrams 90

1

u

u^2

square

u1

plot131/u fcn1

1/u fcnSum2

Sum1Sum

K

Select x_d..

K

Select lamda

K

Select V(X)

K

Select2 of 3 i/ps

Saturation

*

Product3

*

Product2

*

Product1

*

Product

2

Gain

Demux

Demux

6

s

5

phi_s

4

3_Alphas

3

X_r

2

x, x_dot & F

1

parameters

Figure C.15: Control Law

F_error1

plot8

F1

plot7

alpha1

plot6

x_d1

plot5

x_dot_error1

plot4

x_dot1

plot3

x_error1

plot2

x1

plot1

Sum3

Sum2

Sum1

Sum

K

Select x_r1

K

Select x_r dot

K

Select x_r

K

Select alpha

K

Select F_d

Mux

Mux2

Mux

Mux1

Mux

Mux

Demux

4

Design Parameters

3

Alphas

2 x, x_dot & F

1 Reference signals

Figure C.16: Measurements

Page 98: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Appendix D

Computer Program Listings

D.1 Control Program

The following program, written in Borland Pascal 7, was used to control a 2-degree offreedom manipulator arm in the presence on model uncertainty and unknown environ-ment stiffness.

Program Control;

$N+

Uses Crt, Dos, Graph, DT2801, TPTIMER;

Type rarray21 = array[1..2] of real;

rarray31 = array[0..2] of real;

rarray22 = array[1..2,1..2] of real;

rarray32 = array[0..2,1..2] of real;

rarray92 = array[1..20,1..2] of real;

Const F_d = -3; Design Parameters

lamda = 25;

neta = 2;

mu = 9.7;

rho = 10;

gamma = 1.2e-6; Design Parameters

U_x : rarray21 = ( 0.5 , 0.5 ); Uncertainty Bounding Fcns

W_x : rarray22 = (( 0.2 , 0.1 ),

( 0.1 , 0.2 ));

V_x : rarray22 = (( 1.1 , 0.1 ),

( 0.1 , 1.1 )); Uncertainty Bounding Fcns

m1 = 0.484; Robot Parameters

m2 = 0.260;

I1 = 0;

I2 = 0;

l1 = 0.30;

l2 = 0.27;

lc1 = 0.30;

lc2 = 0.27; Robot Parameters

period = 4; Periodic time for ref_sigs

amp = 0.07; Amplitude for ref_sigs

tm = 12; Display time range

TimerResolution = 1193181.667;

beta = -pi/2; from C to O anticlockwise

CO : rarray21 = (-0.532,-0.210); from C to O wrt C

91

Page 99: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 92

F_v_ratio1 = 9/1; N/V proportionality constants

q_v_ratio1 = (pi/2)/7.5; rad/V

q_dot_v_ratio1 = 5/3; rad/sV

q_v_ratio2 = (pi/2)/7.5; rad/V

q_dot_v_ratio2 = 5/3; rad/sV

v_tau_ratio1 = 10/20; V/Nm

v_tau_ratio2 = 10/5; V/Nm proportionality constants

Var q1, q2, q_dot1, q_dot2, x1, x2, x_dot1, x_dot2,

F1, F2, u1, u2,

theta_hat_dot, theta_hat_dot1, theta_hat_dot2,

tau1, tau2, t, dt, disp_time : real;

count, hr, mn, sec, csec : word;

grdriver, grmode : integer;

PreviousTimerCount, CurrentTimerCount : LongInt;

Ch : char;

Sdt : string;

coupling : rarray21;

X_r1, X_r2 : rarray31;

states : rarray92;

DataFile : text;

Function sat(a : real) : real;

Begin Saturation Function

if abs(a) <= 1 then sat := a;

if a > 1 then sat := 1;

if a < -1 then sat := -1;

End; Saturation Function

Function Heav(a : real) : byte;

Begin Heaveside Function

if a > 0 then Heav := 1

else Heav := 0;

End; Heaveside Function

Function control_law(i : byte; s, phi_s : real; X_d, X_error : rarray31) : real;

Begin control law

control_law := X_d[2]-2*lamda*X_error[1]-sqr(lamda)*X_error[0]

- (lamda*phi_s/V_x[i,i])*sat(s/phi_s);

End; control law

Function s_measurement(i : byte; dt : real; X_error : rarray31; var states : rarray92) : real;

Begin s measurement

states[12,i] := states[12,i] + X_error[0]*dt;

s_measurement := (X_error[1]-states[11,i]) + 2*lamda*(X_error[0]-states[10,i])

+ sqr(lamda)*states[12,i];

End; s measurement

Function minus_kp_measurement(i : byte; dt, x, x_dot : real; var states : rarray92) : real;

Var F_error, F_error_dot : real;

Begin -kp measurement

F_error := -x/states[1,1] - F_d;

F_error_dot := -x_dot/states[1,1];

if (states[20,i]-states[19,i]) = 1 then

Begin

states[7,i] := F_error;

Page 100: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 93

states[8,i] := F_error_dot;

states[9,i] := 0;

End;

states[9,i] := states[9,i] + F_error*states[20,i]*dt;

minus_kp_measurement := ((F_error_dot-states[8,i]) + 2*lamda*(F_error-states[7,i])

+ sqr(lamda)*states[9,i])*states[20,i];

End; -kp measurement

Function adaptation(i : byte; dt, F : real; var states : rarray92) : real;

Var F_error, omega_bar_dot : real;

Begin Adaptation

F_error := F - F_d;

if states[18,i] <> states[17,i] then states[1,2] := 0;

omega_bar_dot := (sqr(lamda)*F_d - rho*states[1,2])*states[18,i];

states[1,2] := states[1,2] + omega_bar_dot*dt;

adaptation := -gamma*states[1,2]*F_error*states[18,i]; ie: adaptation = theta_hat_dot

End; Adaptation

Procedure JointToTask(q1, q2, q_dot1, q_dot2 : real; var x1, x2, x_dot1, x_dot2 : real);

Var xo1, xo2, xo_dot1, xo_dot2 : real; wrt base co-ordinates

Begin Joint Space to Task Space Transformation

xo1 := l1*cos(q1) + l2*cos(q1+q2);

xo2 := l1*sin(q1) + l2*sin(q1+q2);

xo_dot1 := (-l1*sin(q1)-l2*sin(q1+q2))*q_dot1 + (-l2*sin(q1+q2))*q_dot2;

xo_dot2 := ( l1*cos(q1)+l2*cos(q1+q2))*q_dot1 + ( l2*cos(q1+q2))*q_dot2;

x1 := CO[1] + cos(beta)*xo1-sin(beta)*xo2;

x2 := CO[2] + sin(beta)*xo1+cos(beta)*xo2;

x_dot1 := cos(beta)*xo_dot1-sin(beta)*xo_dot2;

x_dot2 := sin(beta)*xo_dot1+cos(beta)*xo_dot2;

End; Joint Space to Task Space Transformation

Procedure u_to_tau(q1, q2, q_dot1, q_dot2, F1, F2, u1, u2 : real; var tau1, tau2 : real);

Var H, Jo, J, Jinv, R, Jo_dot, J_dot, HJinv : rarray22;

hh, Jq_dot : rarray21;

det : real;

Begin u to tau Transformation

Jo[1,1] := -l1*sin(q1)-l2*sin(q1+q2);

Jo[1,2] := -l2*sin(q1+q2);

Jo[2,1] := l1*cos(q1)+l2*cos(q1+q2);

Jo[2,2] := l2*cos(q1+q2);

Jo_dot[1,1] := -l1*cos(q1)*q_dot1-l2*cos(q1+q2)*(q_dot1+q_dot2);

Jo_dot[1,2] := -l2*cos(q1+q2)*(q_dot1+q_dot2);

Jo_dot[2,1] := -l1*sin(q1)*q_dot1-l2*sin(q1+q2)*(q_dot1+q_dot2);

Jo_dot[2,2] := -l2*sin(q1+q2)*(q_dot1+q_dot2);

R[1,1] := cos(beta);

R[1,2] := -sin(beta);

R[2,1] := sin(beta);

R[2,2] := cos(beta);

J[1,1] := R[1,1]*Jo[1,1] + R[1,2]*Jo[2,1];

J[1,2] := R[1,1]*Jo[1,2] + R[1,2]*Jo[2,2];

J[2,1] := R[2,1]*Jo[1,1] + R[2,2]*Jo[2,1];

J[2,2] := R[2,1]*Jo[1,2] + R[2,2]*Jo[2,2];

J_dot[1,1] := R[1,1]*Jo_dot[1,1] + R[1,2]*Jo_dot[2,1];

J_dot[1,2] := R[1,1]*Jo_dot[1,2] + R[1,2]*Jo_dot[2,2];

J_dot[2,1] := R[2,1]*Jo_dot[1,1] + R[2,2]*Jo_dot[2,1];

J_dot[2,2] := R[2,1]*Jo_dot[1,2] + R[2,2]*Jo_dot[2,2];

Page 101: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 94

Jq_dot[1] := J_dot[1,1]*q_dot1 + J_dot[1,2]*q_dot2;

Jq_dot[2] := J_dot[2,1]*q_dot1 + J_dot[2,2]*q_dot2;

det := J[1,1]*J[2,2] - J[1,2]*J[2,1];

Jinv[1,1] := J[2,2]*1/det;

Jinv[1,2] := -J[1,2]*1/det;

Jinv[2,1] := -J[2,1]*1/det;

Jinv[2,2] := J[1,1]*1/det;

hh[1] := -(m2*l1*lc2*sin(q2))*sqr(q_dot2) - 2*(m2*l1*lc2*sin(q2))*q_dot1*q_dot2;

hh[2] := (m2*l1*lc2*sin(q2))*sqr(q_dot1);

H[1,1] := m1*sqr(lc1) + I1 + m2*(l1*l1+lc2*lc2+2*l1*lc2*cos(q2)) + I2;

H[1,2] := m2*l1*lc2*cos(q2) + m2*lc2*lc2 + I2;

H[2,1] := H[1,2];

H[2,2] := m2*lc2*lc2 + I2;

HJinv[1,1] := H[1,1]*Jinv[1,1] + H[1,2]*Jinv[2,1];

HJinv[1,2] := H[1,1]*Jinv[1,2] + H[1,2]*Jinv[2,2];

HJinv[2,1] := H[2,1]*Jinv[1,1] + H[2,2]*Jinv[2,1];

HJinv[2,2] := H[2,1]*Jinv[1,2] + H[2,2]*Jinv[2,2];

tau1 := (HJinv[1,1]*(u1-Jq_dot[1])+HJinv[1,2]*(u2-Jq_dot[2]))+hh[1]-(J[1,1]*F1+J[2,1]*F2);

tau2 := (HJinv[2,1]*(u1-Jq_dot[1])+HJinv[2,2]*(u2-Jq_dot[2]))+hh[2]-(J[1,2]*F1+J[2,2]*F2);

End; u to tau Transformation

Procedure gating_sigs(i : byte; t, F : real; X_r : rarray31;

var states : rarray92);

Const zeta = 0.8;

wn = 31;

t1 = 0.29; delay for -kp_gate rising time

t2 = 0.02; delay for -kp_gate falling time

Var L : byte;

Begin gating signals

if (X_r[1]+mu*X_r[0]) >= 0 then L := 1 L_function

else L := 0;

if (L-states[13,i])= 1 then states[14,i] := t;

if (L-states[13,i])=-1 then states[15,i] := t;

states[13,i] := L;

states[17,i] := states[18,i];

states[18,i] := L*Heav(-F + F_d/100);

states[19,i] := states[20,i];

if ((L=1) AND ((t-states[14,i])>=t1)) then states[20,i] := 1;

if ((L=0) AND ((t-states[15,i])>=t2)) then states[20,i] := 0;

states[16,i] := L;

if ((L=1) AND (states[14,i]<5e8)) then

states[16,i] := 1-exp(-zeta*wn*(t-states[14,i]))*(cos(wn*sqrt(1-sqr(zeta))*(t-states[14,i]))

+ (zeta/sqrt(1-sqr(zeta)))*sin(wn*sqrt(1-sqr(zeta))*(t-states[14,i])));

if ((L=0) AND (states[15,i]<5e8)) then

states[16,i] := exp(-zeta*wn*(t-states[15,i]))*(cos(wn*sqrt(1-sqr(zeta))*(t-states[15,i]))

+ (zeta/sqrt(1-sqr(zeta)))*sin(wn*sqrt(1-sqr(zeta))*(t-states[15,i])));

End; gating signals

Procedure ref_sig1(t : real; var X_r : rarray31);

Begin reference signal 1 & its derivatives

X_r[0] := (-amp)*cos(2*pi*t/period);

X_r[1] := (amp*2*pi/period)*sin(2*pi*t/period);

X_r[2] := (amp*sqr(2*pi/period))*cos(2*pi*t/period);

End; reference signal 1 & its derivatives

Page 102: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 95

Procedure ref_sig2(t : real; var X_r : rarray31);

Begin reference signal 2 & its derivatives

X_r[0] := (-3*amp)+amp*sin(2*pi*t/period);

X_r[1] := (amp*2*pi/period)*cos(2*pi*t/period);

X_r[2] := (-amp*sqr(2*pi/period))*sin(2*pi*t/period);

End; reference signal 2 & its derivatives

Procedure X_error_X_desired(i : byte; x, x_dot : real; X_r : rarray31;

var X_d, X_error : rarray31; states : rarray92);

Begin X_error_X_desired

X_d[0] := X_r[0]-states[4,i];

X_d[1] := X_r[1]-states[5,i];

X_d[2] := X_r[2]-states[6,i];

X_error[0] := x-X_d[0];

X_error[1] := x_dot-X_d[1];

X_error[2] := 0; useless!!!

End; X_error_X_desired

Procedure coupling_calculation(u1, u2, F1, F2 : real; var coupling : rarray21);

Begin coupling

coupling[1] := V_x[1,2]*abs(u2)+W_x[1,2]*abs(F2);

coupling[2] := V_x[2,1]*abs(u1)+W_x[2,1]*abs(F1);

End; coupling

Procedure alphas_calculation(i : byte; dt, s, minus_kp, theta_hat_dot : real;

X_r : rarray31; var states : rarray92);

Begin Alphas calculation

states[6,i] := (sqr(lamda)*F_d*states[1,1] + theta_hat_dot*states[1,2]

+ (X_r[2]+2*lamda*X_r[1]+sqr(lamda)*X_r[0])

- (lamda*states[3,i]*1/V_x[i,i])*sat(s/states[3,i])

- (states[2,i]*1/states[1,1])*sat(minus_kp*states[1,1]*1/states[2,i]))*states[16,i]

- 2*lamda*states[5,i] - sqr(lamda)*states[4,i];

states[5,i] := states[5,i] + states[6,i]*dt;

states[4,i] := states[4,i] + states[5,i]*dt;

End; Alphas calculation

Procedure phi_p_calculation(i : byte; dt, F, u, coupling : real; var states : rarray92);

Begin phi_p calculation

states[2,i] := (neta + U_x[i] + coupling + W_x[i,i]*abs(F)

+ (V_x[i,i]-1)*abs(u))*states[1,1];

End; phi_p calculation

Procedure phi_s_calculation(i : byte; dt, F, coupling : real; X_d, X_error : rarray31;

var states : rarray92);

Var phi_s_dot : real;

Begin phi_s calculation

phi_s_dot := (1-1/V_x[i,i])*abs(X_d[2]-2*lamda*X_error[1]-sqr(lamda)*X_error[0])

+ (neta+U_x[i]+coupling+W_x[i,i]*abs(F))

- lamda*states[3,i]*1/sqr(V_x[i,i]);

if phi_s_dot >= 0 then phi_s_dot := phi_s_dot*sqr(V_x[i,i]);

states[3,i] := states[3,i] + phi_s_dot*dt;

End; phi_s calculation

Procedure Controller(i : byte; dt, t, x, x_dot, F, coupling : real;

X_r : rarray31; var u, theta_hat_dot : real;

var states : rarray92);

Page 103: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 96

Var X_d, X_error : rarray31;

s, minus_kp : real;

Begin Controller

X_error_X_desired(i,x,x_dot,X_r,X_d,X_error,states);

gating_sigs(i,t,F,X_r,states);

s := s_measurement(i,dt,X_error,states);

minus_kp := minus_kp_measurement(i,dt,x,x_dot,states);

theta_hat_dot := adaptation(i,dt,F,states);

u := control_law(i,s,states[3,i],X_d,X_error);

alphas_calculation(i,dt,s,minus_kp,theta_hat_dot,X_r,states);

phi_p_calculation(i,dt,F,u,coupling,states);

phi_s_calculation(i,dt,F,coupling,X_d,X_error,states);

End; Controller

Procedure AD_convert(var F1, q1, q_dot1, q2, q_dot2 : real);

Begin AD_convert

F1 := In_Voltage(0,1)*F_v_ratio1;

q1 := In_Voltage(1,1)*q_v_ratio1 + pi/2;

q_dot1 := In_Voltage(2,1)*q_dot_v_ratio1;

q2 := In_Voltage(3,1)*q_v_ratio2;

q_dot2 := In_Voltage(4,1)*q_dot_v_ratio2;

End; AD_convert

Procedure DA_convert(tau1, tau2 : real);

Begin DA_convert

Out_Voltage_Both(-9.99*sat(tau1*v_tau_ratio1/9.99),-9.99*sat(tau2*v_tau_ratio2/9.99));

End; DA_convert

Procedure axis;

Begin axis

ClearDevice;

SetColor(7); 1

rectangle(000,000,300,110);

rectangle(000,120,300,230);

rectangle(000,240,300,350);

rectangle(000,360,300,470);

line(000,055,300,055);

line(000,175,300,175);

line(000,295,300,295);

SetColor(11);

OutTextXY(265,005,’x_r1’);

OutTextXY(280,125,’x1’);

OutTextXY(280,245,’u1’);

OutTextXY(280,365,’F1’);

SetColor(7); 2

rectangle(340,000,639,110);

rectangle(340,120,639,230);

rectangle(340,240,639,350);

rectangle(340,360,639,470);

line(340,295,639,295);

line(340,415,639,415);

SetColor(11);

OutTextXY(603,005,’x_r2’);

OutTextXY(618,125,’x2’);

OutTextXY(618,245,’u2’);

OutTextXY(595,365,’x1-x2’);

End; axis

Page 104: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 97

Procedure PlotValues(x_r1, x_r2, x1, x2, u1, u2, F1, disp_time : real);

Const F_max1 = 4;

Begin PlotValues

PutPixel(round(300*disp_time/tm),round(055-055*x_r1/amp),2); 1

PutPixel(round(300*disp_time/tm),round(175-055*x1/amp),12);

PutPixel(round(300*disp_time/tm),round(295-055*u1/60),14);

PutPixel(round(300*disp_time/tm),round(360-110*F1/F_max1),13);

PutPixel(round(340+300*disp_time/tm),round(000-110*x_r2/(4*amp)),2); 2

PutPixel(round(340+300*disp_time/tm),round(120-110*x2/(4*amp)),12);

PutPixel(round(340+300*disp_time/tm),round(295-055*u2/60),14);

PutPixel(round(640+300*x2/(4*amp)),round(415-055*x1/amp),13);

End; PlotValues

Begin Main Program

ClrScr;

Init_Board;

DA_convert(0,0);

Assign(DataFile,’control.dat’);

Rewrite(DataFile);

gotoXY(12,09); writeln(’Program written to control the 2-link manipulator’);

gotoXY(12,10); writeln(’arm in the presence of model uncertainty using’);

gotoXY(12,11); writeln(’Sliding Mode Control - Alexander Lanzon (July 1997).’);

gotoXY(12,12); writeln(’Press "R" to start recording data and any other key to stop!!’);

gotoXY(12,15); writeln(’Please put ON all the servo-drivers & THEN press <ENTER> ...’);

readln;

grdriver := detect;

InitGraph(grdriver,grmode,’c:\bp\bgi’);

Ch := ’ ’;

dt := 3.1e-3;

t := 0;

disp_time := tm;

ref_sig1(t,X_r1);

ref_sig2(t,X_r2);

AD_convert(F1,q1,q_dot1,q2,q_dot2);

JointToTask(q1,q2,q_dot1,q_dot2,x1,x2,x_dot1,x_dot2);

states[1,1] := 1e-3; theta_hat

states[1,2] := 0; omega_bar

states[2,1] := 2.5e-3; phi_p1

states[2,2] := 2.5e-3; phi_p2

states[3,1] := 0.1; phi_s1

states[3,2] := 0.1; phi_s2

states[4,1] := 0; alpha1

states[4,2] := 0; alpha2

states[5,1] := 0; alpha_dot1

states[5,2] := 0; alpha_dot2

states[6,1] := 0; alpha_dot_dot1

states[6,2] := 0; alpha_dot_dot2

states[7,1] := -F_d; F_error1

states[7,2] := -F_d; F_error2

states[8,1] := 0; F_error_dot1

states[8,2] := 0; F_error_dot2

states[9,1] := 0; integral_-kp1

states[9,2] := 0; integral_-kp2

states[10,1] := x1-X_r1[0]+states[4,1]; x_error1

states[10,2] := x2-X_r2[0]+states[4,2]; x_error2

states[11,1] := x_dot1-X_r1[1]+states[5,1]; x_error_dot1

states[11,2] := x_dot2-X_r2[1]+states[5,2]; x_error_dot2

states[12,1] := 0; integral_s1

states[12,2] := 0; integral_s2

states[13,1] := 0; Previous L_function1

states[13,2] := 0; Previous L_function2

Page 105: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.1 Control Program 98

states[14,1] := 1e9; rising time for L_function1

states[14,2] := 1e9; rising time for L_function2

states[15,1] := 1e9; falling time for L_function1

states[15,2] := 1e9; falling time for L_function2

states[16,1] := 0; alpha gating signal 1

states[16,2] := 0; alpha gating signal 2

states[17,1] := 0; previous adaptation gating signal 1

states[17,2] := 0; previous adaptation gating signal 2

states[18,1] := 0; current adaptation gating signal 1

states[18,2] := 0; current adaptation gating signal 2

states[19,1] := 0; previous -kp gating signal 1

states[19,2] := 0; previous -kp gating signal 2

states[20,1] := 0; current -kp gating signal 1

states[20,2] := 0; current -kp gating signal 2

F2 := 0; because NO corner

u1 := (X_r1[2]-states[6,1]) - 2*lamda*states[11,1] - sqr(lamda)*states[10,1];

u2 := (X_r2[2]-states[6,2]) - 2*lamda*states[11,2] - sqr(lamda)*states[10,2];

count := 0;

PreviousTimerCount := ReadTimer;

repeat

coupling_calculation(u1,u2,F1,F2,coupling);

Controller(1,dt,t,x1,x_dot1,F1,coupling[1],X_r1,u1,theta_hat_dot1,states);

Controller(2,dt,t,x2,x_dot2,F2,coupling[2],X_r2,u2,theta_hat_dot2,states);

theta_hat_dot := theta_hat_dot1; since there is NO corner

states[1,1] := states[1,1] + theta_hat_dot*dt;

u_to_tau(q1,q2,q_dot1,q_dot2,F1,F2,u1,u2,tau1,tau2);

DA_convert(tau1,tau2);

if disp_time >= tm then

Begin

disp_time := 0;

axis;

End;

PlotValues(X_r1[0],X_r2[0],x1,x2,u1,u2,F1,disp_time);

if Ch=’R’ then writeln(DataFile,X_r1[0],’ ’,X_r2[0],’ ’,x1,’ ’,x2,’ ’,

q1,’ ’,q2,’ ’,u1,’ ’,u2,’ ’,tau1,’ ’,tau2,’ ’,F1,’ ’,t);

t := t + dt;

disp_time := disp_time + dt;

inc(count);

if count>=1000 then

begin

count := 0;

CurrentTimerCount := ReadTimer;

dt := (CurrentTimerCount-PreviousTimerCount)/(1000*TimerResolution);

if CurrentTimerCount >= 4e9 then

begin

InitializeTimer;

CurrentTimerCount := ReadTimer;

end;

PreviousTimerCount := CurrentTimerCount;

end;

ref_sig1(t,X_r1);

ref_sig2(t,X_r2);

AD_convert(F1,q1,q_dot1,q2,q_dot2);

JointToTask(q1,q2,q_dot1,q_dot2,x1,x2,x_dot1,x_dot2);

if KeyPressed then Ch := ReadKey;

until(Ord(Ch)=27); Escape

DA_convert(0,0);

Close(DataFile);

CloseGraph;

ClrScr;

End. Main Program

Page 106: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.2 AD/DA Interface Program 99

D.2 AD/DA Interface Program

The following program, also written in Borland Pascal 7, was used in conjunction withthe above program to drive the AD/DA card.

UNIT DT2801;

INTERFACE

PROCEDURE Init_Board;

PROCEDURE Out_Voltage(Channel : Word; Voltage : Real);

PROCEDURE Out_Voltage_Both(Voltage1,Voltage2 : Real);

FUNCTION In_Voltage(Channel,Gain : Integer) : Real;

IMPLEMENTATION

USES DOS,CRT,Graph;

CONST

BASE_ADDRESS = $2EC;

Command_Register = BASE_ADDRESS + 1;

Status_Register = BASE_ADDRESS + 1;

DATA_Register = BASE_ADDRESS;

Command_WAIT = $4;

Write_WAIT = $2;

READ_WAIT = $5;

CSTOP = $F;

CCLEAR = $1;

CERROR = $2;

CDAOUT = $8;

CADIN = $C;

Offset = 10;

Factor = 4096.0;

Range = 20.0;

PROCEDURE XWait(Portnum, ANDExp, XORExp : Word);

VAR Temp : Word;

Begin

REPEAT

Temp := Port[PortNum] XOR XORExp;

UNTIL (Temp AND AndExp)<>0;

End;

PROCEDURE Wait(Portnum, ANDExp : Word);

VAR Temp : Word;

Begin

REPEAT

Temp := Port[PortNum];

UNTIL (Temp AND AndExp)<>0;

End;

PROCEDURE Out_Voltage(Channel : Word; Voltage : Real);

VAR Status,Temp : Word;

High, Low : Byte;

DAC_Value : Real;

Begin

Port[Command_Register] := CStop;

Temp := Port[Data_Register];

Wait(Status_Register, Command_Wait);

Port[Command_Register] := 1;

Write DAC Immediate Command

Wait(Status_Register, Command_Wait);

Port[Command_Register] := CDAOut;

Write DAC Select Command

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := Channel;

DAC_Value := ((Voltage+Offset)*Factor)/Range;

High := TRUNC(DAC_Value / 256);

Low := TRUNC(DAC_Value - High * 256);

Page 107: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.2 AD/DA Interface Program 100

Write Data

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := Low;

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := High;

Check For Error

Wait(Status_Register, Command_Wait);

Status := Port[Status_Register];

IF (Status AND $80)<>0 THEN OutTextXY(50,80,’error’);

End;

PROCEDURE Out_Voltage_Both(Voltage1,Voltage2 : Real);

VAR Status : Word;

High, Low : Byte;

DAC_Value : Real;

Temp : Word;

Begin

Port[Command_Register] := CStop;

Temp := Port[Data_Register];

Wait(Status_Register, Command_Wait);

Port[Command_Register] := 1;

Write DAC Immediate Command

Wait(Status_Register, Command_Wait);

Port[Command_Register] := CDAOut;

Write DAC Select Command

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := 2;

DAC_Value := ((Voltage1+Offset)*Factor)/Range;

High := TRUNC(DAC_Value / 256);

Low := TRUNC(DAC_Value - High * 256);

Write Data

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := Low;

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := High;

DAC_Value := ((Voltage2+Offset)*Factor)/Range;

High := TRUNC(DAC_Value / 256);

Low := TRUNC(DAC_Value - High * 256);

Write Data

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := Low;

XWait(Status_Register, Write_Wait, Write_Wait);

Port[Data_Register] := High;

Check For Error

Wait(Status_Register, Command_Wait);

Status := Port[Status_Register];

IF (Status AND $80)<>0 THEN OuttextXY(100,100,’Error’);

End;

PROCEDURE Init_Board;

VAR Status,Temp : Word;

Begin

Status := Port[Status_Register];

IF NOT ((Status AND $70) = 0) THEN OutTextXY(50,10,’Error’);

Port[Command_Register] := CStop;

Temp := Port[Data_Register];

Wait(Status_Register, Command_Wait);

Port[Command_Register] := 0;

Out_Voltage_Both(0,0);

End;

FUNCTION In_Voltage(Channel,Gain : Integer) : Real;

VAR Status : Word;

High, Low : Byte;

Begin

Write READ A/D IMMEDIATE command

Wait(Status_Register,Command_Wait);

Port[Command_Register] := CADIn;

Write A/D gain byte

Page 108: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

D.2 AD/DA Interface Program 101

XWait(Status_Register,Write_Wait,Write_Wait);

Port[Data_Register] := 0 log-base2(Gain);

Write A/D channel byte.

XWait(Status_Register,Write_Wait,Write_Wait);

Port[Data_Register] := Channel;

Read two bytes of A/D data from the Data Out Register

Wait(Status_Register,Read_Wait);

Low := Port[Data_Register];

Wait(Status_Register,Read_Wait);

High := Port[Data_Register];

Wait(Status_Register,Command_Wait);

Status := Port[Status_Register];

IF (Status AND $80)<>0 THEN OutTextXY(50,30,’Error’);

In_Voltage := (Range*(High*256+Low)/Factor-Offset)/Gain;

End;

Begin

End.

Page 109: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

Bibliography

[1] G. M. Acaccia, P. C. Cagetti, M. Callegari, R. C. Michelini, and R. M.Molfino. Modeling the impact dynamics of robotic manipulators. In L. Sciavicco,C. Bonivento, and F. Nicolo, editors, Preprints of the Fourth IFAC Symposium onRobot Control, volume 2, pages 559–564, Capri, Italy, September 1994.

[2] C. H. An, C. G. Atkeson, and J. M. Hollerbach. Model-Based Control of a RobotManipulator. The MIT Press, Cambridge, Massachusetts, 1988.

[3] C. H. An and J. M. Hollerbach. Kinematic stability issues in force control ofmanipulators. In IEEE International Conference on Robotics and Automation,pages 897–903, Raleigh, NC, USA, 1987.

[4] H. Asada and K. Ogawa. On the dynamic analysis of a manipulator and its end-effector interacting with the environment. In Proceedings of the IEEE InternationalConference on Robotics and Automation, pages 751–756, 1987.

[5] H. Asada and J.-J. E. Slotine. Robot Analysis and Control. John Wiley and Sons,Inc., 1986.

[6] K. J. Astrom and B. Wittenmark. Adaptive Control. Addison-Wesley PublishingCompany, Inc., 1989.

[7] J. J. Bausch, B. M. Kramer, and H. Kazerooni. The development of complianttool holders for robotic deburring. Robotics: Theory and Application, pages 79–89,1985.

[8] B. Brogliato and P. Orhant. On the transition phase in robotics: Impact models,dynamics and control. In Proceedings of the IEEE International Conference onRobotics and Automation, pages 346–351, Piscataway, NJ, USA, 1994.

[9] L. Cai and G. Song. Robust position/force control of robot manipulators duringcontact tasks. In Proceedings of the American Control Conference, volume 1, pages216–220, June 1994.

[10] C. Canudas de Wit and B. Brogliato. Direct adaptive impedance control. InL. Sciavicco, C. Bonivento, and F. Nicolo, editors, Preprints of the Fourth IFACSymposium on Robot Control, volume 2, pages 395–400, Capri, Italy, September1994.

102

Page 110: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

BIBLIOGRAPHY 103

[11] J. J. Craig. Adaptive Control of Mechanical Manipulators. Addison-Wesley Pub-lishing Company, Inc., 1988.

[12] J. J. Craig. Introduction to Robotics: Mechanics and Control. Addison-WesleyPublishing Company, Inc., second edition, 1989.

[13] M. R. Cutkosky and P. K. Wright. Position sensing wrists for industrial manip-ulators. In 12th International Symposium on Industrial Robots, Paris, France,1982.

[14] D. M. Dawson, F. L. Lewis, and J. F. Dorsey. Robust force control of a robotmanipulator. International Journal of Robotics Research, 11(4):312–319, August1992.

[15] R. Dillmann. A sensor controlled gripper with tactile and non-tactile sensor envi-ronment. In Proceedings of the Second International Conference on Robot Visionand Sensory Controls, pages 159–170, Stuffgart, Germany, November 1982.

[16] W. H. ElMaraghy, H. A. ElMaraghy, A. Zaki, and A. Massoud. A study onthe design and control of robot manipulators with flexibilities. In L. Sciavicco,C. Bonivento, and F. Nicolo, editors, Preprints of the Fourth IFAC Symposium onRobot Control, volume 2, pages 495–502, Capri, Italy, September 1994.

[17] A. F. Filippov. Differential equations with discontinuous right-hand side. Ameri-can Mathematical Society Translations, 42(2):199–231, 1964.

[18] W. D. Fisher and M. S. Mujtaba. Hybrid position/force control: A correct formu-lation. International Journal of Robotics Research, 11(4):299–311, August 1992.

[19] T. Fukuda, Y. Shoji, and M. Inaba. Stable position/force control of robotic ma-nipulator with consideration of collision phenomena. In IFAC Symposia Series—Proceedings of a Triennial World Congress, volume 5, pages 242–248, 1991.

[20] M. T. Grabbe and M. M. Bridges. Comments on ‘Force/Motion control of con-strained robots using sliding mode’. IEEE Transactions on Automatic Control,39(1):179, January 1994. See also original paper by C. Y. Su, T. P. Leung and Q.J. Zhou.

[21] N. Hogan. Impedance control of industrial robots. Robotics and Computer Inte-grated Manufacturing, 1(1):97–113, 1984.

[22] H. K. Khalil. Nonlinear Systems. Prentice-Hall, Inc., second edition, 1996.

[23] O. Khatib. A unified approach for motion and force control of robot manipulators:The operational space formulation. IEEE Journal of Robotics and Automation,RA-3:43–53, 1987.

[24] C. M. Kwan. Hybrid force/position control for manipulators with motor dynamicsusing a sliding-adaptive approach. IEEE Transactions on Automatic Control,40(5):963–968, May 1995.

Page 111: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

BIBLIOGRAPHY 104

[25] S. Lefschetz. Stability of nonlinear control systems, pages 114–118. AcademicPress, New York, 1965.

[26] H. Lipkin and J. Duffy. Invariant kinestatic filtering. In Preprints 6th CISM-IFToMM Symposium on Theory and Practice of Robots and Manipulators, pages96–103, Cracow, Poland, September 1986.

[27] J. Y. S. Luh, M. W. Walker, and R. P. Paul. Resolved acceleration control ofmechanical manipulators. IEEE Transactions on Automatic Control, AC-25:468–567, 1980.

[28] M. T. Mason. Compliance and force control for computer controlled manipulators.IEEE Transactions on Systems, Man and Cybernetics, SMC-11:418–432, 1981.

[29] H. McClamroch and D. Wang. Linear feedback control position and contact forcefor a nonlinear constrained mechanism. ASME Journal of Dynamic Systems,Measurement and Control, 112:640–645, 1990.

[30] J.-P. Merlet. C-surface applied to the design of a hybrid force-position robotcontroller. In Proceedings of the IEEE International Conference on Robotics andAutomation, 1987.

[31] T. Narikiyo, G. Schmidt, and T. Akuta. Theoretical aspect of hybrid position/forcecontrol. In L. Sciavicco, C. Bonivento, and F. Nicolo, editors, Preprints of theFourth IFAC Symposium on Robot Control, volume 2, pages 469–474, Capri, Italy,September 1994.

[32] E. V. Panteley and A. A. Stotsky. Adaptive trajectory/force control scheme forconstrained robot manipulators. International Journal of Adaptive Control andSignal Processing, 7(6):489–496, 1993.

[33] I. E. Paromtchik, M. Damm, and L. I. Matioukhina. A variable structure forcecontroller for robotic manipulators. In L. Sciavicco, C. Bonivento, and F. Nicolo,editors, Preprints of the Fourth IFAC Symposium on Robot Control, volume 2,pages 481–486, Capri, Italy, September 1994.

[34] V. Parra-Vega and S. Arimoto. A passivity-based adaptive sliding mode position-force control for robot manipulators. International Journal of Adaptive Controland Signal Processing, 10:365–377, 1996.

[35] V. Parra-Vega, S. Arimoto, Y. H. Liu, and T. Naniwa. Model-Based adaptivehybrid control for robot manipulators under holonomic constraints. In L. Sciavicco,C. Bonivento, and F. Nicolo, editors, Preprints of the Fourth IFAC Symposium onRobot Control, volume 2, pages 475–480, Capri, Italy, September 1994.

[36] R. P. Paul and B. Shimano. Compliance and control. In M. Brady et al., editors,Robot Motion Planning and Control, pages 404–418. The MIT Press, Cambridge,MA, 1982.

Page 112: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

BIBLIOGRAPHY 105

[37] R. P. Paul, Y. Xu, and X. Yun. The implementation of hybrid control in thepresence of passive compliance. In H. Miura and S. Arimoto, editors, The FifthInternational Symposium on Robotics Research, pages 193–200, Cambridge, Mas-sachusetts, 1989. The MIT Press.

[38] M. H. Raibert and J. J. Craig. Hybrid position/force control of manipulators.ASME Journal of Dynamic Systems, Measurement and Control, 102:126–133,1981.

[39] C. Reboulet and A. Robert. Hybrid control of a manipulator with an activecompliant wrist. In Proceedings of the Third International Symposium on RoboticsResearch, 1985.

[40] R. K. Roberts. The Compliance of End Effector Force Sensors for Robot Manip-ulator Control. PhD thesis, Purdue University, School of Electrical Engineering,December 1984.

[41] K. Salisbury. Active stiffness control of a manipulator in cartesian coordinates. InProceedings of the 19th IEEE Conference on Decision and Control, pages 87–97,Albuquerque, NM, 1980.

[42] K. G. Shin and C.-P. Lee. Compliant control of robotic manipulators with resolvedacceleration. In Proceedings of the 24th IEEE Conference on Decision and Control,pages 350–357, Fort Lauderdale, 1985.

[43] J.-J. E. Slotine and W. Li. Applied nonlinear control. Prentice-Hall, Inc., 1991.

[44] J.-J. E. Slotine and S. S. Sastry. Tracking control of nonlinear systems usingsliding surfaces with applications to robot manipulators. International Journal ofControl, 39(2), 1983.

[45] M. W. Spong and M. Vidyasagar. Robust tracking and disturbance rejection forrobot manipulators. In IEEE Conference on Decision and Control, Fort Laud-erdale, 1985.

[46] M. W. Spong and M. Vidyasagar. Robot Dynamics and Control. John Wiley andSons, Inc., 1989.

[47] K. Takuse, H. Inoue, K. Sato, and S. Hagiuara. The design of the articulatedmanipulator with torque control ability. In Fourth International Symposium onIndustrial Robots, 1974.

[48] V. I. Utkin. Variable structure systems with slidings. IEEE Transactions onAutomatic Control, AC-22(2):212–222, 1977.

[49] V. I. Utkin. Sliding Modes in Optimization and Control. Springer-Verlag, NewYork, 1992.

[50] D. Wang and N. H. McClamroch. Position and force control for constrainedmanipulator motion: Lyapunov’s direct method. IEEE Transactions on Roboticsand Automation, 9(3):308–313, June 1993.

Page 113: Compliant Motion Control for Robotic Manipulators · 2006. 8. 3. · Many applications of robot manipulators to date have been based on position1 control. However, when a robot manipulator

BIBLIOGRAPHY 106

[51] D. E. Whitney. Force feedback control of manipulator fine motions. ASME Journalof Dynamic Systems, Measurement and Control, pages 91–97, 1977.

[52] D. E. Whitney. Historical perspective and state of the art in robot force control.International Journal of Robotics Research, 6:3–13, 1987.

[53] D. E. Whitney and J. M. Rourke. Mechanical behaviour and design equationsfor elastomer shear pad remote center compliance. ASME Journal of DynamicSystems, Measurement and Control, 108:223–232, 1986.

[54] T. Yoshikawa. Dynamic hybrid position/force control of robot manipulators—Description of hand constraints and calculation of joint driving force. IEEE Jour-nal of Robotics and Automation, RA-3:386–392, 1987.

[55] K.-K. D. Young. Controller design for a manipulator using theory of variablestructure systems. IEEE Transactions on Systems, Man and Cybernetics, SMC-8(2), 1978.

[56] H. Zhang. Kinematic stability of robot manipulators under force control. In IEEEInternational Conference on Robotics and Automation, pages 80–85, Scottsdale,AZ, USA, 1989.