a least squares estimation approach to improving the precision...

21
Revision 0 14 Dec 1995 A least squares estimation approach to improving the precision of inverse dy- namics computations Arthur D. Kuo Department of Mechanical Engineering & Applied Mechanics University of Michigan Ann Arbor, Michigan U. S. A. 313/747-2505 [email protected] Note: This is a preprint of a manuscript submitted to the Journal of Biomechanical Engineering. If you wish to reference this paper, please contact the author or check http://www-personal.umich.edu/~artkuo. Abstract: The conventional method for computing inverse dynamics has several disadvantages. In the presence of noisy measurements, it produces poor results when less than a full complement of ground reaction forces is measured. It often results in a residual torque acting on the top-most body segment, and is especially sensitive to misalignment between the force plate and motion analysis coordinate frames. These difficulties may be overcome using a least squares estimation method, which tends to reject random noise in the measurements. The result is an estimate of the joint torques and joint angular accelerations which best match measured data. An error analysis makes it possible to predict error magnitudes for both conventional and least squares methods. A benchmark case is presented, which demonstrates reductions in joint torque errors on the order of 30%, for a wide range of noise levels on force plate and kinematics measurements. The method also is computationally fast and relatively ro- bust to missing force measurements and biases such as misalignment of coordinate frames. Nomenclature: n number of body segments N number of time steps x ci vector describing linear (translational) position of segment i ’s center of mass x ci , x ci estimated and measured values of x ci ˙ x ci , ˙ x ci , ˙ x ci actual, estimated, and measured linear velocity vectors ˙˙ x ci , ˙˙ x ci , ˙˙ x ci actual, estimated, and measured linear acceleration vectors φ i actual angular orientation of segment i (segment angle) φ i , φ i estimated and measured values of φ i ˙ φ i , ˙ φ i , ˙ φ i actual, estimated, and measured angular velocity vectors ˙˙ φ i , ˙˙ φ i , ˙˙ φ i actual, estimated, and measured angular acceleration vectors f i -1 intersegmental reaction force vector acting on segment i at joint i -1 f i , f i estimated and measured values of f i τ i -1 actual joint torque (moment of muscle force) applied on segment i at joint i -1 τ i , τ i estimated and measured values of τ i f 0 , τ 0 estimated ground reaction forces and torque w f 0 , w τ 0 , w φ measurement noise in f 0 , τ 0 , φ

Upload: others

Post on 24-Jun-2020

1 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Revision 014 Dec 1995

A least squares estimation approach to improving the precision of inverse dy-namics computations

Arthur D. KuoDepartment of Mechanical Engineering & Applied Mechanics

University of MichiganAnn Arbor, Michigan U. S. A.

313/747-2505 [email protected]

Note: This is a preprint of a manuscript submitted to the Journal of Biomechanical Engineering. If youwish to reference this paper, please contact the author or check http://www-personal.umich.edu/~artkuo.

Abstract:The conventional method for computing inverse dynamics has several disadvantages. In the presenceof noisy measurements, it produces poor results when less than a full complement of ground reactionforces is measured. It often results in a residual torque acting on the top-most body segment, and isespecially sensitive to misalignment between the force plate and motion analysis coordinate frames.These difficulties may be overcome using a least squares estimation method, which tends to rejectrandom noise in the measurements. The result is an estimate of the joint torques and joint angularaccelerations which best match measured data. An error analysis makes it possible to predict errormagnitudes for both conventional and least squares methods. A benchmark case is presented, whichdemonstrates reductions in joint torque errors on the order of 30%, for a wide range of noise levels onforce plate and kinematics measurements. The method also is computationally fast and relatively ro-bust to missing force measurements and biases such as misalignment of coordinate frames.

Nomenclature:n number of body segmentsN number of time stepsxci vector describing linear (translational) position of segment i ’s center of massxci , ′xci estimated and measured values of xci

xci , xci , ˙′xci actual, estimated, and measured linear velocity vectors˙xci , ˙xci , ˙ ′xci actual, estimated, and measured linear acceleration vectorsφi actual angular orientation of segment i (segment angle)φi , ′φi estimated and measured values of φi

φi , φi , ˙′φi actual, estimated, and measured angular velocity vectors˙φi , ˙φi , ˙ ′φi actual, estimated, and measured angular acceleration vectorsfi−1 intersegmental reaction force vector acting on segment i at joint i-1fi , ′fi estimated and measured values of fi

τ i−1 actual joint torque (moment of muscle force) applied on segment i at joint i-1τ i , ′τ i estimated and measured values of τ i

f0 , τ 0 estimated ground reaction forces and torquewf 0, wτ 0 , wφ measurement noise in ′f0 , ′τ 0, ′φ

Page 2: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 2

INTRODUCTION

Inverse dynamics, the procedure in which motion data is used to estimate torques (i.e., moments ofmuscle force) produced at the joints, is a primary tool for analysis of gait and other movements. It is asimple and effective technique which can be used to infer which and how muscles are used in a motortask. A variety of data are needed to make the necessary calculations, including anthropometric param-eters specifying the inertial properties of each limb, a record of the limb movements, and often, arecord of ground reaction forces. Because these data are not generally known precisely—and in thecases of limb kinematics and ground reaction forces, their precision often comes at considerable ex-pense—it is usually desirable to extract the best possible joint torque estimates from imperfect mea-surements.

The conventional method for computing inverse dynamics is quite simple (Winter, 1990). A typi-cal scheme involves iterative solution of the Newton-Euler equations of motion for each body segment.If only angular acceleration measurements are available, the iteration starts at the top-most segment,calculating joint torques which satisfy dynamic equilibrium conditions at each successive segmentproceeding downwards. This method tends to produce noisy joint torque estimates, because angularaccelerations are typically determined by twice-differentiating motion data with respect to time, andthe differentiation process tends to amplify measurement noise. A modification of this scheme is tointroduce additional measurements in the form of ground reaction forces. These data provide boundaryconditions for the bottom-most segment, and the dynamic equilibrium conditions are applied at eachsuccessive segment proceeding upwards. Because force plate data are typically less noisy than accel-eration data, the resulting joint torque estimates tend to be more precise. However, the introduction ofadditional data provides more equilibrium conditions than can be satisfied. This overdeterminacy maybe avoided by either discarding the acceleration measurements for the top-most segment, or by addingresidual forces and torques to the top-most segment.

There are alternative formulations for the inverse dynamics problem which are based on optimiza-tion. Vaughan et al. (1982) noted the overdeterminacy arising from introduction of ground reactionforces, and proposed using the extra degrees of freedom to optimize the body segment parameters. Thismethod indirectly improves inverse dynamics computations by providing better parameter values andenforcing the boundary conditions, but does not otherwise affect the joint torque estimates. Perhaps themost sophisticated approach is to use dynamic optimization to compute the trajectory of joint torqueswhich in a forward simulation best reproduces the observed motion (Chao & Rim, 1973). This methodenforces the dynamical equations of motion over time, and thus may be regarded as a theoreticallyideal method for estimating joint torques.

There are however several disadvantages to both conventional and dynamic optimization methodsfor computing inverse dynamics. In the presence of noise, the conventional Newton-Euler methodproduces poor joint torque estimates when ground reaction forces are not measured, and produces aresidual when they are. It is also highly sensitive to mismatch in the origins of reference frames formotion data and ground reaction forces (McCaw & DeVita, 1995). Dynamic optimization can be usedto overcome some of these problems, but practical experience with this method shows that it is oftendifficult to find a solution, or even the initial guess at a solution which is required to start the optimiza-tion. The dynamics of a standing or walking human are inherently unstable, and so virtually any initialguess will diverge within a certain number of time constants for the system. An initial guess will onlywork for unstable systems if it is exceedingly accurate, or if the time period of the analysis is too shortto allow for divergence. For example, Chao & Rim (1973) demonstrated the use of dynamic optimiza-tion for 0.17 s of a step in human gait. Even when a suitable initial guess is found, the iterative methodsfor optimization a solution pose a heavy computational burden.

Page 3: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 3

An alternative to these methods is to treat the inverse dynamicsproblem as an overcomplete system of equations, and use static opti-mization to find the set of joint torques which agrees best with avail-able measurements, at each point in time. The resulting torques aretheoretically not as precise as those found using dynamic optimiza-tion, because (as in the conventional method) the dynamical equa-tions of motion are not enforced over time. However, the static opti-mization approach is far easier and faster to solve, and has severaladvantages over the more widely-used conventional method. First,the static optimization method makes best use of all available data,with the effect of rejecting random noise in the measurements. Sec-ond, it produces joint torque estimates which are fully consistent withthe equations of motion at each point in time, without producing re-sidual forces and torques. Third, the proposed method works welleven without a full complement of ground reaction data. And finally,the method can be extended to correct for mismatch between refer-ence frames for ground reaction and motion data, thereby removingsome biases in the joint torque estimates. Portions of this work havebeen introduced elsewhere (Kuo, 1994; Kuo, 1995).

This paper outlines the use of static optimization to solve theinverse dynamics problem. It discusses both the overdeterminacy inthe conventional method, and the use of least squares optimizationas an alternative way to estimate the joint torques. Estimation theoryis used to provide predictions of error statistics for both methods. Asimulated postural motion, for which exact joint torques are known,is used to compare performance and to test the error predictions. Analternative formulation is also given for the purpose of eliminatingthe effects of measurement bias.

METHOD

The proposed method differs from the conventional Newton-Euler method in a fundamental way. The conventional method treatseach body segment separately, applying dynamic equilibrium conditions to compute all intersegmentalforces and torques. The proposed method uses equations of motion based on generalized coordinates totreat all segments simultaneously, thereby relating joint torques to angular accelerations without needfor intersegmental forces. Another set of equations relates joint torques to the ground reaction forces.These two sets of equations are linear in the joint torques, and form an overcomplete system which canbe solved analytically using a simple least-squares pseudoinverse, providing the optimal solution whichagrees best with the measurements. The problem is formulated stochastically using estimation theory,to take into account noise in the measurements and provide a prediction of the error covariance. Analternate formulation produces a sparse overdetermined system which can be used to eliminate biasesarising from misalignment of force/motion data or other causes. For simplicity, the derivations andaccompanying test case are performed for a two-dimensional system. The method, however, is fullyapplicable to three-dimensional systems with appropriate changes described in Appendix C.

The following nomenclature will be adopted for the general two-dimensional system, as shown inFig. 1. The body comprises n segments, of which one, typically the foot, remains motionless in static

lcn

ln

0f0

- f1 f1

r2

s2

- f2

- fn

fn-2

n 1

segment n

segment n-1

segment 2

segment 1

joint 1

joint 2

joint n-2

joint n-1

n 1

Fig. 1. Configuration of two-dimensionalbody segment model. The body consistsof n segments, connected by n-1 joints. Ajoint torque τ i and an intersegmental re-

action force fi act on the two segments(but with opposite signs) connected byjoint i. The angular orientation of eachsegment is given by ϕ i . Vectors ri and si

are from segment i’s center of mass to thejoints. Segment length and location ofcenter of mass are specified by li and lci .The force and torque vectors shown illus-trate points of application and do not im-ply specific directions. Sign conventionsand angular reference are also arbitrary,but are defined here such that joint torquesare positive in extension and angular ori-entations are measured counter-clockwisefrom the horizontal.

Page 4: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 4

contact with a force plate. These segments are numbered i = 1, 2, …n , starting with the motionlesssegment and moving successively to other segments which are more distal from the force plate. Eachsegment i has a center of mass position described by a vector xci of length 2, and a scalar orientation in

spatial coordinates φi . Knowledge of φi for i = 1, 2, …n is sufficient to fully determine the configura-

tion of the system, including xci , and so the φi may be regarded as generalized coordinates (Green-wood, 1988). The joints between segments are numbered from 1 to n -1, with joint i articulating seg-ments i and i+1. There are intersegmental forces fi−1 (of length 2) acting on the end of segment i

corresponding to joint i-1, and -fi acting at the end corresponding to joint i . Similarly there are joint

torques τ i−1 and -τ i acting on the same respective ends. The ground reaction forces and torques are f0

and τ 0 respectively, and so the force plate may be regarded as segment i = 0. The following quantitieswill also stacked together and referred to in vector form:

φ

φφ

φ

2

3

M

n

,

τ

ττ

τ

1

2

1

M

n

.

It will be convenient to recognize the difference between a quantity’s actual value denoted by ahorizontal bar (e.g., z ), its measured value denoted by a prime (′z ), and its estimated value (whichdoes not generally equal the measured value) denoted by the unadorned symbol (z ). The errors inmeasurement arise from additive noise:

′ = +φ φ φw

′ = +f f wf0 0 0

′ = +τ τ τ0 0 0w

where wφ , wf 0, and wτ 0 are white noise vectors which are assumed to have Gaussian distribution with

zero mean.

Angular acceleration measurements ′˙φ are found by twice-differentiating the angular orienta-tions,

′ = +˙ ˙˙φ φ φw

where w ˙φ is the (non-white) acceleration noise. The process of numerical differentiation tends to am-

plify noise, so w ˙φ is assumed to have much larger magnitude than wφ or the velocity noise wφ in the

subsequent inverse dynamics problem. Hence, the estimates of angular orientation and velocity will be

set equal to their measurements, φ φ= ′ and ˙ ˙φ φ= ′ (φ1 is assumed constant).

Conventional Newton-Euler method

Conventional inverse dynamics methods compute the intersegmental reaction forces using Newton’sequation of motion and Euler’s equation, applied to each of the segments at each point in time:

m x f fi ci i iI2 21

×−= −˙ (1)

I r f s fi i i i i i i i˙φ τ τ= × − × + −− −1 1 (2)

where mi is the mass, I2 2× is the 2-by-2 identity matrix, and ˙xci is the translational acceleration vector

Page 5: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 5

as described previously; Ii is the moment of inertia, and ri and si are vectors from the center of mass tothe joints at the bottom-most and top-most ends, respectively, of segment i .

Consider first an inverse dynamics problem in which there are no ground reaction forces mea-

sured. The estimated joint angular accelerations are set equal to their measured values, ˙ ˙φ φi i= ′, i = 2,

…, n , with the assumption ˙φ1 0= . The problem may be solved iteratively by setting boundary condi-

tions on the top-most segment, fn = 0 and τ n = 0, and applying dynamical equilibrium, equations (1)and (2), to calculate the forces and torques acting at the other end of the segment. This procedure isrepeated for each segment from n to 1, solving for each joint torque successively.

When ground reaction forces and torque are measured, they may be included by using them asboundary conditions on the bottom-most segment, f f0 0= ′ , τ τ0 0= ′ , and applying dynamical equilib-rium on each segment proceeding upwards. Equations (1) and (2) are employed starting at i = 1, with˙ ˙φ φi i= ′. The extra force inputs act as additional constraints on the equations, making the systemoverdetermined. This difficulty is typically circumvented by introducing new degrees of freedom at theopposite end of the body, in the form of residual forces and torques at the top-most segment, fn and τ n,

as illustrated in Fig. 1b. When the measurements are imperfect, the boundary conditions fn = 0, τ n = 0are generally violated.

Though the precision of the computation is often improved by the inclusion of ground reactionforces and torques which are typically more precise than acceleration measurements, there are severaldisadvantages to the methods outlined above. First, a (generally nonzero) residual is produced for eachforce measurement introduced, in direct contradiction of the known boundary conditions. Second, theresults are often poor when acceleration measurements are noisy, especially if less than a full comple-ment of the measurements ′f0 and ′τ 0 is available. In addition, errors in alignment of force plate andmotion analysis coordinates can result in significant errors in the joint torque estimates (McCaw &DeVita, 1995).

Proposed least squares method

An alternative method is to solve the overcomplete system of equations without relaxing the bound-ary conditions. Rather, the constraints formed by imperfect measurements are relaxed by some amountso that there is set of joint torques which satisfies a new set of adjusted measurement constraints. Thecriterion for choosing the joint torques is to minimize the adjustments necessary to make the measure-ment constraints agree with each other. This has the effect of canceling out random error in the mea-surements, thereby improving the precision of joint torque estimates. The method is essentially a staticoptimization problem formulated in matrix form and solved using the pseudoinverse. The ground reac-tion forces and angular accelerations are the measurements to be adjusted, and the joint torques are thevariables to be estimated. (The intersegmental joint reaction forces fi for i = 2, …, n need not beestimated directly as in the conventional methods, because they are noncontributory and can be foundfrom the estimated joint torques.)

Two sets of equations are necessary to set up the overcomplete system. The first is the equations ofmotion relating joint torques and angular accelerations, expressed in the form

M Q g vφ φ τ φ φ φ( ) = ⋅ + ( ) + ( )˙ , ˙ (3)

where M is the mass matrix, Q is a matrix converting joint torques to segment torques, and g and vare vectors containing gravitational terms and velocity-dependent terms, respectively (see AppendixA). The second set relates joint torques to the other measurements, the ground reaction forces. It can be

Page 6: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 6

found by first deriving the body equations of motion including additional degrees of freedom for mo-tion of segment i = 1. These equations are used to find the constraint forces necessary to keep thatsegment motionless, which are identical to the ground reaction forces. The result is an intermediaterelation between angular accelerations and the reaction forces of the form

Cf

cφ φτ

φ φ( ) =

+ ( )˙ , ˙0

0

(4)

which is notable for being linear in ˙φ . Equation (3) is then used to replace ˙φ in eqn. (4), resulting in thedesired relation,

C Mf

c C M g vφ φ ττ

φ φ φ φ φ φ φ( ) ⋅ ( ) ⋅ =

+ ( ) − ( ) ⋅ ( ) ⋅ ( ) + ( ){ }− −1 0

0

1, ˙ , ˙ . (5)

which is linear in τ . The full derivation for the benchmark system, as well as definitions of the relevantterms, are given in Appendix A.

The overdetermined system of equations is formed by combining eqns. (3) and (5) and substitut-ing measurements for ground reaction forces and torques and angular accelerations into the right-handside:

C M

Mf

c CM g v

n n

φ φφ

ττ

φ

φ φ φφ φ φ φ

( ) ⋅ ( )( )

⋅ =

′′′

+ ( )

− ( )

⋅ ( ) ⋅ ( ) + ( ){ }

− ×−

1

1

0

01

, ˙, ˙

I . (6a)

It is preferrable to define new variables to put eqn. (6a) into a simpler form:

AC M

M≡

( ) ⋅ ( )( )

φ φφ

1

1 , b fc C

M g vn n

≡′′′

+ ( )

− ( )

⋅ ( ) ⋅ ( ) + ( ){ }×

τ

φ

φ φ φφ φ φ φ

0

01

, ˙, ˙

I

The linear, overdetermined nature of eqn. (6a) then becomes more evident:

A b⋅ =τ , (6b)where the number of rows in A and b exceeds that of τ by the number of ground reaction measure-ments. There is in general no solution to this equation if the measurements are noisy.

Static optimization may be used to find the joint torques τ which (in the least squares sense) bestagree with the measurements:

τ ττ

= ⋅ −argmin A b 2 (7)

where the norm of a vector of length m is defined by x m xjj

2 21≡ ( )∑ . The linear form of eqn. (6b) is

convenient because it affords a linear solution using the pseudo-inverse (Strang, 1988). While thesolution to (7) is straightforward to find deterministically, it is advantageous to use a stochastic formu-lation based on estimation theory, because it facilitates a statistical description of the expected errors(Stark & Wood, 1986). Assume that the covariance of the (zero-mean) measurement errors is given byW :

E f f f f W

T′′′

⋅′′′

φ

τ

φ

τ

φ

τ

φ

0

0

0

0

0

0

0

0

˙ ˙ ˙ ˙ .

Page 7: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 7

If all of the measurement errors are independent, then W is a diagonal matrix containing the variancesof the measurements. The optimal estimate τ is given analytically by

τ = ⋅ ⋅( ) ⋅ ⋅ ⋅− − −A W A A W bT T1 1 1 (8)

in which the weighted pseudo-inverse of the left-hand matrix multiplier of equation (6b) is multiplied

against the measurements. This estimate is optimal in the sense that it is the unbiased (i.e., E τ τ[ ] = )

linear estimator which minimizes the covariance of the estimation error, E Tτ τ τ τ−( ) −( )[ ].Besides providing an estimate which is fully consistent with the boundary conditions and has

minimum error covariance, this formulation is well-suited to situations in which not all measurements

are available. If any measurement from ˙ ′φ , ′f0 , ′τ 0 is unavailable or unreliable, the correspondingterms in the covariance matrix W may be set to infinity (or equivalently the corresponding terms in

W −1 are set to zero), which has the effect of removing measurements from the equations. As long as the

remaining rows of equation (8) are well-conditioned and of sufficient rank, the method provides anoptimal estimate.

There are two practical issues to consider when implementing the solution of equation (8). First, itis generally computationally advantageous to use a method such as singular value decomposition tosolve equation (6), rather than to explicitly compute the pseudo-inverse (Golub & Van Loan, 1989).Second, it is possible in some cases that the scaling that occurs with use of the covariance W may makethe equation ill-conditioned. Such a situation may arise when several of the measurements are so poorthat there is effectively not enough information to fully determine the solution. This may be monitoredby examining the condition number of the system—if it becomes ill-conditioned, it is preferrable toscale W to keep the condition number under a reasonable value, such as 100. Fortunately, this situationrarely occurs in practice, as most measurements are usually within a few orders of magnitude of eachother in precision.

Correction of measurement bias

The proposed least-squares estimation method can be modified to eliminate measurement biaseswhich are constant in time, by including these biases as estimation variables, and performing the esti-mation across all points in time simultaneously. The simplest form of a bias is a constant offset in someof the forces, as may occur when load cells drift slowly over time. But constant biases may also beintroduced by mismatch between certain estimated anthropometric parameters used to model a subjectand their actual values. For example, an improper body mass estimate will produce a constant error inground reaction torque equal to the error in units of weight multiplied by the moment arm about theforce plate’s coordinate origin. Another means by which constant error may be introduced is in themoment arm itself, as may occur with misalignment between force plate and motion analysis system.

Biases may be included in the estimation problem of as follows. Let there be nb unknown biases

assembled into a vector β . These offsets are included by modifying eqn. (6b):

A k k b k B[ ] [ ] [ ]τ β= + ⋅ (9)

where the brackets [ ]k denote evaluation of the quantities at time k , with a total of N time steps. Aselection matrix B is multiplied against β so that the biases affect the appropriate measuremets. B is

defined to be of size n nm b× where nm is the number of measurements (or the length of b k[ ]), and to

have entries Bij = 1 if bias j acts on measurement i , Bij = 0 otherwise.

Equation (9) may be solved for all τ[ ]k and β simultaneously by combining all time steps into a

Page 8: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 8

block linear system,

A B

A B

B

A N BN

b

b

b N

[ ]

[ ]

[ ]

[ ]

[ ]

[ ]

[ ]

[ ]

[ ]

1

2

1

21

2

−−−−

=

OM

M

ττ

τβ

(10)

The resulting system, with size nm by n N nb⋅ +( ), is considerably larger than the single A k[ ] of eqn

(9). It may, however, be solved efficiently using algorithms tuned for sparse systems (Golub & VanLoan, 1989).

Error analysis

The tools of estimation theory provide a prediction of the errors arising from each of the methodsdescribed above. For the conventional method, the prediction is made by first assembling eqns. (1) and(2) for each segment together into a matrix equation of the form (see Appendix A)

τφτ γ= ⋅

′′′

+F

f

˙

0

0

. (11)

The covariance of torque estimate error using the Newton-Euler method is given by

X F W FNET= ⋅ ⋅ . (12)

Similarly, the error covariance for the least squares method is given by

X A W A A WALST T

= ( ) =− −1 1 # # (13)

where A# denotes the pseudoinverse of A , A A A AT T# ≡ ( )−1. The predicted variance for the joint torque

errors is given by the diagonals of XLS . Assuming that the measurement noise has zero mean, the jointtorque estimation errors using either method will also have zero mean.

“Experimental” Comparison of methods

A simulated experiment was performed to compare the least squares and Newton-Euler methodsof estimating joint torques. While actual joint torques are never known exactly in a real experiment, asimulation provides the means to objectively test performance and evaluate the accuracy of the errorcovariance prediction. The benchmark case modeled postural motion of a four-segment body in thesagittal plane. Ground reaction forces (horizontal and vertical force and reaction torque) and the kine-matics of markers located at the joint centers were calculated and then “measured” by adding zeromean white noise with known variance. These data were sampled at 60 Hz, and both forces and angularorientations derived from the marker positions were low-pass filtered with a cutoff of 5 Hz (Butterworth,3rd order, forward and backward passes). First and second derivatives of the filtered angular orienta-tions were found using second order finite differences. Equations of motion and parameters for themodel are given in Appendix A.

The simulated motion consisted of 4 seconds of a postural movement about the ankle, knee, andhip joints. The movement was produced by a feedforward trajectory of joint torques equal to the sum of

Page 9: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 9

sinusoids ranging from 0.5 to 2.2 Hz, plus a feedback component designed to ensure stability of thesystem. The amplitudes of the sinusoids were set at physiologically-plausible values, and their respec-tive phases were randomly assigned (see Fig. 2).

Four sets of simulations were performed, using varying amounts of measurement noise. For eachcase, the measurement noise covariance was computed and used as input to eqn. (8). Trials using boththe Newton-Euer and least squares methods were conducted in sets to test the accuracy of the errorpredictions and to compare the performance of the methods for a wide variety of noise levels, missingmeasurements, and biased measurements.

The first set of trials was used to test the validity of the error prediction, and indirectly, the assump-tion that angular orientation and velocity measurement errors can be considered negligible comparedto the acceleration errors. Fifty (50) ensembles of data were produced with each channel of force platenoise set at a standard deviation of 0.1 N (N-m in the case of torque) and marker position noise at 1 cm(both horizontal and vertical). The square root of the ensemble-averaged square error was calculatedacross time, and compared with the predicted values given by the square roots of the diagonal elementsof the covariance matrix.

The second set of trials was used to compare theperformance of the static optimization and conventionalmethods for a wide range of noise variations. The stan-dard deviation of noise on each of the force measure-ments was set at values ranging from 0.001 N (0.001 N-m in the case of ground reaction torque) to 10 N (1 N-mfor ground reaction torque) in increments of a factor of10, and the position measurements at values ranging from0.01 cm to 3.2 cm, also in increments of half orders ofmagnitude. One ensemble was computed for each com-bination of noise levels, and the errors were summarizedusing the square root of the time-averaged square error,

RMSEiN

k ki ik

N

= −( )=

∑1 2

1

τ τ[ ] [ ] (14)

calculated for each joint, and with an overall measurefor all joints taken to be the magnitude of the torque er-ror vector summarized in a similar manner:

RMSE = −=

∑1 2

1Nk k

k

N

τ τ[ ] [ ] . (15)

The third set of trials was used to compare perfor-mance of the methods with missing reaction force data.RMSE was calculated with measurement noise set at thesame values as used in the first set, for every possiblecombination of missing force plate data. One ensemblewas calculated for each combination.

The final set of simulations was used to compareperformance for varying amounts of bias in the force platemeasurements. The bias in this case consisted of mis-alignment of the force plate and motion analysis coordi-nate systems by amounts varying from 0 to 1 cm in steps

AnkleKnee Hip

0.0 2.0 4.0

0

8

6

4

2

-2

-4

-6

-8

Ang

le (

deg)

a. Joint angles vs. time

AnkleKnee Hip

-30

-20

-10

0

10

20

30

40

To

ruqe

s (N

-m)

b. Joint torques vs. time

Fx (N) Fy (N) T (N-m)

-30

-20

-10

0

10

20

30

40

time (s)

Gro

und

reac

tio

n da

ta

c. Ground reaction data vs. time

Fig. 2. Benchmark simulation of postural movement. (a)Joint angles vs. time for ankle, knee, hip. (b) Joint torquesvs. time. (c) Ground reaction data, for horizontal force(Fx), vertical force (Fy), and ground reaction torque (T).

Page 10: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 10

of 0.1 cm. Measurement noise remained at 1 cm for marker positions, 0.1 N for forces (0.1 N-m forground reaction torque). The RMSE was calculated for a single ensemble of each of these cases.

RESULTS

Overall time-averaged torque and acceleration errors were computed for both methods, as shownin Fig. 3. For measurement noise standard deviations of 1 cm for marker position and 0.1 N (horizontaland vertical reaction force) and N-m (ground reaction torque) for force measurements, the Newton-Euler method produced more precise estimates of ankle and knee torques. The ankle torque was espe-cially precise with an error of 0.043 N-m, compared to 0.61 N-m (RMSE1) using the least squaresmethod. However, the advantage is reduced for knee torque, 1.43 N-m compared to 2.13 N-m (RMSE2),and disappears at the hip, 5.49 N-m compared to 3.02 N-m (RMSE3). This dramatic difference in hiptorque makes the the least squares method advantageous overall, with an RMSE 34% (2.16 N-m vs.3.27 N-m) lower than that using the Newton-Euler method. Though the conventional method producedbetter results for joints closest to the force plate, this precision came at the expense of much largererrors at the hip, and a residual torque of 51.3 N-m (RMSE4). If this residual were to be included inoverall RMSE, the reduction gained by using the least squares method would increase to approxi-mately 95%. The least squares method also resulted in substantial reductions in error in the joint angu-lar acceleration estimates, with overall error (RMSE) reduced by 30% (3.72 to 2.60 rad/s2).

c. Torque error

a. Joint torque estimates

0.0

2.0

4.0

6.0

Ankle(RMSE1)

Knee(RMSE2)

Hip(RMSE3)

Overall(RMSE)

Least squares

Newton-Euler

Least squares

Newton-Euler

d. Acceleration error

0.0

2.0

4.0

6.0

Ankle(RMSE1)

Knee(RMSE2)

Hip(RMSE3)

Overall(RMSE)

Est

imat

ion

erro

r (r

ad/s

2 )

Est

imat

ion

erro

r (N

-m)

-50

0

50

-20

0

20

0.0 2.0 4.0-50

0

50

An

kle

torq

ue

(N-m

)K

nee

to

rqu

e (N

-m)

Hip

to

rqu

e (N

-m)

time (s)

Actual Least squares Newton-Euler

Fig. 3. Comparison of results frombenchmark test of Newton-Euler andleast squares methods. Least squaresmethod substantially improves esti-mates for joints distal to force plate, re-sulting in lower overall error. (a) Jointtorque estimates over time, vs. actualtorques at ankle, knee, and hip. (b) Jointtorque estimation error, averaged overtime, for each joint and overall error(RMSE). (c) Joint angular accelerationestimation errors, averaged over time,are reduced using least squares methodfor all joints.

Page 11: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 11

The results for the ensemble-averaged trials are shown in Fig. 4. Predicted and actual standarderror are given for each joint torque over time using both Newton-Euler and least squares methods(Fig. 4a), and for each joint angular acceleration over time using only the least squares method (Fig.4b). Predicted standard error was derived from the predicted covariances of eqns. (12) and (13). Thepredictions show that, for the selected noise levels, the least squares method should theoretically out-perform the conventional inverse dynamics method where all measurements are available. This advan-tage should be greatest for the joint most distal to the force plate, where the error is predicted to bereduced by about 30%. While the simulations show that the predictions tend to underestimate the error,they nevertheless affirm that the least squares method outperforms the Newton-Euler method. Thepoor accuracy of the prediction was thought to stem in part from noise in angular orientations andvelocities, which are not taken into account by the model. To test this possibility, the ensembles were

re-computed with the same measurement noise levels on f0 and ˙φ , but with ′ =φ φ and ˙ ˙′ =φ φ . Theresults, shown in Fig. 4c, show that the ensemble errors are much closer to their predicted values. Thereliability of the covariance prediction is therefore a function of noise in the angular orientation andvelocity measurements.

0 2 4

2

4

6

8

10Ankle angular acc.

time (s)

Std

err

or

(rad

/s2 )

0 2 40 00

4

8

12

16

Knee angular acc.

time (s)0 2 4

2

4

6

8

10Hip angular acc.

time (s)

0 2 40.00

0.02

0.04

0.06Ankle joint torque

time (s)

Std

err

or

(N-m

)

0 2 40.0

0.1

0.2

0.3

0.4

Knee joint torque

time (s)0 2 4

0

1

2

3

4

Hip joint torque

time (s)

0 2 40.0

0.2

0.4

0.6Ankle joint torque

time (s)

Std

err

or

(N-m

)

0 2 40

1

2

3

Knee joint torque

time (s)0 2 4

0

2

4

6Hip joint torque

time (s)

a.

b.

c.

LS Actual LS Predicted NE Actual NE Predicted

Fig. 4. Ensemble-averaged standarderrors over time, for Newton-Euler(NE) and Least Squares (LS) meth-ods applied to benchmark system.Errors are shown in three columns,corresponding to the ankle, knee, andhip joints. LS results are denoted bya dotted line, and NE by a dashedline. Actual standard errors are de-noted by a thin line, and predictedvalues by a thicker line. (a) Actualand predicted standard errors of jointtorque estimates. Noise in angularorientation and velocity measure-ments causes predictions to under-estimate actual error. (For ankletorque, NE and LS predictions arenearly identical) (b) Actual and pre-dicted standard errors of joint angu-lar acceleration estimates. Measuredaccelerations, found by double-dif-ferentiating filtered angular orienta-tion measurements, are denoted bya solid line. NE method does not es-timate accelerations, but assumesthey are equal to the measured val-ues. Acceleration error predictionsare also underestimated. (c) Jointtorque errors computed using exactangular orientations and velocities,but noisy accelerations, result inmuch better predictions. Motionanalysis precision therefore deter-mines accuracy of error prediction.

Page 12: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 12

Joint torque estimate errors (RMSE) using both methods were also compared for a variety ofmotion data and force plate noise levels, as shown in Fig. 5. The absolute errors (Fig. 5a) show thaterror generally increases with both marker and force measurement noise, and that the least squaresestimate was more precise in every case. The relative reduction in RMSE (Fig. 5b) varied with noiselevel, but ranged from 20% to 60% for 48 out of the 56 combinations used, with a median reduction ofapproximately 35%.

Errors in joint torque estimates (RMSE) with varying force plate offsets are compared in Fig. 6.For every case in which at least one force plate measurement was available, the least squares methodproduced more precise estimates; when only acceleration measurements are available, the system isdeterminate and the two methods are equivalent. There were three cases in which the proposed methodoutperformed the Newton-Euler method by a factor of four or more: when horizontal ground reactionforce and ground reaction torque (91% reduction in RMSE) were available, horizontal and verticalforces alone (78%), reaction torque alone (90%), and horizontal force alone (76%).

Errors for the case when all force measurements are available, but with a horizontal bias in align-ment with the motion data coordinate system, are compared in Fig. 7. Using the Newton-Euler inversedynamics method, the overall RMSE increased linearly with bias. With a misalignment of 1 cm, the

0.0

0.1

0.2

0.3

0.4

0.5

0.6

0.7

0.8

0.9

1.0

b. Relative joint torque error

1.0·10-31.0·10-2

1.0·10-11.0·100

1.0·101

1.00·10-2

3.16·10-2

1.00·10-1

3.16·10-11.00·10-0

3.16·10-0

1.0·10-2

1.0·10-1

1.0·100

1.0·101

1.0·102

a. Absolute joint torque error

Marker std error (cm)Force meas std

error

(N, N-m) 1.00·10-2

3.16·10-21.00·10-1

3.16·10-11.00·10-0

3.16·10-0

Marker std error (cm) 1.0·10-31.0·10-2

1.0·10-11.0·100

1.0·101

Force meas std error

(N, N-m)

No

rmed

err

or

(N-m

)

Least squaresNewton-Euler

Fig. 5. Comparison of joint torque estimation errors for varying levels of noise in forces and marker measurements. (a) Absoluteerrors (RMSE) for Newton-Euler and least squares methods. (b) Relative errors, least squares RMSE as a fraction of Newton-EulerRMSE. Least squares method resulted in reduced error for every combination of noise levels, with a median reduction of 30%.

Joint torque error with varying forcemeasurements

0.

10.

20.

30.

40.

50.

Fx F

y T

Fy

T

Fx T

Fx F

y T Fy Fx

none

Force measurements

No

rmed

err

or

(N-m

)

Least squaresNewton-Euler

Torque error vs. force plate misalignment

0.0

1.0

2.0

3.0

4.0

5.0

6.0

7.0

8.0

0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0

Misalignment (cm)

Est

imat

ion

erro

r (N

-m)

Least squaresNewton-Euler

Fig. 7. Comparison of joint torque estimation error (RMSE) forboth methods, with varying amounts of bias due to misalign-ment between force plate and motion measurement coordinatesystems. Least squares method successfully eliminates effectsof bias.

Fig. 6. Comparison of joint torque estimation error (RMSE) for bothmethods, with varying number of force plate measurements. All possiblecombinations of force measurements were tested, using all accelerationmeasurements for each case. The force measurements used are denotedby Fx for horizontal ground reaction force, Fy for vertical force, and T forground reaction torque. Least squares method results in substantially re-duced error even when some force measurements are not included.

Page 13: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 13

error increases from 3.27 N-m to 7.52 N-m RMSE, a factor of 2.3. In contrast, the static optimization isunaffected by bias, with error remaining constant at 2.17 N-m RMSE. The relative reduction in errorincreases from 34% to 71% when the bias reaches 1 cm.

DISCUSSION

For a wide range of noise levels, the least squares method produces smaller overall torque errorsthan the Newton-Euler method. However, the conventional method often provides better estimates forthe joints closest to the force plate (see Fig. 3). This comes at the expense of much poorer precision atthe other joints, and the production of residual torques and forces at the upper end of the system. Incontrast, the least squares method performs better on these same joints distal to the force plate, whereabsolute errors are usually far greater, and produces no residuals—that is, the results are fully consis-tent with the boundary conditions. In terms of overall RMSE, the proposed method provided betterestimates for every combination of noise levels (Fig. 5), showing that these results are not particular toan ideal test case. Moreover, the proposed method can also provide minimum mean-square error esti-mates of the angular acceleration and ground reaction force measurements.

One major requirement of the proposed method is that measurement covariances are required.These quantities can be estimated roughly by examining measurement data after low-pass filtering and(if appropriate) numerical differentiation. It is also possible to compute the covariances theoreticallyfrom knowledge of the precision of measurement equipment and by modeling the data processing, asdescribed in Appendix B. It is, however, difficult to account for other sources of noise such as motionof the markers on the skin or vibration of the force plate. Fortunately, these concerns are somewhatalleviated by the observation that least-squares methods of this sort are generally quite robust. For thetest case described above, variations of a single covariance value by 100% produced a mean change intorque errors of only 7%. In fact, another test showed that when all of the covariances were arbitrarilyset equal to each other, the least squares method still outperformed the conventional method for all buttwo of the 54 combinations of noise levels tested (as in Fig. 6). This indicates that an investigator’s bestguess for measurement error covariance will usually suffice.

There remains nevertheless a compelling reason for accurately estimating measurement covari-ance: to facilitate prediction of the estimation error. The results show that eqns. (12) and (13) can beused to predict the estimation error covariance as long as reasonable estimates of measurement noisecovariance are available and angular orientation and velocity measurements are fairly precise (see Fig.5c). When these last measurements are imprecise, however, the actual error may be several timeshigher than predicted (see Fig. 5a). But even in such cases, the covariance predictions may be useful forthree purposes. First, they may still predict the relative changes in estimation error that occur acrosstime (i.e., as the body changes configuration). Second, they are useful for predicting theoretically theamount by which precision can be improved by using the proposed least squares techniques. Third, thefact that error covariance is reduced, even though by an amount smaller than predicted (see Fig. 5),shows that the errors in angular acceleration and force measurements are dominant, as hypothesized.Though errors in angular orientation and velocity adversely affect the results, they do not eliminate theimprovement in precision gained with the least squares method.

The robustness of the least squares formulation is demonstrated by its performance when someforce measurements are missing. While error increased with loss of measurement data regardless ofmethod, the static optimization method outperformed the conventional method in every case, and inrelative terms usually experienced a smaller increase in error. In fact, when horizontal ground reactionforces were removed, the proposed method’s estimates had only 7% greater joint torque error than thestandard method’s estimates using all measurements. This robustness indicates that the proposed method

Page 14: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 14

is especially useful when some data are missing or when measurements are especially noisy. Theremay in fact be cases when a measurement such as horizontal ground reaction force may be intention-ally discarded to save on equipment expense. The prediction of error covariance can be used to evalu-ate when such a situation is warranted.

This robustness stems from the formulation’s flexbility. It can make use of any number of mea-surements, as long as they are sufficient to make the problem determinate. Beyond that minimum,precision increases with the number of measurements, as long as they can be included in equationswhich are linear in the estimation variables. For example, accelerometer measurements are related tothe joint angular accelerations by a simple coordinate transformation, and could be useful for improv-ing the joint torque estimates at joints far removed from the force plate.

Another example of this flexibility is the inclusion of measurement bias. Any constant bias in themeasurements can be optimized out of the estimates, as long as they are accounted for in the formula-tion, and as long as there are sufficient measurements over time to make the problem determinate.Because there are typically many time steps, this second consideration is typically not an issue. And ifany calibrations are in doubt, it is not unreasonable to include them as a conservative measure. In fact,their inclusion makes it much less important to deal with issues such as alignment of force plate andmeasurement coordinate system origins (although their respective axes must nonetheless be paralleleach other) or zeroing of force measurements. Moreover, this reformulation of the problem poses littlepenalty on computation. In fact, using an efficient sparse matrix solver in MATLAB (The MathworksInc., Natick, Mass.), the inverse dynamics method actually ran about 6% faster using the sparse formu-lation.

It is theoretically and practically unsurprising that the static optimization method performs wellrelative to the traditional method. An interesting comparison is between the static optimization methodand a dynamic optimization method such as that proposed by Chao & Rim (1973). These methodsdiffer in the fact that the method proposed here utilizes the equations of motion merely as algebraicequations at each point in time, but the dynamic optimization method recognizes their true utility asdifferential equations which place constraints over time. Dynamic optimization therefore recognizesphysical limitations on movement over time, and finds the trajectory of joint torques which best matchesthe measurements both spatially and temporally. Theoretically, it is the preferred method, and canachieve high levels of precision depending on the choice of optimization parameters, but the difficul-ties mentioned in the introduction make dynamic optimization a poor choice in practice.

The proposed method would therefore appear to be ideal for many applications. It does, however,have one major disadvantage. Implementation requires the formulation of equations of motion for thesystem, and equations relating ground reaction forces and joint torques, which are both more difficultthan simple iteration of the Newton-Euler equations for each segment. Traditionally, such formulationshave required advanced knowledge of multi-body dynamics (Greenwood, 1988). However, these equa-tions may also be solved symbolically using commercial software packages or numerically using kine-matic constraints, as described in Appendix A. Nonetheless, traditional methods remain useful, par-ticularly when simplicity is desired, andwhen measurements do not suffer from excessive noise.

Finally, it is important to note that any method mentioned here is subject to systematic errorswhich affect accuracy. Systematic errors may be produced by inadvertant filtering of useful data alongwith the noise, by poor placement of body markers, and by inaccurate estimation of body segmentdimensional and inertial parameters. The proposed method addresses none of these issues, and seeksonly to improve precision by reducing the effects of random noise. The overall accuracy, on the otherhand, depends on many other factors and is a much more difficult issue to address.

Acknowledgements: This work was supported in part by a grant from the Whitaker Foundation, NSF Grant IBN-9511814,NIH Grant P60DC02072-03, and the Claude Pepper Older Americans Independence Center at the University of Michigan

Page 15: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 15

REFERENCES

Chao, E. Y. and Rim, K. (1973) Application of optimization principles in determining the appliedmoments in human leg joints during gait. J. Biomech. 6, 497-510.

Golub, G. H. and Van Loan, C. F. (1989) Matrix Computations. Johns Hopkins University Press, Bal-timore.

Greenwood, D. T. (1988) Principles of Dynamics. Prentice-Hall, Englewood Cliffs, NJ.Kane, T. R. and Levinson, D. A. (1985) Dynamics, Theory and Applications. McGraw-Hill, New York.Kuo, A. D. (1994) A smoothing method for computing inverse dynamics. In World Congress of Biome-

chanics Abstracts, Amsterdam.Kuo, A. D. (1995) A simple method of improving precision of inverse dynamics computations. In

Proceedings of the 18th Annual Meeting of the American Society of Biomechanics, Stanford,California, p. 275.

McCaw, S. T. and DeVita, P. (1995) Errors in alignment of center of pressure and foot coordinatesaffect predicted lower extremity torques. J. Biomech. 28, 985-988.

Stark, H. and Woods, J. W. (1986) Probability, Random Processes, and Estimation Theory for Engi-neers. Prentice-Hall, Englewood Cliffs, NJ.

Strang, G. (1988) Linear Algebra and its Applications. Harcourt, Brace, Jovanovich, San Diego, CA.Vaughan, C. L., Andrews, J. G. and Hay, J. G. (1982) Selection of body segment parameters by optimi-

zation methods. J. biomech. Engng. 104, 38-44.Winter, D. A. (1990) Biomechanics and Motor Control of Human Movement. Wiley-Interscience, New

York.

APPENDIX A: EQUATIONS FOR FOUR-SEGMENT MODEL

This appendix provides the equations of motion for the four-segment system used as a benchmark.Both equations of motion (3) and the ground reaction force equation (4) are derived using Newton-Euler equations for rigid-body motion and simple kinematics. It has the advantage of being solvableeither symbolically or numerically. The symbolic solution is exactly equivalent to the equations foundby more advanced methods such as that of Lagrange (Greenwood, 1988) or Kane (Kane & Levinson,1985). The numeric solution requires no algebraic reduction (by eliminating constraints numerically)and is easy to implement in software. This method can easily be extended for more segments or to threedimensions as noted in Appendix C.

In order to derive equations (3), and (4), it is advantageous to first derive the equations of motionfor the four-segment system with no constraint on rotation of segment 1. The result is a superset of theequations of motion with segment 1 held static, and the extra degree of freedom is used to solve for theground reaction torque. To facilitate the derivation, the following stacked vectors are defined for angu-lar orientations, joint torques, segment center of mass positions, and reaction forces:

Φ ≡

=

φφ

φ

φ

φ

1

21

M

n

,

T ≡

=

ττ

τ

τ

τ

0

1

1

0

M

n

,

x

x

x

x

c

c

c

cn

1

2

M,

f

f

f

fn

0

1

1

M

The equations of motion are found by eliminating kinematic constraints from the Newton-Euler

Page 16: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 16

equations. The kinematic constraints are those relating the position and orientation of the segments.These constraints are expressed here as the center of mass positions of the segments as a vector func-tion of the generalized coordinates, which in this system, are the segment angles:

x

l c

l s

l c l c

l s l s

l c l c l c

l s l s l s

l c l c l c l c

l s l s l c l s

c

c

c

c

c

c

c

c

c

=

++

+ ++ +

+ + ++ + +

1 1

1 1

1 1 2 2

1 1 2 2

1 1 2 2 3 3

1 1 2 2 3 3

1 1 2 2 3 3 4 4

1 1 2 2 3 3 4 4

, (A1)

where si i≡ sinφ , ci i≡ cosφ , li is the length of segment i , and lci is the distance from the end ofsegment i most proximal to the ground to its center of mass (see Fig. 1).

The first and second time derivatives of equation (A1) may be written in matrix form by definingthe Jacobian and its derivative,

Jxc≡ ∂

∂Φ, J

l s

l c

l s l s

l c l c

l s l s l s

l c l c l c

l s l s l s l s

l c l c l c l c

c

c

c

c

c

c

c

c

=

− −

− − −

− − − −

0 0

1 1

1 1 2 2

1 1 2 2

1 1 2 2 3 3

1 1 2 2 3 3

1 1 2 2 3 3 4 4

1 1 2 2 3 3 4 4

0 0 0

0 0 0

0 0

0 0

0

0

, ˙

˙

˙

˙ ˙

˙ ˙

˙ ˙ ˙

˙ ˙ ˙

J

l c

l s

l c l c

l s l s

l c l c l c

l s l s l s

c

c

c

c

c

c

=

−−− −− −− − −− − −

1 1 1

1 1 1

1 1 1 2 2 2

1 1 1 2 2 2

1 1 1 2 2 2 3 3 3

1 1 1 2 2 2 3 3 3

0 0 0

0 0 0

0 0

0 0

0

0

φφφ φφ φφ φ φφ φ φ

−− − − −− − − −

l c l c l c l c

l s l s l s l sc

c

1 1 1 2 2 2 3 3 3 4 4 4

1 1 1 2 2 2 3 3 3 4 4 4

˙ ˙ ˙ ˙

˙ ˙ ˙ ˙φ φ φ φφ φ φ φ

so that

˙ ˙x Jc = Φ (A2)

˙ ˙ ˙ ˙x J Jc = +Φ Φ . (A3)Summing the forces acting on each segment and combining them in vector form, Newton’s equa-

tion for rigid-body motion can be written as

S f M x gD c V2 ⋅ = ⋅ +˙ (A4)where the following additional quantities are defined:

S2

2 2 2 2

2 2 2 2

2 2 2 2

2 2

−−

× ×

× ×

× ×

×

Ι ΙΙ Ι

Ι ΙΙ

with I2 2× denoting the 2-by-2 identity matrix, and (Roman face) g

denoting the gravitational constant.

Page 17: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 17

Similarly, Euler’s equation for rigid-body rotation can be written as

I S P f˙Φ = ⋅ + ⋅1 T (A5)

where I is the diagonal matrix of segment moments of inertia I I I I I≡ ( )diag 1 2 3 4, , , , and

S1

1 1

1 1

1 1

1

−−

P

l s l c l l s l l c

l s l c l l s l l c

l s l c l l s l l c

l

c c c c

c c c c

c c c c

− −( ) − −( )− −( ) − −( )

− −( ) − −( )

1 1 1 1 1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2

3 3 3 3 3 3 3 3 3 3

0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0 0 0 cc cs l c4 4 4 4−

The forces f may be eliminated by substituting equations (A3) and (A4) into (A5):

I S P S M J S M J S gD D V˙ ˙ ˙ ˙Φ Φ Φ= ⋅ + ⋅ ⋅ ⋅ + ⋅ ⋅ + ⋅( )− − −

1 21

21

21T (A6)

which may be rearranged as

M T V G˙Φ = ⋅ + +S1 (A7)given the definitions

M ≡ − ⋅ ⋅ ⋅−I P S M JD21

V ≡ ⋅ ⋅ ⋅−P S M JD21 ˙Φ

G ≡ ⋅ ⋅−P S gV21 .

It is instructive to note that (A7) may be partitioned into an equation for the motionless segment 0; andthe equations of motion for the remaining segments, equation (3):

m m m m

m

m M

m

Q v g

11 12 13 14

12

13

14

0 1 1 10

φ φ

τ τ

τ φ φ φ( )

=

( )

+ ( )

˙ , ˙

V G

(A8)

The ground reaction forces may be found from equation (A4),

f S M x S gID

IV0 2 2= ⋅ ⋅ + ⋅˙ (A9)

where SI2

2 2 2 2 2 2 2 2≡ [ ]× × × ×Ι Ι Ι Ι is the first (block) row of the inverse of S2 . Similarly, the ground

reaction torque may be found from equation (A7) to be

τ 0 1 1 1= ⋅ − −SI M V G˙Φ (A10)

where SI1 is the first row of the inverse of S1. The following definitions then yield equation (4):

C

S

S M J

I

ID

φ( ) ≡⋅

⋅ ⋅

1

2

M, c

S M J S gID

IV

φ φ, ˙˙ ˙( ) ≡+

− +

V G1 1

2 2Φ .

Page 18: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 18

These same equations above may be used to derive the matrix F used in equation (12), with a fewmodifications. Eqns. (A4) and (A5) are rewritten to separate the ground reaction measurements f0 and

τ 0, and an extra degree of freedom is added to allow for a residual, τ n. This is accomplished by defin-ing

T

1

2

n

ττ

τM

,

f

f

f

fn

1

2

M, S1

1

1 1

1 1

1 1

-

-

-

-

, S2

2 2

2 2 2 2

2 2 2 2

2 2 2 2

×

× ×

× ×

× ×

-I

I -I

I -I

I -I

, P

l s l cc c

0

1 1 1 1

0 0

0 0

0 0

-

P

l l s l l c

l s l c l l s l l c

l s l c l l s l l c

l s l c

c c

c c c c

c c c c

c c

( ) ( )( ) ( )

( ) ( )

1 1 1 1 1 1

2 2 2 2 2 2 2 2 2 2

3 3 3 3 3 3 3 3 3 3

4 4 4 4

0 0 0 0 0 0

0 0 0 0

0 0 0 0

0 0 0 0

- - -

- - - -

- - - -

- ll l s l l cc c4 4 4 4 4 4- - -( ) ( )

which are used to rearrange (A4) and (A5) into

ˆ ˆ ˙f S M x g S fD c VI T

= ⋅ +{ } − ( )−2

12 0 (A11)

ˆ ˆ ˙ ˆ ˆT = S I P f P f SI T

11

0 0 1 0− − ⋅ − ⋅{ } + ( ) ⋅Φ τ . (A12)

The output of the Newton-Euler method is ′T , found by combining (A3), (A11), and (A12):

ˆ ˆ ˙ ˆ ˆ ˙ ˙ ˙ ˆT = S I P S M J J g P S P f SD V

I T I T

11

21

2 0 0 1 0− −− ⋅ ⋅ +( ) +{ } + ⋅ ( ) −{ }{ } + ( ) ⋅Φ Φ Φ τ , (A13)

so that

ˆ ˆ ˆ ˆ ˆ ˆ

˙

ˆ ˆ ˆ ˙ ˙T = S I PS M J S S P S P

f

S PS M J gDI T I T

D V11

21

1 11

2 0 0

0

11

21− − − − −( ) ( ) ⋅ ( ){ }[ ]

− +( )- -

ΦΦτ . (A14)

Equation (11) is then found by substituting the measured quantities into (A14), and F is therefore

equal to the first block matrix above, with the first row removed because ˙φ1 0= .For completeness, the actual equations of motion (A8) and the associated parameters are given

below.

b m l m m m lc1 1 1 2 3 4 1≡ + + +( ) These constants are used in the terms of equation (A7):

M Φ( ) =

a a c a c a c

a c a a c a c

a c a c a a c

a c a c a c a

11 12 12 13 13 14 14

12 12 22 23 23 24 24

13 13 23 23 33 34 34

14 14 24 24 34 34 44

Page 19: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 19

V Φ Φ, ˙

˙ ˙ ˙

˙ ˙ ˙

˙ ˙ ˙

˙ ˙ ˙

( ) =

− − −− −

0

0

0

0

12 12 2 13 13 3 14 14 4

12 12 1 23 23 3 24 24 4

13 13 1 23 23 2 34 34 4

14 14 1 24 24 2 34 34 3

a s a s a s

a s a c a s

a s a s a s

a s a s a s

φ φ φφ φ φφ φ φφ φ φ

⋅⋅

˙

˙

˙

˙

φφφφ

1

2

3

4

G Φ( ) = − − − −[ ] ⋅b c b c b c b cT

1 1 2 2 3 3 4 4 g

These parameter values were used for the benchmark problem:

l l l l1 2 3 40 177 0 405 0 440 0 795= = = =. . . . m, m, m, m

l l l lc c c c1 2 3 40 086 0 235 0 268 0 302= = = =. . . . m, m, m, m

m m m m1 2 3 41 78 7 30 15 5 44 6= = = =. . . . kg, kg, kg, kg

I I I I12

22

32

420 0080 0 097 0 253 1 51= ⋅ = ⋅ = ⋅ = ⋅. . . . kg m , kg m , kg m , kg m

APPENDIX B: PREDICTION OF MEASUREMENT NOISE COVARIANCE

Given certain assumptions regarding the characteristics of measurement noise, it is possible toestimate the propagation of noise by the processes of extraction of angular orientation from markerpositions, digital filtering, and numerical differentiation. These estimates are based on the modeling ofthese processes as affine operations on noisy measurements of the form

y Zx z= + (B1)where the estimates y are linear in the measurements x with the addition of some constant term z . Themeasurements include additive noise w , which is assumed white with mean 0 and covariance W , i.e.x x w= + . This assumption implies that the error in y will also have zero mean, and from probabilitytheory, a covariance

E y y y y ZWZT T−( ) −( )[ ] = . (B2)

Error covariance from extraction of angular orientation from marker positions

The error associated with angular orientations depends on the method of marker placement and onthe way in which orientation is specified. For the two-dimensional system described in Appendix A,the markers were placed at the joint centers, and angular orientation for each joint, a scalar, was foundfrom

φii i

i i

y y

x x= −

−− −

tan 1 1

1

(B3)

where xi and yi are the horizontal and vertical marker positions, respectively, at joint i . Taking partial

derivatives of (B3), the error covariance of φ , Wφ , is found to be

W E

l

l

l

WT

n

xφ φ φ φ φ= −( ) −( )[ ] =

2

2

2

2

3

O(B4)

Page 20: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 20

where li is the length of segment i , and Wx is the scalar variance in marker position.

Error covariance due to digital filtering

Low-pass filtering reduces, but does not eliminate, noise in the measurements. Assuming that thefilter does not appreciably degrade the desired signal, it is possible to estimate the variance of filter-induced error by evaluating the output variance of the filter driven by noise alone. If the noise w is ascalar white noise random sequence with zero mean and variance W , it has autocorrelation

R n Www[ ] = ⋅ [ ]δ 0 and a corresponding power spectrum S e Wwwjω( ) = . The output of a filter with dis-

crete transfer function H driven by this noise has spectrum S S e H ew w wwj j

f f= ( ) ( )ω ω 2

, where the sub-

script wf refers to filtered noise. The variance of this output is given by the autocorrelation of Sw wf f

evaluated at time 0, found by evaluating the integral (Stark & Woods, 1986)

W R S e H e df w w xxj j

f f= [ ] = ( ) ( )

−∫01

2

2

πωω ω

π

π . (B5)

Each measurement channel is filtered independently, so the error covariance is given by a diagonalmatrix composed of the individual error variances. Note that the integral in (B5) cannot generally begiven in closed form, and is typically evaluated numerically, depending on the type of filter used. If thedesired signal has significant components beyond the bandpass frequency, (B5) will tend to underesti-mate the error variance. Such a distortion may be considered a systematic error.

Error covariance due to numerical differentiation

The process of numerical differentiation produces two types of error. The first is a purely numeri-cal effect due to discretization which can be estimated using simple numerical analysis. The second isassociated with the noise-amplifying nature of time differentiation itself, and can only be estimatedgiven knowledge of the frequency content of both the signal and the measurement noise. The numeri-cal error depends on the differentiation approximation used, and its covariance can be computed givenknowledge of the measurement noise covariance. For example, a three-point second derivative of aquantity φ is given by

˙ [ ] [ ] [ ] [ ]φ φ φ φkh

k k k o h= + − + −( ) + ( )11 2 12

2 (B6)

where h is the time step and o h2( ) signifies other terms of order h2 . Since each measurement φ is

subject to noise, φ φ φ[ ] [ ] [ ]k k w k= + , the error covariance of ˙φ is

W Eh

W

W

Wh

WT

˙˙ ˙ ˙ ˙

φ

φ

φ

φ

φφ φ φ φ= −( ) −( )

= −[ ] ⋅

⋅ −

=11 2 1

1

2

1

64 4 (B7)

Error covariance due to combined filtering and numerical differentiation

Though measurement noise may reasonably modeled as white noise, the processes of filtering andnumerical differentiation both have the effect of coloring this noise. The methods for estimating noisecovariance given above are therefore not applicable if the two processes are combined, because theoutput of one process is the colored input to the other. The error covariance for this case may, however,

Page 21: A least squares estimation approach to improving the precision …artkuo/Papers/InverseDynamicsKuo.pdf · 2000-05-24 · Revision 0 14 Dec 1995 A least squares estimation approach

Least squares inverse dynamics, A. D. Kuo 21

be estimated by treating both processes as a single filtering operation, that is, by applying eqn. (B5) on

a single transfer function H e jω( ) which combines low-pass filtering and numerical differentiation.

APPENDIX C: INVERSE DYNAMICS IN THREE DIMENSIONS

The proposed method may be formulated for three-dimensional systems with minor changes. Thereis no conceptual change in the methodology, but the equations must be altered to reflect the three-dimensional nature of the system. The vectors fi , τ i , and xi all become vectors of length 3, and the

vector of generalized coordinates φ is of length equal to the number of degrees of freedom in thesystem. (There need not be three rotational degrees of freedom at each joint.) In three dimensions, a

segment’s angular velocity and angular acceleration are functions of φ , φ , and φ , which themselvesare not generally based on segment angles but on an appropriate three-dimensional coordinate scheme.

The method described in Appendix A may be used by deriving the kinematics for body-centeredangular velocity ω i and acceleration ω i , and then applying the three-dimensional form of Euler’sequation:

I I r f s fi i i i i i i i i i iω ω ω τ τ+ × = × − × + −− −1 1 , (C1)

where Ii are 3-by-3 inertia tensors. Other matrices and vectors are trivially redefined to reflect changesin size. One significant change is in the redefinition of P as a block matrix:

P

r s

r s

rn

−−

ˆ ˆ

ˆ ˆ1 1

2 2

0 0

0 0

0 0

0 0

O M

L

where the quantity z refers to the matrix

z

z z

z z

z z

≡−

−−

0

0

0

3 2

3 1

2 1

so that P f⋅ performs the three-dimensional cross products in the right-hand side of (C1). A similar

block matrix using ω i is used in the left-hand side.