Technical Report No. VSR-04.02

End-of-Year Technical Report

For Project

Digital Human Modeling and Virtual Reality for FCS

                       

CHAPTER 4

UPPER BODY MOTION PREDICTION

By

Kimberly Farrell

Dated: October 25, 2004

CONTRACT/PR NO. DAAE07-03-D-L003/0001

Project Title: Digital Human Modeling and Virtual Reality for FCS

TABLE OF CONTENTS

Abstract   3

4.1 Introduction   4

4.1.1        Review of the Literature and Motivation  4

4.1.2        Current Limitations and Challenges  5

4.1.3        Overview of the Report 5

4.2 Overview of the Approach   6

4.2.1        Kinematic Modeling  6

4.2.2        Denavit-Hartenberg Method  7

4.2.3        Posture Prediction  8

4.2.4        B-spline Curves  8

4.2.5        Optimization Formulation  9

4.3 15 DOF Motion Prediction   11

4.3.1        DH Model 11

4.3.2        Joint Trajectory Formulation  12

4.3.3        Optimization Algorithm   13

4.3.4        Results  14

4.4 21 DOF Motion Prediction   15

4.4.1        DH Model 15

4.4.2        Joint Trajectory Formulation  17

4.4.3        Optimization Algorithm   18

4.4.4        Results  18

4.5 Alternate Formulations   20

4.5.1        Polynomial Formulation  20

4.5.2        Optimization Algorithm   21

4.5.3        Results  22

4.6 Discussion   24

4.7 REFERENCES   26

[c1] 
Abstract

Predicting human motion presents a challenge that requires calculating the movement of a kinematic human model over time.  Much of the work to date towards solving this challenge studies limited degrees of freedom and solves systems of linear equations, thereby restricting the extensibility of these approaches to high degree of freedom models.  The following work extends a more recent method of upper body motion prediction, which uses b-spline curves to represent joint trajectories and optimizes the b-spline coefficients (Mi, 2004).  This study applies the method to additional degrees of freedom and investigates an improved optimization approach to increase realism and reduce computational time.

4.1 Introduction

Simulating human motion is becoming significant area of research as humanoid robots and digital humans become increasingly prevalent.  Despite considerable work in this area, achieving results in near real-time on a realistic, high degree of freedom (DOF) model continues to be a challenge.  Consequently, there remains a need to further develop motion prediction algorithms that are both applicable to robust human models and relatively computationally inexpensive.

The standing challenge is as follows:  Given a high DOF human model and a Cartesian path for one or more end-effectors, compute realistic, mathematically-driven human motion for each DOF. Although the field of robotics routinely investigates similar challenges, the typical robotic manipulator requires neither a large number of degrees of freedom nor a resulting motion that is realistic to humans.  Nevertheless, the methods that have emerged from robotics towards solving similar problems provide the basis for methods appropriate to human motion prediction.  For instance, the work of Chen (1991) using b-spline curves as joint trajectories provides solid ground for further work by Mi (2004), who modified the approach to optimize for a higher DOF model.  This report extends the optimization-based method of Mi (2004) to a 21 DOF model and discusses modification of the b-spline curve to improve performance.

Optimization-based methods have proven to be a successful approach to predicting static postures in real-time for a high DOF human kinematic model (Mi et al, 2002; Farrell and Marler, 2004).  Posture prediction involves taking a high DOF human model and computing joint angles, given a static point as input.  Optimization-based methods for motion prediction use many parallel concepts to posture prediction extended over a series of discrete time instants.  The following report draws upon this parallel to present computationally more efficient optimization for motion prediction.

4.1.1        Review of the Literature and Motivation

There are currently two distinct approaches to predicting human motion resulting from the fields of robotics and human factors simulation.  Human factors simulation has motivated data-based motion prediction methods, which rely on extensive collections of motion capture data that are statistically analyzed to form predictive models (Faraway, 2003).  Although these methods allow statistically realistic human motion prediction in real-time, applying them requires a diverse motion capture database specific to the particular motion of interest.  Hence, constraining the end-effector to a path necessitates a database of motion for every path, rendering the method infeasible for limited studies.

Alternatively, Chen (1991) introduces an optimization-based method using b-spline curves to predict general robotic motion.  This method chooses to calculate human motion by optimizing the coefficients of the b-spline curves that represent joint trajectories.  These approaches thereby provide a mathematical formulation applicable to novel motions, for which motion capture databases might not exist.  Lo et al (2002) extend the method to a ten DOF human model, using a function of joint torque to minimize the result of the optimization.  However, this method uses systems of linear equations to solve for joint angles and simultaneously incorporate initial and final velocities, thus increasing the computational load and restricting application to low DOF models.  Mi (2004) presents a slightly different method using optimization objectives and constraints that are functions of joint angles only and thus eliminates the need to solve systems of equations.  This formulation successfully reduces the problem to achieve near real-time results.

For realistic human motion on a high DOF model, both the data-based approaches and the optimization-based approaches provide a starting point for sufficiently fast simulations.  However, the problem in discussion restricts the end-effector to a given Cartesian path.  In order eliminate the need to collect extensive motion capture data and in order to control the minimum allowable error, optimization-based approaches provide the basis for methods in this report.

4.1.2        Current Limitations and Challenges

Thus far, the application of optimization-based motion prediction has been restricted to no more than 15 degrees of freedom.  However, a higher DOF human kinematic model can result in static postures that are both more functional and more realistic (Farrell and Marler, 2004).  Since motion prediction is not only closely related to posture prediction but also dependent on it for the calculation of the final posture, development of a higher DOF model is necessary for more realistic motion.  Therefore, the current method must be modified to allow efficient computation given a more complex kinematic model.

Furthermore, the current implementation of motion prediction uses the commercial optimization software called Design Optimization Toolkit (DOT), which applies sequential quadratic programming (Vanderplaats, 1987).  A recent study (Farrell and Marler, 2004) showed that this software consistently results in constraint violations for posture prediction, making it necessary to model constraints as heavily weighted objectives, and concluded that this was negatively reflected in the results.  Similarly, the current use of DOT for motion prediction forces the constraints to be modeled as objectives.  It is crucial to the results to find an optimization formulation that can treat the constraints and objectives independently.

In any optimization formulation, the accuracy of the results depends heavily on the choice of objective function.  The current motion prediction algorithm uses a time-independent objective summed over discrete time instants along the motion.  Alternate approaches to consider include multi-objective optimization methods to combine the objective values from several time instants or time-dependent objective functions, such as torque (see Chapter 3).  Although this could have a substantial effect on the solution, further discussion is beyond the scope of this chapter.

4.1.3        Overview of the Report

This report first reviews the current implementation, then goes on to give an overview of the modifications to the approach.  It is necessary to then describe a high DOF human kinematic model along with an overview of the Denavit-Hartenberg method (DH-method), a common method for describing transformations in a linked kinematic chain.  A review of posture prediction, as well as b-spline curves and a formulation for representing joint trajectories follows.  The optimization problem is then defined for the general motion prediction problem, and a brief discussion of the current implementation applied to a 15 DOF model leads to an argument for a more extensive model.  Modifications to the optimization are introduced as a means of improving computational efficiency, and the resulting formulation is implemented on a 21 DOF model.  Lastly, this report investigates alternative representations of joint trajectories, and the results of the entire study are summarized.

4.2 Overview of the Approach

The current implementation of optimization-based motion prediction executes the algorithm of Mi (2004).  The method takes a Cartesian path for the end-effector of a 15 DOF model over the duration of the motion.  The initial and final angles for each joint can be determined by running a posture prediction algorithm for the first time instant on the path and the last time instant on the path respectively.  The b-spline curves that represent joint trajectories must be formulated such that they interpolate the endpoints, in this case the initial and final joint angles.  The coefficients to these b-spline curves provide the design variables for optimization.  This section overviews kinematic modeling, the DH-method used to describe transformations, a robust posture prediction algorithm, b-spline curves as joint trajectories, and the general optimization formulation.

4.2.1        Kinematic Modeling

 

Figure 4.1: General kinematic system

For the purpose of representing kinematic motion, a human body can be represented by a series of links.  In this respect, modeling a human closely parallels modeling a high DOF robotic manipulator.  Accordingly, a model incorporating the torso, spine, shoulders, and arms can characterize human motion by using generalized coordinates qi (Figure 4.1) to represent joint displacement (rotational or translational).  For a series of n degrees of freedom, a vector q Î Rn of n generalized coordinates represents a posture.  Figure 4.1 shows the association between each generalized coordinate qi and a local coordinate system.  Where qi represents the ith joint angle locally, the transformations of all preceding local coordinate systems can be used to calculate the global position and orientation of that joint.  The end-effector is the point of interest, the endpoint in a series of links such as an arm.  Its Cartesian position x(q) Î R3 is a function of the generalized coordinates qi in terms of the global coordinate system.  In terms of motion prediction, it is necessary to compute the Cartesian position x(q) of the end-effector in order to constrain it to the given path.  The DH method, described below, is the current means to calculate x(q).

4.2.2        Denavit-Hartenberg Method

The DH method (Denavit and Hartenberg, 1955) is an approach widely used for modeling human biomechanics, kinematics, and dynamics (Jung et al, 1995; Abdel-Malek et al, 2001; Yang et al, 2003).  Given a series of links in a kinematic chain, this method provides a way to determine the configuration of link i in terms of link (i–1).  The transformations between the local coordinate systems of adjacent links are used to represent the displacement of a joint with respect to the previous joint (Figure 4.2).  Calculating the position vector of the end-effector in Cartesian space is reduced to multiplication of n transformation matrices for an n DOF kinematic chain.

Figure 4.2: Parameters for the DH method

This motion prediction study uses the DH method to describe a kinematic chain from the waist to the hand.  Developing this model involves embedding local frames at each DOF, where the ith z-axis represents axis of motion for the (i+1)th DOF and the ith x-axis is perpendicular to the (i-1)th z-axis as well as the ith.  The transformation matrix i-1Ti relates position and orientation in the ith frame to the (i-1)th frame.  It is expressed in terms of the angle θi from xi to xi-1 about zi-1, the distance di from xi to xi-1 along zi-1, the angle αi from zi to zi-1 about xi, and the distance ai from zi to zi-1 along xi.  These values are shown in Figure 4.2, where qi+1 is the displacement corresponding to frame i.  The global position vector x(q) of the end-effector is expressed in terms of the transformations i-1Ti and given by:

                                                                                                      

                                        

where xn is the position of the end-effector with respect to the nth frame.  Note that displacement of the (i+1)th degree-of-freedom, which corresponds to the ith coordinate frame, changes the value of θi for a rotation and the value of di for a translation.

4.2.3        Posture Prediction

Posture prediction involves determining an optimal set of generalized coordinates qi such that the resulting posture reaches a given target point.  Currently, this is accomplished by way of an optimization-based approach that minimizes human performance measures such as joint displacement or discomfort (see Chapter 2).  In order to calculate the joint trajectories in motion prediction, the initial and final value for each joint qi must be known.  Given a Cartesian path for the end-effector, these values are determined by running posture prediction for both the initial and final points along the path (Figure 4.3).

Figure 4.3: Posture predicted using initial and final points on the Cartesian path

4.2.4        B-spline Curves

Motion prediction involves finding joint trajectories for each DOF in a kinematic model.  Chen (1991) describes a formulation that uses b-spline curves to represent these trajectories.  (Note that throughout this report, the term “b-spline curve” refers to a linear combination of b-spline basis functions.)  B-spline curves are an ideal choice because they can be chosen to allow continuity, differentiability, and endpoint interpolation.  Furthermore, b-spline curves give local control; hence, changing one coefficient effects only a small portion of the curve.  This is desirable when using these coefficients as design variables in an optimization in order to shape the joint trajectory.

The pth degree b-spline curve C(u) is a linear combination of pth degree basis functions Nk,p(u), defined as follows:

                                                                                 

where   ,         

and      

           

Here the curve has n+1 coefficients Pk (0 ≤ kn).   The vector U = {u0,...,um} is a non-decreasing sequence of real numbers called the knot vector; each ui is a knot.  The number of knots m+1, the number of coefficients n+1, and the degree p are related by:

                                                               m = n+p+1                                                      

For calculation of joint acceleration, the joint trajectories must be at least twice differentiable; thus, it is necessary to use at least a third degree b-spline curve.  Furthermore, using a knot vector that begins and ends with multiplicity p+1 will ensure that the joint trajectories interpolate the initial and final joint values.  Hence, the joint trajectories are defined by:

                                                                                           

where qi is the ith joint trajectory, { P0(i),  P1(i),.., Pn(i) } is the unknown coefficient vector for qi, and 1 ≤ inDOF (where nDOF is the number of degrees of freedom).  Hence, there are (n+1)*(nDOF) coefficients to determine.

Lastly, note that using b-spline curves gives a result with normalized time between zero and one second.  The resulting motion can be scaled to longer durations.

4.2.5        Optimization Formulation

The optimum motion along a path, given by a set of joint trajectories, is determined by solving the following optimization problem:

Find: q(u) = { qi(u) | 1 ≤ inDOF }                                           

to minimize: Discomfort, etc.

subject to:

|| xend-eff( q(tj) ) – xpath( tj ) || 2 ≤ ε          (distance to path)

and       qiLowerPk(i)  qiUpper                          (joint limits)

For the problem in , the feasible space is defined as the set of all solutions q(u) for which every constraint is satisfied.

Design Variables

As previously discussed, the design variables are the (n+1)*(nDOF) coefficients, { P0(i),  P1(i),.., Pn(i) } for 1 ≤ inDOF.  These coefficients shape the b-spline curve into optimal joint trajectories.  The resulting curve plots joint values (radians) versus time (seconds).  The optimization requires an “initial guess” for the design variables.  In this case, the coefficients for the ith joint are evenly spaced between the initial joint value qi init and the final joint value qi final.  Hence, the initial guess for qi(u) becomes:

                                                                         

where there are n+1 coefficients and 0 ≤ kn.  This guess satisfies the joint limits as long as the initial and final joint values also satisfy joint limits.  However, it does not necessarily satisfy the distance constraint.

Constraints

The first constraint in is the distance constraint, which requires that the end-effector remain in contact with the given Cartesian path.  Here the distance-squared between the end-effector and discretized points along the path must be less than ε, a small positive number that approximates zero.  In order to calculate the Cartesian position of the end-effector at a given time tj, the posture q(tj) = { qi(tj) | 1 ≤ inDOF } is calculated using , then the DH method in is used to find xend-eff( q(tj) ).

The remaining constraints ascertain that each curve qi(u) lies between the upper and lower limits for that joint.  By property of b-spline curves, restricting every coefficient Pk(i) to lie within the joint limits will guarantee that the entire curve qi(u) lies within the joint limits.  Enforcing these constraints helps ensure that the algorithm does not result in an unrealistic motion so as to stay on the given path.

Objectives

Motion prediction seeks to find a realistic human motion by optimizing one or a combination of human performance measures such as discomfort.  Discomfort refers to the displacement of the joints from a neutral posture (Figure 4.4).  This neutral posture is selected to be a relatively comfortable posture, typically a standing position with the arms at the sides.   The motion prediction algorithm presented by Mi (2004) uses discomfort summed over discrete time instants along the motion, given by:

                                                           

where nTIME is the number of discretized points along the path and qiN is the neutral position of the ith joint.  The assigned weight wi is included as a means to give importance to joints that contribute more significantly to discomfort.

Figure 4.4: Discomfort is defined using difference from a neutral posture

As mentioned earlier, alternate approaches include multi-objective optimization methods or time-dependent objectives, such as joint torque (see Chapter 3).  Consideration of these alternatives could have a significant effect on the realism of the resulting motion, but it is beyond the scope of this chapter.

4.3 15 DOF Motion Prediction

The current 15 DOF model provides a simple example of optimization-based motion prediction.  Although a higher DOF model has the potential to improve results, it is useful to discuss the current model as a starting point and basis for comparison.

4.3.1        DH Model

A 15 DOF kinematic chain for the upper torso and right arm was developed using the DH method (Figure 4.5).  This model combines rotational and translational DOFs to estimate human joint movements.  The distances Li between joints define the transformation matrices of .  These values are considered input to the motion prediction routine.  They can therefore be varied to correspond with specific anthropometric data.  For the purpose of testing, reasonable values of Li are determined by inspection.

Figure 4.5: Detailed 15 DOF model

Since the discomfort objective depends on a neutral posture, this 15 DOF must have a defined neutral posture qN = { qiN  | 1 ≤ inDOF }.  Currently, the chosen neutral posture is a standing position with the arms at the sides.  The vector qN is then defined as q10N  = 90.0,  q13N  =  –90.0, and qiN  = 0 for all other i, 1 ≤ inDOF.  Note that any qi is measured with respect to the posture in Figure 4.5 and corresponds to the zi-1 axis.  Furthermore, the positions of the target and end-effector must be given in terms of a common coordinate system.  For this purpose, a global coordinate system is chosen to correspond to the zeroth coordinate frame of the model.  Hence, the global position (0,0,0) is located at the center of the torso.  The end-effector for this model is a point on the thumb given by the local position (L8, –L9, 0) relative to the last coordinate frame.

4.3.2        Joint Trajectory Formulation

In order to interpolate the initial and final values, the b-spline curves must use a knot vector that begins and ends with knots of multiplicity p+1, where p is the degree of the curve.  Since the joint trajectory b-spline curves were chosen to be of third degree, the knot vector must begin and end with knots of multiplicity four.  The knot vector is taken to be U = {0.0, 0.0, 0.0, 0.0, 0.1, 0.2,..., 0.9, 1.0, 1.0, 1.0, 1.0}, for a total of 17 knots.  Hence, the number of knots m+1 = 17 and consequently m = 16.  By , the number of coefficients n+1 = mp = 13.  The joint trajectory formulation in therefore becomes:

                                                                             

Note that the first and last coefficients are equal to the initial and final values; therefore, there are only 13 – 1 – 1 = 11 coefficients per curve.  Thus, there will be (11)*(nDOF) = 11*15 = 165 design variables for optimization.

4.3.3        Optimization Algorithm

As mentioned previously, the current implementation uses DOT, commercial optimization software (Vanderplaats, 1987).  However, using this software to directly solve consistently results in a violated distance constraint.  In an effort to compensate for this, the distance constraint is combined with the objective and given a large weighting factor.  This forms following unconstrained objective:

                                       

Furthermore, additional terms to control the shape of the resulting joint trajectory are added to the objective function.  The first is a term to control the inconsistency of the curve; that is, to prevent joint curves that produce back and forth movements.  This inconsistency is mathematically defined by:

                             

where  

and      

The second is a term to ensure smooth joint movement by minimizing the second derivative of the joint trajectory.  The nonsmoothness added to the objective is given by:

                                                                             

            Finally, the objective function for the unconstrained optimization problem becomes:

                                          

Mi (2004) describes the objective terms and in greater detail.

The limits for the generalized coordinates qi are determined based on rough estimates and observation.  However, these joint limits are input parameters to the optimization and can correspond to any anthropometric specifications.  The values for the weights in are determined based on trial-and-error experiments.

4.3.4        Results

Applying the current motion prediction algorithm to the 15 DOF model results in the motion of Figures 4.6 and 4.7.  The motion was generated using an initial posture with zero rotation and an approximate target point of (41, -55, 32).  Since the minimum jerk model is well accepted for point-to-point motion (Flash and Hogan, 1985), the end-effector follows a minimum jerk Cartesian path for this example.  The optimization used 43 discretized Cartesian points along the path to constrain the end-effector.  The five screenshots show the instantaneous postures at t = 0.0, 0.25, 0.5, 0.75, and 1.0 seconds.  The calculation took about 17 seconds on a 1.8GHz Pentium4 CPU with 512MB RAM.

Figure 4.6: Motion prediction on 15 DOF model at five time instants

Figure 4.7: Motion prediction on 15 DOF model at five instants, overlapped

Figure 4.8 (below) provides the resulting joint trajectories from the motion prediction.  By inspecting the curve, it is apparent that the joint movements are smooth and continuous; they are devoid of abrupt changes in velocity or acceleration.  However, note that the initial and final velocities are not necessarily zero.  For an isolated point-to-point movement, restricting the initial and final velocities is intuitively desirable.

Figure 4.8: Joint trajectories predicted by motion prediction on a 15 DOF model

Furthermore, this motion is slightly unnatural, with excessive torso movement.  As discussed earlier, it was necessary to combine the distance constraint with the objective function because the DOT doesn’t handle the constrained optimization well.  In fact, the optimization yields similar results with this target point when the objective terms are omitted entirely.  This suggests that the distance term in dominates the objective.  However, if the multiplier (1000) is reduced to rectify this problem, then the constraint is not adequately satisfied.  Conceptually and practically, the objective needs to be treated independently.  Furthermore, using a higher DOF model that allows more realistic movement in the upper torso and clavicle will improve the results.

4.4 21 DOF Motion Prediction

            In order to improve visualization of natural human motion on a skinned model, a more extensive 21 DOF model is developed.  More degrees of freedom in the spine allow greater flexibility in the upper torso.  Also, replacing the translational joints at the shoulder with rotational joints at the clavicle result in more realistic shoulder movement in a skinned model (Figure 4.10).

            In addition, the optimization is modified to use SNOPT (Gill et al, 2002) rather than DOT.  Although the SNOPT software also uses sequential quadratic programming, its treatment of constraints is more robust and it can therefore handle the constrained optimization problem of more adequately.

4.4.1        DH Model

The DH-method is applied to the 21 DOF model of the upper torso and right arm as illustrated in Figure 4.9.

Figure 4.9: Detailed 21 DOF model

The major improvements of the 15 DOF model include the increased number of degrees of freedom in the torso in addition to the replacement of translational DOFs in the shoulder with rotational DOFs in the clavicle.  The improved realism in the shoulder on a skinned human model is immediately verifiable.  Figure 10(a) shows the 15 DOF model with the shoulder translated and rotated.  Figure 10(b) shows the 21 DOF model with the corresponding rotations.  Furthermore, improved posture prediction results using this 21 DOF model have been shown by Farrell and Marler (2004).  Since posture prediction is used to find the final posture, using this 21 DOF model will improve the realism of the final posture in motion prediction as well.

 

(a)    (b)

Figure 4.10: (a) 15 DOF model with translation along z6 and rotation about z9

       (b) 21 DOF model with rotation about z12 and rotation about z14

To further improve the results, the neutral posture qN = { qiN  | 1 ≤ inDOF } is slightly modified.  Although it still represents a standing position with the arms at the sides, the arms are not forced to be rigidly straight, but instead have a small bending at the elbow, for instance.  The vector qN is thus defined as:

qN = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, –15, 20, 100, –10, –80, –35, 0, 0, 15 }

Note that any qi is measured with respect to the posture in Figure 4.9 and corresponds to the zi-1 axis.  Again, the global coordinate system is chosen to correspond to the zeroth coordinate frame of the model and the global position (0,0,0) is located at the center of the torso.  The end-effector for this model is a point on the middle finger given by the local position (d, 0, 0) relative to the last coordinate frame, where d is the distance along the x-axis of the last coordinate frame.

4.4.2        Joint Trajectory Formulation

The b-spline curves will continue to use a knot vector that begins and ends with knots of multiplicity p+1 in order to interpolate initial and final values of a degree p curve.  Hence, the knot vector must begin and end with knots of multiplicity four for a third degree curve.  In the new formulation, however, the number of coefficients will be variable so as to allow fewer design variables.  Thus, rather than defining a knot vector and finding the number of coefficients, the knot vector is instead defined by the number of coefficients and the degree of the curve.  The distinct elements of the knot vector are then evenly spaced.  The knot vector is therefore a function of the number of coefficients n+1 and the degree p+1, given by:

                                                                                                           

where  

For implementation on the 21 DOF model, eight coefficients (rather than 13) are used.  The resulting knot vector is U = {0.0, 0.0, 0.0, 0.0, 0.2, 0.4, 0.6, 0.8, 1.0, 1.0, 1.0, 1.0}, for a total of m+1 = (n+1) + (p+1) = 8 + 4 = 12 knots.  The joint trajectory formulation in therefore becomes:

                                                                                         

Note the initial and final velocities of the curve are restricted to zero.  This is possible by forcing the first two and last two coefficients to be equal.  Hence, the optimization need only optimize 8 – 2 – 2 = 4 coefficients for each joint trajectory.  The resulting number of design variables is (4)*(nDOF) = 4*21 = 84.

4.4.3        Optimization Algorithm

As previously mentioned, the new implementation uses SNOPT rather than DOT software.  This change is motivated by improved posture prediction results Farrell and Marler (2004) achieved by modeling the posture prediction as a constrained optimization problem rather than unconstrained.  Hence, the SNOPT implementation solves the problem of rather than that of .  Because the distance constraint is treated independently, it no longer controls the objective function.  In addition, the inconsistency and smoothness terms have been omitted so that the human performance measure solely drives the motion rather than adjustment terms.  The objective becomes:

                                                        

As before, the limits for the generalized coordinates qi are left as input.  For testing purposes, the limits determined based on rough estimates and observation.  The values for the weights in are determined based on trial-and-error experiments.

4.4.4        Results

Applying the current motion prediction algorithm to the 21 DOF model results in the motion of Figures 4.11 and 4.12.  The motion was generated using an initial posture with zero rotation and an approximate target point of (41, -55, 32), as it was for 15 DOF.  The end-effector follows the minimum jerk Cartesian path for this example as well.  The optimization used 43 discretized Cartesian points along the path to constrain the end-effector.  The five screenshots show the instantaneous postures at t = 0.0, 0.25, 0.5, 0.75, and 1.0 seconds.  The calculation took only 1.09 seconds on a 2.6GHz Pentium4 CPU with 512MB RAM.

Figure 4.11: Motion prediction on 21 DOF model at five time instants

Figure 4.12: Motion prediction on 21 DOF model at five instants, overlapped

Figure 4.13 (below) provides the resulting joint trajectories from the motion prediction.  By inspecting the curve, it is apparent that the joint movements are smooth and continuous.  Note also that the initial and final velocities are necessarily zero.  However, because there is no term controlling the inconsistency, some of the trajectories include a back and forth motion; this is apparent in the resulting motion.  Hence, either the inconsistency term should again be included in the objective, or, preferably, a human performance measure that includes minimizing joint acceleration or torque should be considered.

Figure 4.13: Joint trajectories predicted by motion prediction on a 21 DOF model

Motion prediction on the 21 DOF model results in more natural human movement on a skinned model.  This is particularly apparent because the excessive torso movement of Figure 4.7 is significantly reduced.  In addition, the computation time has been reduced from about 17 seconds on a 1.8GHz down to about one second on a 2.6GHz machine, which has less than twice the processing speed.  This is in part due to the reduction of design variables from 165 to 84, but also due to the constrained optimization formulation using SNOPT.

4.5 Alternate Formulations

Although using b-spline curves to represent joint trajectories has the advantage of local control, additional terms in the objective function are necessary to restrict the back and forth movement of joints.  Because adding such terms lessens the effect of the human performance measure, it is worth exploring alternate formulations to represent joint trajectories for which these additional terms are unnecessary.

4.5.1        Polynomial Formulation

Polynomial curves allow endpoint interpolation as well as control of the initial and final velocities and accelerations; they also are easily differentiable.  Therefore, they make a viable candidate for joint trajectory representation.  There are six restrictions on the resulting joint curve as follows: 

                                                                       

                                                                         

where Qii is the initial position of the ith DOF and Qfi is the final position of the ith DOF. The equations of refer to the initial position, velocity, and acceleration, while those in refer to final position, velocity, and acceleration.  Note that the time has again been normalized from zero to one second and can be scaled to longer durations.

            In order to sufficiently restrict and still allow one degree of freedom in the curve, a sixth degree polynomial is necessary.  In general form, the ith joint trajectory becomes:

                                                             

Applying the restrictions in and to gives:

                                                                                           

The final equation for ith joint trajectory is then:

                                     

The vector A = { ai | 1 ≤ inDOF } is the coefficient vector.  These coefficients are the design variables for optimization.

4.5.2        Optimization Algorithm

The optimum motion along a path using polynomial joint trajectories is determined by solving the following optimization problem:

Find: q(t) = { qi(t) | 1 ≤ inDOF }                                           

to minimize: Discomfort, etc.

subject to:

|| xend-eff( q(tj) ) – xpath( tj ) || 2 ≤ ε          (distance to path)

and       qiLowerqi(t) ≤ qiUpper                           (joint limits)

For the problem in , the feasible space is defined as the set of all solutions q(t) for which every constraint is satisfied.

Design Variables

As previously mentioned, the design variables are the nDOF coefficients defined by the vector A = { ai | 1 ≤ inDOF }.  These coefficients shape the polynomial curve into optimal joint trajectories.  The resulting curve plots joint values (radians) versus time (seconds).  The initial guess for the design variables in this case are ai = 0 for all i.  This results in a unique fifth degree curve that meets the restrictions outlined in and . This initial guess satisfies the joint limits as long as the initial and final joint values also satisfy joint limits.  However, it does not necessarily satisfy the distance constraint.

Constraints

The first constraint in is the distance constraint, which requires that the end-effector remain in contact with the given Cartesian path.  This constraint is the same regardless of the joint trajectory formulation.  The posture q(tj) = { qi(tj) | 1 ≤ inDOF } is calculated using rather than a b-spline curve, then the DH method in is used to find xend-eff( q(tj) ).

The remaining constraints ascertain that each curve qi(t) lies between the upper and lower limits for that joint.  This can be accomplished by ensuring that q