11
2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008 Fast Robot Motion Generation Using Principal Components: Framework and Algorithms Soonkyum Kim and Frank Chongwoo Park Abstract—We present a principal component-based method for generating, in real time, fast robot motions that minimize power consumption. Given a dynamic model of a robot, a sufficiently large set of torque-minimum motions are first obtained for pre- selected initial and final positions that also achieve minimum time while avoiding actuator saturation. These motions are then clus- tered according to the trajectory endpoints and shape. A principal component analysis is performed for each motion cluster, and the dominant principal components are used as basis functions in a linear interpolation scheme for generating fast, torque-efficient motions between arbitrary initial and final positions. Results ob- tained for both a six-axis industrial manipulator and a wheeled mobile robot demonstrate that nearly optimal motions can be obtained in real-time using this scheme. Index Terms—Principal component analysis (PCA), robot motion generation. I. I NTRODUCTION F OR BOTH industrial robots that repeatedly perform arbi- trary point-to-point motions, as well as mobile robots that are powered by onboard batteries, the advantages of executing smooth, power-efficient trajectories are obvious: the decreased power consumption, together with the reduction in wear and tear on the mechanical parts, can improve both the productivity and life cycle of the robot. Additionally, for mobile robots, minimizing power consumption becomes even more critical in light of the limited capacity of current battery technology and the increased loads brought on by, e.g., mounting manipulators on the mobile robot platforms. Generating trajectories that minimize power consumption can be framed as an optimal control problem in several ways. One approach is to determine the optimal joint torque profile τ (t) n that minimizes, e.g., an integral square torque crite- rion subject to the robot dynamic equations and endpoint condi- tions on the joint position and velocity. Despite recent progress on the numerical solution of such problems, e.g., [1]–[3], obtaining real-time solutions remains extremely difficult if not impossible, even for the simplest serial chain robots. This rather dismal state of affairs is also true for the related minimum-time trajectory generation problem. Despite the vast Manuscript received November 9, 2006; revised August 10, 2007. This work was supported in part by the Institute of Advanced Machinery and Design at Seoul National University, Seoul, Korea. The authors are with the School of Mechanical and Aerospace Engi- neering, Seoul National University, Seoul 151-742, Korea (e-mail: skkim@ robotics.snu.ac.kr; [email protected]). Color versions of one or more of the figures in this paper are available online at http://ieeexplore.ieee.org. Digital Object Identifier 10.1109/TIE.2007.907667 literature (here we only mention [4]–[6] and the references cited therein), there are no practical algorithms that generate, in real-time, minimum-time point-to-point trajectories for general robot systems. Even if such algorithms were available, it has been pointed out that because minimum-time trajectories are marked by bang-bang controls, the resulting actuator saturation and induced vibration are highly undesirable from a practical point of view. More generally, various issues surrounding the generation and control of high-speed robot motions have also been addressed in [7]–[9]. Given these practical considerations, our premise in this pa- per is that, for the industrial robotics contexts described above, useful point-to-point trajectories should be power-efficient, smooth, and fast; the trajectories should be such that actuator saturation be avoided, sufficiently smooth to minimize vibra- tion, and also reduce as much as possible power consumption and total motion time. This problem also admits a formulation as a somewhat unconventional optimal control problem, which as far as we are aware of, has yet to be addressed in the robotics literature; we present its mathematical formulation in Section II. Needless to say, this problem, which is even more complex than the previous minimum torque and minimum time problems, also does not admit real-time solutions. Issues in the robust generation of smooth trajectories are addressed in [10]. In this paper, we propose a methodology for generating, in real-time, trajectories that closely satisfy the above criteria: given a general industrial robot system, we seek trajectories that are close approximations to the optimal solution of the previ- ously described problem. Specifically, we propose a learning- based interpolation scheme, in which the interpolating basis elements are obtained as the principal components of a set of training data, which are in turn obtained from a set of optimal motion generation algorithms also developed in this paper. Various elements of our approach to robot motion genera- tion have appeared in different contexts throughout the human motor control and robotics literature. The idea of representing and generating human arm motions as a linear superposition of principal components was first investigated in [11]. Elements of the approach presented in this paper were previously proposed by the authors in the context of generating natural, humanlike motions for computer animation applications [12]; in this case, the training data was obtained from motion capture data of human subjects, and the principal components were used as basis elements for a dynamics-based optimization procedure. Similar approaches using human motion data have also been investigated for deriving action and behavior primitives for humanoid robots [13]. 0278-0046/$25.00 © 2008 IEEE

Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

  • Upload
    others

  • View
    1

  • Download
    0

Embed Size (px)

Citation preview

Page 1: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

Fast Robot Motion Generation Using PrincipalComponents: Framework and Algorithms

Soonkyum Kim and Frank Chongwoo Park

Abstract—We present a principal component-based method forgenerating, in real time, fast robot motions that minimize powerconsumption. Given a dynamic model of a robot, a sufficientlylarge set of torque-minimum motions are first obtained for pre-selected initial and final positions that also achieve minimum timewhile avoiding actuator saturation. These motions are then clus-tered according to the trajectory endpoints and shape. A principalcomponent analysis is performed for each motion cluster, and thedominant principal components are used as basis functions in alinear interpolation scheme for generating fast, torque-efficientmotions between arbitrary initial and final positions. Results ob-tained for both a six-axis industrial manipulator and a wheeledmobile robot demonstrate that nearly optimal motions can beobtained in real-time using this scheme.

Index Terms—Principal component analysis (PCA), robotmotion generation.

I. INTRODUCTION

FOR BOTH industrial robots that repeatedly perform arbi-trary point-to-point motions, as well as mobile robots that

are powered by onboard batteries, the advantages of executingsmooth, power-efficient trajectories are obvious: the decreasedpower consumption, together with the reduction in wear andtear on the mechanical parts, can improve both the productivityand life cycle of the robot. Additionally, for mobile robots,minimizing power consumption becomes even more critical inlight of the limited capacity of current battery technology andthe increased loads brought on by, e.g., mounting manipulatorson the mobile robot platforms.

Generating trajectories that minimize power consumptioncan be framed as an optimal control problem in several ways.One approach is to determine the optimal joint torque profileτ(t) ∈ �n that minimizes, e.g., an integral square torque crite-rion subject to the robot dynamic equations and endpoint condi-tions on the joint position and velocity. Despite recent progresson the numerical solution of such problems, e.g., [1]–[3],obtaining real-time solutions remains extremely difficult if notimpossible, even for the simplest serial chain robots.

This rather dismal state of affairs is also true for the relatedminimum-time trajectory generation problem. Despite the vast

Manuscript received November 9, 2006; revised August 10, 2007. This workwas supported in part by the Institute of Advanced Machinery and Design atSeoul National University, Seoul, Korea.

The authors are with the School of Mechanical and Aerospace Engi-neering, Seoul National University, Seoul 151-742, Korea (e-mail: [email protected]; [email protected]).

Color versions of one or more of the figures in this paper are available onlineat http://ieeexplore.ieee.org.

Digital Object Identifier 10.1109/TIE.2007.907667

literature (here we only mention [4]–[6] and the referencescited therein), there are no practical algorithms that generate, inreal-time, minimum-time point-to-point trajectories for generalrobot systems. Even if such algorithms were available, it hasbeen pointed out that because minimum-time trajectories aremarked by bang-bang controls, the resulting actuator saturationand induced vibration are highly undesirable from a practicalpoint of view. More generally, various issues surrounding thegeneration and control of high-speed robot motions have alsobeen addressed in [7]–[9].

Given these practical considerations, our premise in this pa-per is that, for the industrial robotics contexts described above,useful point-to-point trajectories should be power-efficient,smooth, and fast; the trajectories should be such that actuatorsaturation be avoided, sufficiently smooth to minimize vibra-tion, and also reduce as much as possible power consumptionand total motion time. This problem also admits a formulationas a somewhat unconventional optimal control problem, whichas far as we are aware of, has yet to be addressed in therobotics literature; we present its mathematical formulation inSection II. Needless to say, this problem, which is even morecomplex than the previous minimum torque and minimum timeproblems, also does not admit real-time solutions. Issues in therobust generation of smooth trajectories are addressed in [10].

In this paper, we propose a methodology for generating, inreal-time, trajectories that closely satisfy the above criteria:given a general industrial robot system, we seek trajectories thatare close approximations to the optimal solution of the previ-ously described problem. Specifically, we propose a learning-based interpolation scheme, in which the interpolating basiselements are obtained as the principal components of a setof training data, which are in turn obtained from a set ofoptimal motion generation algorithms also developed in thispaper.

Various elements of our approach to robot motion genera-tion have appeared in different contexts throughout the humanmotor control and robotics literature. The idea of representingand generating human arm motions as a linear superposition ofprincipal components was first investigated in [11]. Elements ofthe approach presented in this paper were previously proposedby the authors in the context of generating natural, humanlikemotions for computer animation applications [12]; in this case,the training data was obtained from motion capture data ofhuman subjects, and the principal components were used asbasis elements for a dynamics-based optimization procedure.Similar approaches using human motion data have also beeninvestigated for deriving action and behavior primitives forhumanoid robots [13].

0278-0046/$25.00 © 2008 IEEE

Page 2: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

KIM AND PARK: FAST ROBOT MOTION GENERATION USING PRINCIPAL COMPONENTS 2507

In this paper, we develop a complete framework for principalcomponent-based motion generation, but more importantly,provide a set of practical algorithms for generating nearlyoptimal motions in real-time. There are myriad complexitiesand difficult engineering issues in synthesizing the underlyingelements into a practical motion generation methodology. First,constructing a sufficiently rich set of training motion data foreven a six-axis industrial robot can rapidly deteriorate into anintractable task, and ways to reduce the preprocessing compu-tational task are essential. Second, the clustering and classifica-tion of the motions prior to principal component analysis (PCA)involves many subtle issues that, if improperly addressed, canlead to highly undesirable and far from optimal trajectories.

This paper focuses on two case studies involving a six-axisindustrial manipulator and a wheeled mobile robot, and for eachwe present a complete strategy that addresses each of the abovechallenges. In addition to developing the high-level framework,our specific contributions are as follows: 1) we exploit anyintrinsic symmetries in the robot and task environment, andinertial properties of the robot, so that the training data canbe generated in a space of reduced dimension; 2) we developan offline algorithm for determining optimal (in the sense ofminimum-time, minimum-torque motions that avoid actuatorsaturation) motions given endpoint boundary conditions; 3) wepropose customized geometric methods for clustering thesetraining data according to their boundary conditions and shapeproperties; 4) we specify the admissible input boundary condi-tions for the motions, derive the exact form of the associatedlinear interpolation algorithms, and examine the relationshipbetween the nearness to optimality and the number of principalcomponents used.

A unifying theme behind our approach, amply illustratedthrough our case studies, is that it is important to exploitas much as possible any inherent structure and symmetriesin the robot and task model. While the resulting trajectoriesonly approximate the true optimal solution, this is usuallyquite sufficient for practical purposes. We also remark thatour general framework is also applicable to other criteria be-sides fast, torque-efficient motions; one simply needs to usethe appropriate training motion data, and develop meaningfulclustering and configuration space partitioning schemes.

The remainder of this paper is organized as follows. InSection II, we discuss the overall framework and step-by-stepmethodology. Section III discusses in detail the basic elementsof the method: 1) how to efficiently construct a sufficiently richset of training motion data for fast, torque-efficient motions;2) a clustering algorithm of the motion data, and appropriatepartitioning of the joint space based on starting and endinginput poses; 3) the computational procedure for extracting theprincipal components; and 4) the linear interpolation algorithm.Section IV presents detailed simulation case studies involvingan actual six-axis industrial robot, and a wheeled mobile robotplatform.

II. FRAMEWORK

Fig. 1 depicts the overall framework for our motion gener-ation scheme. The motion generation module takes as input

Fig. 1. Proposed motion generation framework.

the starting and ending poses for the robot, and produces asoutput a joint motion trajectory that is close to the minimumtime without causing saturation in any of the actuators. Giventhe starting and ending configurations, an appropriate set of in-terpolating basis functions are chosen from a library, and linearinterpolation is performed to satisfy the boundary conditions.Details of the linear interpolation are given in the subsequentsection.

The effectiveness of the proposed motion generation methodis determined entirely by the choice of basis functions. Theupper block of Fig. 1 shows the procedure for constructingthe library of basis functions. In the first step, a sufficientlylarge set of training motion data is obtained. Since our ob-jective is to generate fast, minimum torque trajectories, wefirst determine, via a dynamic optimization procedure whosedetails we describe in the next section, a large set of suchtrajectories for a wide range of starting and ending poses. Sinceeach dynamic optimization is computationally demanding, ourobjective will be to seek a minimal number of trajectories thatare representative of the motions that the robot is expected toperform. While our focus in this paper is on fast minimum-torque trajectories, in principle any other set of training motiondata can be used that reflect different physical criteria, e.g.,fast motions without regard to actuator saturation, or motionsin which the tip follows a linear path.

Once the optimal trajectories to be used as training motiondata have been obtained, we then group these trajectories intoseveral clusters: trajectories within a cluster will share severalessential features, e.g., similar starting and ending poses, andsimilar trajectory shapes. The criteria for clustering will bedetermined to a large extent by both the physical criteria usedin selecting the input motion data, and the inputs for the inter-polation. While numerous vector clustering algorithms basedon statistical methods have been proposed in the literature,e.g., [14], the results depend critically on the choice of discretevector representation for our trajectories. In the next section, weinvestigate these issues in detail for our particular applicationfocus.

Assuming the training motion data have been appropriatelyclustered, the next step is to derive a set of basis functions for

Page 3: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2508 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

Fig. 2. SA130 six-axis industrial manipulator.

each cluster that are representative of the trajectories contained.We achieve this via a PCA of the trajectories contained withineach cluster. A finite number of the most dominant principalcomponents (typically four for our application) are then used asbasis functions for linear interpolation.

III. ALGORITHM

In this section, we describe the details of each step of ouralgorithm, focusing on the functional (square) blocks shownin Fig. 1. Our algorithm is presented for standard six-axisindustrial manipulators of the topology shown in Fig. 2, butshould be easily generalizable to other nonstandard topologies.

A. Generating Optimal Motions for Training Data

For training motion data we seek a sufficiently large setof trajectories that have minimum torque, and at the sametime as fast as possible without causing saturation in anyof the actuators. For the minimum torque problem in whicha fixed tf is given as input, it is intuitively clear (and alsoconfirmed by extensive simulations) that for larger values of tf ,the minimum torque profiles become increasingly flatter (andsmoother). A further related property, also verified by extensivesimulations, is that the peak torque attained by the minimumtorque trajectory decreases monotonically as tf is increased.These observations are consistent with intuition, although it isnot straightforward to establish these properties theoretically.We also note that these observations stand in direct contrast tominimum time trajectories, which are marked by discontinuousbang-bang torque profiles.

This is an unconventional optimal control problem that doesnot admit any of the standard formulations. The dynamic equa-tions are of the form

τ(t) = M(q)q + C(q, q) + G(q) (1)

subject to bounds on the joint positions and velocities ofthe form

ql ≤ q ≤ qu, ql, qu ∈ �6 (2)

vl ≤ q ≤ vu, vl, vu ∈ �6 (3)

and torque limits of the form

−τmax ≤ τ ≤ τmax, τmax ∈ �6. (4)

Initial and final joint positions and velocities q(0), q(tf), q(0),q(tf) will typically be assumed given, where tf denotes thefinal time.

One possible optimal control formulation involves augment-ing the minimum torque functional with a penalty term for thefinal time, i.e.,

minτ(t)

φ(tf) +12

tf∫0

‖τ(t)‖2 dt (5)

subject to the previous boundary conditions and constraints.Here, φ(tf) acts as a penalty function to prevent the final timefrom becoming arbitrarily large in order to decrease torqueconsumption. φ(tf) should be a smooth, monotonically in-creasing function of tf , with a multiplicative scalar parameterthat reflects the relative weight between minimum time ver-sus torque consumption. While the penalty term formulationis straightforward, the associated numerical procedure is not.Perhaps most critically, the resulting trajectories will dependto a large extent on the relative weighting between the finaltime and the torque consumption, a situation that clearly leavessomething to be desired.

A more precise formulation, and one that we adopt in ourlater case studies, is to instead maximize the peak torque

maxtf

∥∥∥∥∥∥arg minτ

tf∫0

‖τ(t)‖2 dt

∥∥∥∥∥∥∞

(6)

where ‖ · ‖∞ denotes the L∞ norm on the space of continuousfunctions, subject to the earlier torque and state inequalityconstraints and the given endpoint boundary conditions. Forthe purposes of this paper, we do not dwell on the analyticalcharacterization of solutions, and instead provide the followingnumerical procedure for obtaining a solution.

1) Given some value of tf , determine the correspondingminimum torque trajectory (this can be done assumingno torque limits).

2) Determine the peak torque value τpeak from the minimumtorque profile determined in Step 1):

τpeak = max1≤i≤6

(max

t∈[0,tf ]|τi(t)|

). (7)

Suppose the peak torque occurs in joint k, and denote themaximum torque limit for actuator k by τk,max.

3) Evaluate the objective function ((τk,max − ε) − τpeak)2,where ε is some constant scalar acting as a safety bufferbetween τk,max and τpeak.

Page 4: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

KIM AND PARK: FAST ROBOT MOTION GENERATION USING PRINCIPAL COMPONENTS 2509

The tf that minimizes the above objective function can bedetermined via a standard line search procedure, e.g., goldensection search, with an upper bound on admissible tf seta priori, and the number of objective function evaluations alsolimited to some fixed number.

Note that each evaluation of the objective function as de-scribed above involves a torque minimization procedure, andthat a typical line search procedure will typically involve up toten objective function evaluations. One means of reducing thecomputational burden while compromising optimality with re-spect to tf is to fix tf via some heuristic rule at each iteration ofthe torque minimization procedure. For example, at the end ofeach iteration, if τpeak is greater than τk,max, then tf is increasedin a proportional manner; similarly, if τpeak is less than τk,max,then tf is decreased in a proportional manner. Determiningthe proportionality factor requires some experimentation andtuning. Results of this heuristic procedure are reported in ourlater case studies.

B. Clustering the Motion Data

The set of training motion data obtained in the previoussection are now clustered according to both the endpoints andthe shape of the trajectory. Since the inputs to our trajectorygeneration algorithm are precisely the starting and ending con-figurations, we would like to group trajectories according to theproximity of the endpoints, and also by the trajectory shape.The notion of two trajectories having “similar” endpoints canbe interpreted in the straightforward Euclidean sense, i.e., thetwo starting points are physically proximal to each other, as arethe two ending points.

The notion of “shape similarity,” on the other hand, canbe formulated in a number of ways. Given two appropriatelynormalized curves C1, C2 : [0, 1] → �n, one can consider, e.g.,the integral of the squared distance

∫ 1

0 ‖C1(t) − C2(t)‖2dt,or the average difference in the torsion and curvature functionsof the two curves. For our clustering process, we adopt theformer metric to take advantage of the K-means clusteringalgorithm available in, e.g., Matlab.

We note that there is considerable latitude in the choice ofclustering method, but that the one presented here takes intoaccount both the shape properties and the endpoint configura-tions, uses existing vector clustering algorithms, and is easilyimplemented.

C. PCA

Once the input motion data has been organized into clusters,we then perform a PCA for each cluster of trajectories; themost dominant principal components are then used as a set ofinterpolating basis elements representative of all trajectories inthat cluster. PCA is a well-known and widely used method forstatistical analysis (see, e.g., [15]), and here we only outline forcompleteness the computational procedure in the 1-D case.

Consider the vector time series data {x[0], x[1], . . . , x[N ]},with each x[i] ∈ �n regarded as a sample of the randomvector x ∈ �ni. For our specific application, each x[i] shouldbe regarded as a 1 degree-of-freedom (DOF) joint trajectory

sampled at n uniform time intervals; N such measured jointtrajectories are available. The sample mean x ∈ �n and samplecovariance S ∈ �n×n are then obtained from the formulas

x =1

N + 1

N∑i=0

x[i] (8)

S =1N

N∑i=0

(x[i] − x) (x[i] − x)T . (9)

Let {(λ1, e1), . . . , (λn, en)} represent the eigenvalue–eigenvector pairs for S, where the eigenvectors {ei} are or-thonormal, and the eigenvalues are ordered so that λ1 ≥ λ2 ≥· · · ≥ λn ≥ 0. The eigenvectors {e1, . . . , en} then correspondto the principal components; that is, e1 ∈ �n represents themost dominant joint trajectory (or most representative of themeasured data), whereas en ∈ �n represents the least repre-sentative joint trajectory. An arbitrary trajectory x can thus beapproximately represented in discrete form as a linear combi-nation of the ei

x = x +n∑

i=0

ciei (10)

with the ci scalar weighting coefficients. An obvious advantageof the above approach is that the resulting trajectory x is forcedto resemble those used as measurements in the PCA; this willbe even more true if we use just a subset of the most dominantprincipal component trajectories ei.

Following the extraction of the principal components, foreach cluster we then store the mean x and the principal com-ponents, which are then used as basis elements in the linearinterpolation algorithm described below.

D. Basis Selection and Linear Interpolation

Given starting and ending configurations qi = (qi(1),. . . , qi(n)) ∈ �n and qf = (qf(1), . . . , qf(n)) ∈ �n, respec-tively, for n-DOF robot system, the first order of businessis to select the appropriate basis elements. We use the fol-lowing distance, where q denotes the sample mean trajectoryfor a given cluster, and σi = (σi(1), . . . , σi(n)) and σf =(σf(1), . . . , σf(n)) denote the standard deviations for the start-ing and ending configurations in the given cluster:

D =n∑

k=1

∥∥∥∥qi(k) − qi(k)σi(k)

∥∥∥∥ +∥∥∥∥qf(k) − qf(k)

σf(k)

∥∥∥∥ . (11)

We choose the cluster that results in the smallest distance D; theprincipal components for this cluster then serve as the linearinterpolating basis functions. Other distance metrics are alsopossible; the above metric offers an intuitive means of takinginto account the statistical spread of the data, and is easilycomputed.

We now describe the linear interpolation procedure. Forconvenience, we introduce the following notation:

Γ = [PC1, . . . , PCk] ∈ �N×k (12)

α = [α1, . . . , αk]T ∈ �k (13)

Page 5: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2510 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

where k denotes the number of principal components usedas basis elements, and N denotes the number of points inthe discrete representation of the joint trajectory (that is, acontinuous-time trajectory x(t) is discretely represented as{x[0], x[1], . . . , x[N ]}).

For each joint i, the corresponding trajectory qi(t) is repre-sented in discrete-time as an N -dimensional vector p ∈ �N . pin turn is given as a linear combination of the basis elements(and the mean trajectory p)

p = p + Γα (14)

with the coefficients α chosen to satisfy the given boundaryconditions, and assuming k is sufficiently large and additionaldegrees of freedom are available, to minimize any number ofphysical criteria. Since our objective is to generate motionsin real-time, we avoid any criteria that involve a complicatedoptimization procedure. Instead, noting that the eigenvaluesreflect how much the corresponding principal componentsreflect the original data, we choose the coefficients α tominimize

k∑i=1

∥∥∥∥αi

λi

∥∥∥∥2

(15)

subject to a set of linear equality constraints of the form

Wα = b (16)

where the matrix W and vector b are specified by the boundaryconditions at the given starting and ending configurations. Asis well known, the above minimum norm problem admits theclosed-form solution

α = ΛWT(WΛWT)−1b (17)

where Λ = Diag(λ1, . . . , λk) ∈ �k×k. Since the componentsof W are the first or last elements of PCis, which are ortho-normal and linearly independent, the rank of W will not be lessthan k for a sufficiently large set of training motion cluster, sothat the solution to (17) always exists. Fast recursive algorithmsare also available for determining (17) without resorting tomatrix inversion.

The final issue is to determine the final time tf such thatthe resulting interpolated trajectory does not violate any of theactuator limit constraints. This can be formulated as a 1-Doptimization problem; given a candidate joint trajectory q(t),the required joint torques are calculated via computation of theinverse dynamics. If any of the peak joint torques exceeds theactuator limits, tf is then suitably decreased, and the procedurerepeated. This is essentially identical to the procedure fordetermining the smallest tf while avoiding actuator saturation inthe minimum torque motion case (Section III), and we adopt thesame line search procedure. We note that the inverse dynamicscalculations can be performed in real-time via any of the well-known recursive algorithms.

TABLE IAPPROXIMATE MASSES AND MOMENTS OF INERTIA FOR SA130

TABLE IIFEASIBLE JOINT SPACE AND TORQUE LIMITS

IV. CASE STUDY 1: A SIX-AXIS

INDUSTRIAL MANIPULATOR

To demonstrate both the computational feasibility and perfor-mance gains of our methodology, we perform simulation exper-iments for the SA130 six-axis industrial manipulator of Fig. 2.We use the approximate kinematic and inertial specificationslisted in Table I for our case study. The robot’s feasible jointspace and the torque limits are given in Table II.

A. Joint Space Partitioning

Partitioning the 6-D joint space into a grid, and generatingoptimal motions for arbitrary pairs of points on this grid, iscomputationally intractable. Extensive simulations on the otherhand have revealed that the effective inertia strongly affects theshape and nature of the optimal trajectories; generally, we haveobserved that minimum torque motions tend to first “fold in” toa posture that minimizes the robot’s effective inertia, moves thebase links, then “folds out” to the desired ending configuration.

The plots of Fig. 3 illustrate which joints have the greatestimpact on the overall inertia; the (Frobenius) norm of the inertiamatrix is plotted as a function of joint value for each of thesix joints (while fixing the remaining joints to some referencevalue). Similar plots are obtained for different reference values,and it is apparent that joints 3 and 5 have the greatest effect onthe inertia matrix norm.

Page 6: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

KIM AND PARK: FAST ROBOT MOTION GENERATION USING PRINCIPAL COMPONENTS 2511

Fig. 3. Inertia matrix norm versus joint value.

Hence, we construct a uniform grid over the 2-D spacedefined by joints 3 and 5, and determine dynamically optimalmotions for every possible pair of starting and ending configu-rations (the remaining joints 1, 2, 4, and 6 are arbitrarily fixedto 0.7 ∗ q

ifor the starting configuration, and 0.7 ∗ qi for the

ending configuration, where qi

and qi, respectively, denote thelower and upper joint limits for joint i.

B. Construction and Clustering of Motions

To generate the optimal input motions, a 10 × 10 grid wasconstructed over the q3−q5 feasible joint space, and optimalmotions determined over all possible starting and ending pairs.Excluding motions with identical starting and ending points,a total of 9900 minimum torque motions were generated.Each optimal motion was generated by first parameterizingeach joint trajectory as a B-spline, with four control pointsused. Since the first and last control points are determined bythe starting and ending configurations, the optimal trajectorywas determined by optimizing over the middle two controlpoints. Using the Davidon–Fletcher–Powell algorithm, andalso minimizing the final time tf to avoid actuator saturation,each trajectory optimization took on the order of 3 min on a2 GHz Intel Pentium IV computer.

The 9900 optimal motions are initially grouped into fourclusters, according to the signs of qf3−qi3 and qf5−qi5. Theneach trajectory within a given group is translated and normal-ized such that the starting point corresponds to the origin ofa 5-D unit sphere S5 in �6, and such that the endpoint lieson the surface of the sphere. Each trajectory is then uniformlysampled N times, and represented by this N -dimensional vec-tor. Standard clustering algorithms (e.g., K-means, mixture ofGaussians) are now applied to the normalized data, and the fourgroups further subdivided into clusters based on the shape prop-erties of the trajectories, resulting in a total of 15 clusters, witheach cluster containing enough number of motions for PCA.

C. Performance

We first assess the performance of our fast minimum torquemotions that manage to avoid actuator saturation by comparingthese trajectories to the corresponding minimum time motionsfor the same set of endpoint conditions. Because determin-ing minimum time point-to-point motions is in general com-putationally demanding and difficult (problems with actuatorchattering and convergence can occur in the general case), weinstead adopt the near-minimum time algorithm of Yang andSlotine [16], which produces trajectories quite close to theactual minimum time solution with less computational effort.The left plots of Fig. 4 display the joint trajectories for thenear-minimum time motions (solid lines) and the fast minimumtorque motions (dashed lines), while the right plots display thecorresponding joint torques.

As expected, the fast minimum torque motion (1.1 s) isslower than the near-minimum time motion (0.94 s), but theminimum torque motion consumes only about 15% of thetorque expended during the near-minimum time motion. Onecan witness considerable actuator chattering for the near-minimum time motion’s torque profile, particularly towardthe end of the motion. In contrast, the joint trajectories andtorque profiles of the fast minimum torque motions are con-siderably smoother than those of the near-minimum time mo-tions, with only one actuator approaching its prescribed torquelimit.

To assess the performance of our PCA-based interpolationalgorithm, we first construct an 8 × 8 grid over the q3−q5

feasible joint space, ensuring that none of the grid pointsoverlap with the 10 × 10 grid constructed earlier for the purposeof generating input motions. For every pair of starting andending configuration on this 8 × 8 grid (the remaining joints 1,2, 4, and 6 are arbitrarily fixed to 0.7 ∗ q

ifor the starting config-

uration, and 0.7 ∗ qi for the ending configuration), trajectoriesare generated using our PCA interpolation algorithm as well

Page 7: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2512 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

Fig. 4. Near-minimum time and fast minimum torque joint trajectories and corresponding joint torques.

TABLE IIIAVERAGE PERFORMANCE OF INTERPOLATED MOTIONS

as the minimum torque-minimum time dynamic optimizationroutine.

We also investigate the effects of the number of clusters onthe overall performance of our algorithm; the simulation resultsare shown in Table III. The first column shows the overalltorque consumption, as a percentage of the torque consumptionfor the optimal trajectory, for linearly interpolated motions us-ing the specified number of principal components. The averageobjective function value for the optimal motions is 0.5516; theinterpolated motions generated using eight principal compo-nents consume on average about 2% more than the optimalmotions. This difference increases as the number of principalcomponents is decreased from eight to four. We also includefor comparison the case when no clustering is performed, andeight principal components are used.

The second column shows the final times for the interpolatedmotions, as a percentage of the final times for the optimalmotions, using the specified number of principal components.The average final time for the set of optimal motions is1.513 seconds; the interpolated motions using eight principalcomponents are approximately 0.23 s, or about 15.3%, slowerthan the optimal motions. As expected, the final time increasesas the number of principal components is decreased, and alsowhen no clustering is performed.

The left plot of Fig. 5 shows the best case joint trajectories, inthe sense of the interpolated motions being the closest to the op-timal motions for the same starting and ending configurations.Solid lines indicate the interpolated motions, while the optimalmotions are indicated by dotted lines. There is a difference of0.1 s in the final time between the interpolated and optimaltrajectories. Taking this difference into account, it is apparentthat the trajectory shapes are very similar. The right plot ofFig. 5 shows the worst case joint trajectories. The final timefor the optimal motion is 1.55 s, whereas for the interpolatedmotion it is 2.45 s.

Fig. 6 is a histogram of the average difference (in radians)between the control point values for the interpolated and op-timal motions (the trajectories in both cases are parameterizedas B-spline curves with four control points). As evident fromthe histogram, in nearly half the cases, the average differencebetween the optimal and interpolated trajectories is less than0.2 rad; the worst case trajectory shown in the right plot ofFig. 5 corresponds to a very limited occurrence.

These results suggest that the interpolated motions are quiteclose to the optimal motions, and furthermore can be obtainedin real-time; the computation time for the linear interpolationis negligible, while determination of the final time tf via linesearch (to ensure that torque limits are not exceeded) took onthe order of one second, assuming a sampling frequency of40 Hz for our trajectories.

V. CASE STUDY 2: A WHEELED MOBILE ROBOT

For our second case study, we consider a wheeled differ-ential drive robot and apply our principal component-basedframework to generate torque-efficient motions in real-time.There is extensive literature on time-optimal motion generation

Page 8: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

KIM AND PARK: FAST ROBOT MOTION GENERATION USING PRINCIPAL COMPONENTS 2513

Fig. 5. Best and worst case joint trajectories.

Fig. 6. Histogram of average difference between interpolated and optimaltrajectories.

for such robots that take account of only the kinematics[17]–[21]. Power consumption becomes even more critical formobile robots powered by onboard batteries, and considerationof the dynamics is essential in this regard. Because of spacelimitations we restrict our results to the case when the finaltime tf is provided as input, and the final configuration of therobot is a prescribed distance from the starting configuration.In principle, however, the same methodology described for theindustrial manipulator can also be applied. Moreover, as shownin the minimum torque motions with various final times from 1to 3 s in Fig. 7, the final times do not have a significant effecton the overall shape of the minimum torque motions.

Assuming the robot is moving in the x−y plane, the headingdirection θ is given by θ = arctan(y/x), and the dynamicsequations are of the form

τr =12RM

xx + yy√x2 + y2

+RI

2Bθ (18)

τl =12RM

xx + yy√x2 + y2

− RI

2Bθ (19)

where τr and τl denote the torques applied to the right andleft wheels, respectively, R denotes the wheel radius, M is therobot mass, I denotes the inertia with respect to the verticalz-axis, and B denotes the wheelbase. For the purposes of oursimulation we assume all scalar parameters to have a value of 1.Following [19], we further assume that the robot starts at theorigin with θ = 0 (i.e., headed in the x-direction), and moves toarbitrary points on the positive quadrant of the unit circle, witha user-specified final heading angle θ. Under these assumptions,the final configuration of the robot can be described as χ =(φ, θ) ∈ Φ = [0, π/2) × [0, 2π), where (r, φ) denotes the polarcoordinate representation of the x−y plane.

To generate and classify the learning set of trajectories, wefirst randomly generate trajectories with various final configu-rations, and identify the χi at which the geometric shape of thetrajectories change. Similar to the findings reported in [19], wefind that the trajectory shapes change dramatically around thelines

θ = φ, θ =π

2and θ = φ + π. (20)

We remark that other segmentations are possible, and depend toa large extent on the choice of kinematic and inertial parameters

Page 9: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2514 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

Fig. 7. Some minimum torque wheeled robot motions for various final times.

Fig. 8. Partitioning the configuration space into six regions: the x-axis andy-axis denote φ and θ, respectively.

of the robot, but to first order, we can verify the validity ofthe partitioning in [19] even when the dynamics are taken intoaccount.

Based on the above preprocessing, the configuration space Φis segmented into six regions, resulting in six distinct classes oftrajectories. Fig. 8 shows the partitioned configuration space,while Fig. 9 displays the average trajectories for each class.

For each of the six partitioned regions of Φ, we select 100uniformly distributed points to serve as final configurations.

Fig. 9. Average trajectories for each of the six classes.

Minimum torque motions are then generated using our previousalgorithm (but with tf assumed fixed) for each of the 100 finalconfigurations, leading to a total of 600 learning trajectoriesdistributed throughout Φ. As before, we extract the principalcomponents for each partition and use them as appropriateinterpolating basis functions.

Motion interpolation proceeds by first identifying whichof the six regions the given final mobile robot configuration

Page 10: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

KIM AND PARK: FAST ROBOT MOTION GENERATION USING PRINCIPAL COMPONENTS 2515

Fig. 10. Best and worst case paths for mobile robot: dotted line represents the optimal trajectory and solid line represents the interpolated trajectory.

corresponds to, and applying the appropriate set of basis func-tions in the interpolation algorithm. To numerically assess howclose our linearly interpolated trajectories are to the actual mini-mum torque trajectories, we consider 2100 arbitrarily generatedfinal configurations; for each final configuration we generateboth the linear interpolated and minimum torque trajectories.Comparing the normalized ratio of the objective function val-ues for the interpolated and minimum torque trajectories, andaveraging over the 2100 configurations, we obtain a ratio of

Avg(

JPCA − Jopt

Jopt

)= 0.3122

implying that the interpolated trajectories consume approxi-mately 30% more torque than the minimum torque trajectories.

Fig. 10 shows the best case path, in which the interpolatedpath is closest to the optimal path; the dotted line is the optimalpath for the given final configuration, while the solid linerepresents the interpolated path. Fig. 10 shows the worst caseinterpolated motion, which shows a large difference betweenthe interpolated and optimal paths. Comparing Fig. 9 andFig. 10, it is obvious that the optimal motion should be includedin class 4. But in this case, the path has been interpolated withthe basis function of class 5 according to the final configuration.One simple solution is to interpolate two paths using basisfunctions for each class, and to choose the path that consumesless torque; interpolation times are negligible, and the inversedynamics can also be computed very efficiently, so that real-time trajectory generation is still feasible.

VI. CONCLUSION

This paper has presented a method for generating fast,torque-efficient motions for general robot systems. The com-putational costs of obtaining fast, minimum torque motionsmake real-time solutions prohibitively exclusive. To overcomethis, we instead rely on a means of cleverly selecting a set ofinterpolating vectors such that, when used as basis vectors togenerate point-to-point motions, the resulting motion closelyresembles fast, minimum torque motions. We achieve this by

a priori computation of a representative sample of fast, mini-mum torque motions, and organizing the training motion datainto clusters; the basis functions are then extracted via a PCA.This methodology is illustrated in detail for a specific six-axis industrial manipulator and a wheeled mobile robot. Whilethe set-up phase can be somewhat laborious, the ability togenerate fast, torque-efficient motions in real-time can be ex-tremely useful for industrial applications. For more efficientimplementation, reducing the size of the training motion datais the intriguing and practical issue.

We remark that the methodology illustrated here is a verygeneral one; the fast, minimum torque motions used can bereplaced with, for example, optimal motions that take intoaccount motor dynamics, or any other set of motions deemeddesirable for the application.

REFERENCES

[1] J. E. Bobrow, B. Martin, G. Sohl, E. C. Wang, J. G. Kim, and F. C. Park,“Optimal robot motions for physical criteria,” J. Robot. Syst., vol. 18,no. 12, pp. 785–795, Dec. 2001.

[2] S. H. Lee, J. G. Kim, F. C. Park, M. S. Kim, and J. E. Bobrow, “Newton-type algorithms for dynamics-based robot movement optimization,” IEEETrans. Robot., vol. 21, no. 4, pp. 657–667, Aug. 2005.

[3] G. A. Sohl and J. E. Bobrow, “Optimal motions for underactuated ma-nipulators,” in Proc. ASME Des. Tech. Conf., Las Vegas, NV, Sep. 1999,pp. 519–528.

[4] J. E. Bobrow, S. Dubowsky, and J. S. Gibson, “Time-optimal control ofrobotic manipulators along a specified path,” Int. J. Robot. Res., vol. 4,no. 3, pp. 3–17, 1985.

[5] Z. Shiller and S. Dubowsky, “On computing the global time optimal mo-tions of robotic manipulators in the presence of obstacles,” IEEE Trans.Robot. Autom., vol. 7, no. 6, pp. 785–797, Dec. 1991.

[6] S. J. Kim, D. S. Choi, and I. J. Ha, “A comparison principle for state-constrained differential inequalities and its application to time-optimalcontrol,” IEEE Trans. Autom. Control, vol. 50, no. 7, pp. 967–983,Jul. 2005.

[7] T. N. Chang, B. Cheng, and P. Sriwilaijaroen, “Motion control firmwarefor high-speed robotic systems,” IEEE Trans. Ind. Electron., vol. 53, no. 5,pp. 1713–1722, Oct. 2006.

[8] R. Dubey, P. Agarwal, and M. K. Vasantha, “Programmable logic devicesfor motion control—A review,” IEEE Trans. Ind. Electron., vol. 54, no. 1,pp. 559–566, Feb. 2007.

[9] G. Cheng, K. Peng, B. M. Chen, and T. H. Lee, “Improving transientperformance in tracking general references using composite nonlinearfeedback control and its application to high-speed XY—Table positioningmechanism,” IEEE Trans. Ind. Electron., vol. 54, no. 2, pp. 1039–1051,Apr. 2007.

Page 11: Fast Robot Motion Generation Using Principal Components: …robotics.snu.ac.kr/fcp/files/_pdf_files_publications/... · 2016. 1. 20. · 2506 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS,

2516 IEEE TRANSACTIONS ON INDUSTRIAL ELECTRONICS, VOL. 55, NO. 6, JUNE 2008

[10] X. Wei, J. Wang, and Z. X. Yang, “Robust smooth-trajectory control ofnonlinear servo systems based on neural networks,” IEEE Trans. Ind.Electron., vol. 54, no. 1, pp. 208–217, Feb. 2007.

[11] T. D. Sanger, “Human arm movements described by a low-dimensionalsuperposition of principal components,” J. Neurosci., vol. 20, no. 3,pp. 1066–1072, Feb. 2000.

[12] F. C. Park, B. K. Lim, and S. K. Ra, “Movement primitives, prin-cipal component analysis, and the efficient generation of naturalmotions,” in Proc. Int. Conf. Robot. Autom., Barcelona, Spain, Apr. 2005,pp. 4630–4635.

[13] O. C. Jenkins and M. Mataric, “Deriving action and behavior primitivesfrom human motion data,” in Proc. IEEE Int. Conf. Intell. Robots Syst.,Sep. 2002, vol. 3, pp. 2551–2556.

[14] R. O. Duda, P. E. Hart, and D. G. Stork, Pattern Classification.New York: Wiley, 2001.

[15] I. Jollife, Principal Component Analysis. New York: Springer-Verlag,1986.

[16] H. S. Yang and J. E. Slotine, “Fast algorithms for near-minimum-timecontrol of robot manipulators,” Int. J. Robot. Res., vol. 13, no. 6, pp. 521–532, 1994.

[17] J. A. Reeds and R. A. Shepp, “Optimal paths for a car that goes bothforward and backward,” Pac. J. Math., vol. 145, no. 2, pp. 367–393, 1990.

[18] L. E. Dubins, “On curves of minimal length with a constraint on averagecurvature, and with prescribed initial and terminal positions and tangents,”Amer. J. Math., vol. 79, no. 3, pp. 497–516, Jul. 1957.

[19] D. J. Balkcom and M. T. Mason, “Geometric construction of time optimaltrajectories for differential drive robots,” in Proc. Workshop AlgorithmicFound. Robot., 2000.

[20] J. A. Reister and F. G. Pin, “Time-optimal trajectories for mobile robotswith two independently driven wheels,” Int. J. Robot. Res., vol. 13, no. 1,pp. 38–54, Feb. 1994.

[21] S. Katsura and K. Ohishi, “Modal system design of multirobot systemsby interaction mode control,” IEEE Trans. Ind. Electron., vol. 54, no. 3,pp. 1537–1546, Jun. 2007.

Soonkyum Kim received the B.S. and M.S. degreesin mechanical engineering from Seoul National Uni-versity, Seoul, Korea, in 2002 and 2006, respec-tively, where he is currently working toward thePh.D. degree at the GRASP Laboratory, Universityof Pennsylvania.

Frank Chongwoo Park received the B.S. degreein electrical engineering and computer science fromMIT in 1985, and the Ph.D. degree in applied math-ematics from Harvard University in 1991.

From 1991 to 1994, he was an Assistant Profes-sor of mechanical engineering at the University ofCalifornia, Irvine. Since 1995, he has been with theSchool of Mechanical and Aerospace Engineeringat Seoul National University, Seoul, Korea, wherehe is currently Professor. He spent the 2001–2002academic year as a Visiting Professor at the Courant

Institute of Mathematical Sciences at New York University, NY. His researchinterests are in robotics, mathematical systems theory, and related areas ofapplied mathematics.

Dr. Park is a 2007–2008 IEEE Robotics and Automation Society Dis-tinguished Lecturer, is a Senior Editor of the IEEE TRANSACTIONS ON

ROBOTICS, and also is a Part Editor for the forthcoming Springer Handbookof Robotics.