Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal...

15
Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE, 1 ALLISON L. KINNEY, 2 ANIL V. RAO, 3 and BENJAMIN J. FREGLY 3 1 Department of Kinesiology, KU Leuven, Tervuursevest 101 bus 1501, 3001 Leuven, Belgium; 2 Department of Mechanical and Aerospace Engineering, University of Dayton, Dayton, OH, USA; and 3 Department of Mechanical & Aerospace Engineering, University of Florida, Gainesville, FL, USA (Received 4 November 2015; accepted 10 March 2016; published online 21 March 2016) Associate Editor Thurmon E. Lockhart oversaw the review of this article. AbstractEstimation of muscle forces during motion involves solving an indeterminate problem (more unknown muscle forces than joint moment constraints), frequently via optimization methods. When the dynamics of muscle acti- vation and contraction are modeled for consistency with muscle physiology, the resulting optimization problem is dynamic and challenging to solve. This study sought to identify a robust and computationally efficient formulation for solving these dynamic optimization problems using direct collocation optimal control methods. Four problem formu- lations were investigated for walking based on both a two and three dimensional model. Formulations differed in the use of either an explicit or implicit representation of contraction dynamics with either muscle length or tendon force as a state variable. The implicit representations introduced additional controls defined as the time derivatives of the states, allowing the nonlinear equations describing contraction dynamics to be imposed as algebraic path constraints, simplifying their evaluation. Problem formula- tion affected computational speed and robustness to the initial guess. The formulation that used explicit contraction dynamics with muscle length as a state failed to converge in most cases. In contrast, the two formulations that used implicit contraction dynamics converged to an optimal solution in all cases for all initial guesses, with tendon force as a state generally being the fastest. Future work should focus on comparing the present approach to other approaches for computing muscle forces. The present approach lacks some of the major limitations of established methods such as static optimization and computed muscle control while remaining computationally efficient. KeywordsMuscle force estimation, Direct collocation, Optimization, Muscle dynamics, Biomechanics. INTRODUCTION Knowledge of muscle forces during healthy and impaired movement could facilitate the development of improved treatments for disorders affecting walking ability or improved training programs to increase athlete performance. As a result, significant research effort has been dedicated to estimating muscle forces during normal (e.g., 1,4,20 ) and impaired (recently e.g., 13,26,31,34 ) movement. Since muscle forces are not directly measurable, these studies have been based on computational models. However, there are many more muscles than degrees of freedom in the human skele- ton, and thus the muscle forces underlying a given motion cannot be uniquely calculated using rigid body dynamics. Consequently, optimization methods have been used to resolve this redundancy by assuming that human movement is produced by optimizing some performance criterion. 24 The numerical challenges arising from the use of optimization methods have led to a trade-off between computational efficiency and consistency with muscle physiology. 5 When the dynamics of muscle activation and contraction are modeled for consistency with muscle physiology, the resulting optimization problem is dynamic and challenging to solve due to the non- linearity and stiffness of the equations describing muscle dynamics (i.e., muscle activation and contrac- tion dynamics). 29 Commonly, the dynamic optimiza- tion problem is solved using direct shooting (e.g., 3,4,1821 ). Direct shooting methods parametrize the controls, in this case muscle excitations, and solve for control parameters that optimize the cost function. The cost function is evaluated using time-marching (time frames are solved sequentially) to simulate the dynamic equations. The main disadvantage of time- Address correspondence to Friedl De Groote, Department of Kinesiology, KU Leuven, Tervuursevest 101 bus 1501, 3001 Leuven, Belgium. Electronic mail: [email protected] Annals of Biomedical Engineering, Vol. 44, No. 10, October 2016 (Ó 2016) pp. 2922–2936 DOI: 10.1007/s10439-016-1591-9 0090-6964/16/1000-2922/0 Ó 2016 The Author(s). This article is published with open access at Springerlink.com 2922

Transcript of Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal...

Page 1: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

Evaluation of Direct Collocation Optimal Control Problem Formulations

for Solving the Muscle Redundancy Problem

FRIEDL DE GROOTE,1 ALLISON L. KINNEY,2 ANIL V. RAO,3 and BENJAMIN J. FREGLY3

1Department of Kinesiology, KU Leuven, Tervuursevest 101 bus 1501, 3001 Leuven, Belgium; 2Department of Mechanical andAerospace Engineering, University of Dayton, Dayton, OH, USA; and 3Department of Mechanical & Aerospace Engineering,

University of Florida, Gainesville, FL, USA

(Received 4 November 2015; accepted 10 March 2016; published online 21 March 2016)

Associate Editor Thurmon E. Lockhart oversaw the review of this article.

Abstract—Estimation of muscle forces during motioninvolves solving an indeterminate problem (more unknownmuscle forces than joint moment constraints), frequently viaoptimization methods. When the dynamics of muscle acti-vation and contraction are modeled for consistency withmuscle physiology, the resulting optimization problem isdynamic and challenging to solve. This study sought toidentify a robust and computationally efficient formulationfor solving these dynamic optimization problems using directcollocation optimal control methods. Four problem formu-lations were investigated for walking based on both a twoand three dimensional model. Formulations differed in theuse of either an explicit or implicit representation ofcontraction dynamics with either muscle length or tendonforce as a state variable. The implicit representationsintroduced additional controls defined as the time derivativesof the states, allowing the nonlinear equations describingcontraction dynamics to be imposed as algebraic pathconstraints, simplifying their evaluation. Problem formula-tion affected computational speed and robustness to theinitial guess. The formulation that used explicit contractiondynamics with muscle length as a state failed to converge inmost cases. In contrast, the two formulations that usedimplicit contraction dynamics converged to an optimalsolution in all cases for all initial guesses, with tendon forceas a state generally being the fastest. Future work shouldfocus on comparing the present approach to otherapproaches for computing muscle forces. The presentapproach lacks some of the major limitations of establishedmethods such as static optimization and computed musclecontrol while remaining computationally efficient.

Keywords—Muscle force estimation, Direct collocation,

Optimization, Muscle dynamics, Biomechanics.

INTRODUCTION

Knowledge of muscle forces during healthy andimpaired movement could facilitate the developmentof improved treatments for disorders affecting walkingability or improved training programs to increaseathlete performance. As a result, significant researcheffort has been dedicated to estimating muscle forcesduring normal (e.g.,1,4,20) and impaired (recentlye.g.,13,26,31,34) movement. Since muscle forces are notdirectly measurable, these studies have been based oncomputational models. However, there are many moremuscles than degrees of freedom in the human skele-ton, and thus the muscle forces underlying a givenmotion cannot be uniquely calculated using rigid bodydynamics. Consequently, optimization methods havebeen used to resolve this redundancy by assuming thathuman movement is produced by optimizing someperformance criterion.24

The numerical challenges arising from the use ofoptimization methods have led to a trade-off betweencomputational efficiency and consistency with musclephysiology.5 When the dynamics of muscle activationand contraction are modeled for consistency withmuscle physiology, the resulting optimization problemis dynamic and challenging to solve due to the non-linearity and stiffness of the equations describingmuscle dynamics (i.e., muscle activation and contrac-tion dynamics).29 Commonly, the dynamic optimiza-tion problem is solved using direct shooting(e.g.,3,4,18–21). Direct shooting methods parametrize thecontrols, in this case muscle excitations, and solve forcontrol parameters that optimize the cost function.The cost function is evaluated using time-marching(time frames are solved sequentially) to simulate thedynamic equations. The main disadvantage of time-

Address correspondence to Friedl De Groote, Department of

Kinesiology, KU Leuven, Tervuursevest 101 bus 1501, 3001 Leuven,

Belgium. Electronic mail: [email protected]

Annals of Biomedical Engineering, Vol. 44, No. 10, October 2016 (� 2016) pp. 2922–2936

DOI: 10.1007/s10439-016-1591-9

0090-6964/16/1000-2922/0 � 2016 The Author(s). This article is published with open access at Springerlink.com

2922

Page 2: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

marching is the high sensitivity of the states to thecontrols due to the long time interval over which thetime-marching method is applied, often resulting inlong computation times. Anderson and Pandy,4 forexample, reported a CPU time of 10,000 h to solve adynamic optimization problem for half a cycle ofwalking. Except for simple problems, convergence ofdynamic optimization problems is difficult to obtainand the solver is interrupted once an acceptable solu-tion is found (e.g.,4,18). In addition, simple controlparameterizations are often used (e.g.,20) that mightnot accurately describe the optimal solution. Note thatin these examples, dynamic optimization was com-bined with a forward dynamics analysis of skeletalmotion. However, others have combined dynamicoptimization with an inverse dynamics analysis ofskeletal motion (e.g.,15). We will use the phrases‘‘musculoskeletal dynamic optimization’’ and ‘‘muscledynamic optimization’’ to distinguish between dy-namic optimization approaches that account for mus-cle dynamics in combination with either a forward(musculoskeletal dynamic optimization) or inverse(muscle dynamic optimization) dynamics simulation toaccount for skeletal dynamics. Due to the use of aninverse dynamics approach, muscle dynamic opti-mization is only applicable if the motion is prescribed,which is the case considered in this manuscript,whereas musculoskeletal dynamic optimization can beused for both tracking and predicting motion.

Due to the numerical challenges involved in solvingdynamic optimization problems, many studies usesimple optimization approaches (e.g.,6) that neglectmuscle activation and contraction dynamics. Neglect-ing activation and contraction dynamics eliminatescoupling between time instants, making the resultingoptimization problem static. Static optimizationapproaches result in a series of small optimizationproblems, with one problem solved at each time in-stant. When the sum of squared muscle activations isused as the performance criterion, these optimizationproblems are quadratic and can be solved very effi-ciently. These approaches are robust and fast and al-low a large community of researchers to estimatemuscle forces with the downside of reduced consis-tency with muscle physiology.8

Whether or not reduced consistency with musclephysiology is important is still controversial. Only afew modeling studies have investigated the influence ofmuscle activation and contraction dynamics onmovement ability and performance. Some have arguedthat modeling muscle activation and contractiondynamics has only a small effect on the computedmuscle forces during walking5 and even running.14

Others, however, have demonstrated that dynamicmuscle behavior has a large influence on predicted

muscle forces during wheelchair propulsion17 and onmaximal sprinting performance.16 Hence, someresearch questions might be addressed best by model-ing muscle activation and contraction dynamics. Arobust and efficient method to solve the dynamicmuscle redundancy problem would therefore greatlybenefit researchers seeking to understand normal andimpaired movement better through assessment ofindividual muscle function.

Direct collocation is a recent promising method-ological improvement over direct shooting to increasethe computational efficiency of dynamic optimizationapproaches.1,2,7,8,29 In contrast to time-marching, di-rect collocation simulates the dynamic equations bysolving all time frames simultaneously. Both the con-trols and the states are parameterized and the dis-cretized state equations are solved while optimizing theperformance criterion, resulting in a non-linear pro-gramming problem (NLP) with a large number ofoptimization variables as compared to direct shootingmethods. The sparsity of these problems, however,makes them tractable, and therefore collocationmethods are often more efficient computationally thanare shooting methods. However, due to the stiffness ofthe dynamic equations, solving the NLP arising from adynamic optimization problem is challenging, and onlya few studies have explored this approach. De Grooteet al.7 presented a sequential approach to solve themuscle dynamic optimization problem. Their approachapproximates non-smooth non-linear dynamic equa-tions by a smooth linear discretization that is updatedevery iteration. Though computationally efficient,convergence of this approach to a local optimum of theoriginal dynamic optimization problem could not beguaranteed. Van den Bogert et al. applied direct col-location to a non-linear musculoskeletal dynamicoptimization problem for walking. They obtained fastconvergence but did not verify the optimality of theirnumerical solution,1,2,29 which would provide confi-dence that direct collocation is an appropriate methodfor solving the dynamic optimization problems. Inboth cases, convergence relied heavily on the avail-ability of a good initial guess, making existing directcollocation formulations less suitable for use by non-experts.29

This study sought to identify a formulation forsolving the muscle dynamic optimization problemusing direct collocation optimal control methods thatis computationally efficient and robust to the initialguess. Since numerical optimization is sensitive toproblem formulation, four optimal control problemformulations were investigated. Each formulationoptimized the same performance criterion, modeledactivation dynamics, and used either an explicit orimplicit representation of contraction dynamics with

Optimal Control Formulations to Solve Muscle Redundancy 2923

Page 3: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

either normalized muscle fiber length or normalizedtendon force as a state variable. The implicit repre-sentations introduced additional controls defined asthe time derivatives of the states, resulting in verysimple dynamic equations and allowing the nonlinearequations describing muscle contraction dynamics tobe imposed as algebraic path constraints, simplifyingtheir evaluation. The different problem formulationswere evaluated by estimating muscle forces duringnormal walking using both a simple and a complexmusculoskeletal model. The optimality of the solutionsobtained was confirmed using two different approachesfollowing the suggestion of Hicks and al.12 to verifysoftware used for musculoskeletal modeling and sim-ulation. The robustness and efficiency of the proposedimplicit formulations might enable the use of muscledynamic optimization by non-experts seeking toinvestigate the effect of muscle dynamics on the effi-ciency and performance of human movement.

MATERIALS AND METHODS

Musculoskeletal Model

To perform the proposed study, we started with asimple and a complex musculoskeletal model takenfrom the Models folder installed with OpenSim 3.2.9

The simple model (gait10dof18musc) contained threedegrees of freedom (hip, knee, and ankle angle in thesagittal plane) and nine muscles per leg, while thecomplex model (gait2392) contained five degrees offreedom (three at the hip and one at the knee andankle) and 43 muscles per leg.

Each muscle in the model was represented as a Hill-type muscle-tendon unit35 (Fig. 1). Muscle dynamicswas described by two nonlinear, first order differentialequations—activation and contraction dynamics—thatrelate the control—muscle excitation—to thestates—muscle activation and either normalized fiberlength or normalized tendon force. Activationdynamics was modeled based on Winters,27,33 using atanh function to smoothly transition between activa-tion and deactivation:

f ¼ 0:5 tanhðbðe� aÞÞ; ð1Þ

da

dt¼ 1

sa 0:5þ 1:5að Þ fþ 0:5ð Þ þ 0:5þ 1:5a

sd�fþ 0:5ð Þ

� �e� að Þ;

ð2Þ

where e is muscle excitation, a is muscle activation,sa = 0.015 s is the activation time constant,sd = 0.060 s is the deactivation time constant, andb = 0.1 is a parameter determining transitionsmoothness. Contraction dynamics was described

based on Hill’s model35 (Fig. 1). The muscle-tendonactuator consisted of a tendon with length lT in serieswith a muscle with fiber length lM, where the pennationangle a defines the angle between the tendon and themuscle fibers. Properties of muscle and tendon weredescribed by dimensionless characteristics (Fig. 2).Five parameters scaled these generic characteristics for

a specific muscle: optimal fiber length l0M, maximal

muscle fiber velocity vmaxM , peak isometric muscle force

F0M, tendon slack length lsT, and pennation angle at

optimal fiber length a0. Values for these five parame-ters were taken from the OpenSim models describedabove. Tendon was modeled by a nonlinear spring:

FT ¼ F0Mft ~lT� �

; ð3Þ

where FT is tendon force, ~lT ¼ lT=lsT is normalized

tendon length and ft is the tendon force-length char-acteristic (see online supplement for mathematicalexpression). Muscle was modeled by a contractile ele-ment in parallel with a passive element:

FM ¼ F0M afact ~lM

� �fv ~vMð Þ þ fpas ~lM

� �� �; ð4Þ

where FM is muscle force, ~lM ¼ lM=loM is normalizedfiber length, ~vM ¼ vM=vmax

M is normalized fiber velocity,

and fact, fpas, and fv are the active muscle force-length,passive muscle force-length, and muscle force-velocitycharacteristics, respectively (see online supplement formathematical expressions). The interaction betweenmuscle and tendon was described by (Fig. 1):

lMT ¼ lT þ lM cos a; ð5Þ

lM sin a ¼ l0M sin a0; ð6Þ

FIGURE 1. Schematic representation of the Hill musclemodel.35 A first-order lumped parameter model accounting forthe interaction of the force–length–velocity properties ofmuscle and the elastic properties of tendon. The MT-actuatorcomprises a tendon, T, in series with a muscle. The muscleconsists of a contractile element, CE, parallel to a passiveelement, PE. The tendon is modeled as a nonlinear spring. lMis muscle fiber length, lT is tendon length, and lMT is muscle-tendon length. The pennation angle a is the angle between theorientation of the muscle fibers and the tendon.

DE GROOTE et al.2924

Page 4: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

FT ¼ FM cos a: ð7Þ

The five Eqs. (3)–(7) determine the five unknowns FT,FM, lT, lM, a, given the input a and the muscle-tendonlength lMT. The dynamic nature of the Hill model re-sults from the fiber velocity dependence of Eq. (4).Note, however, that under the assumption of a rigidtendon and hence constant tendon length lT ¼ lsT,

muscle fiber length and velocity are completely deter-mined by muscle-tendon length lMT and velocity vMT

(Eqs. 5, 6), which can be computed from skeletalkinematics, thereby allowing algebraic solution ofEqs. (3)–(7).

Given the algebraic relationship between muscle fi-ber length and tendon force, it is equally valid tochoose muscle length or tendon force as the statevariable when solving Eqs. (3)–(7).25 All characteristicsare at least second order continuous and ft is at leastthird order continuous (Fig. 2). For numerical reasons,ft is allowed to be less than zero instead of equal tozero when the tendon is slack. Negative tendon forcesare non-physiological but will never occur when mus-cle and tendon force are equilibrated (Eq. 7), sincemuscle force cannot drop below zero (Eq. 4). Thismodification of ft makes the solution of Eqs. (3)–(7)better conditioned when the muscle-tendon actuator isslack (zero tendon force corresponds to normalizedtendon length of 1 rather than a whole range of tendonlengths).

Experimental Data and Data Processing

Experimental data for one walking cycle were takenfrom the Models folder installed with OpenSim 3.2,since the availability of this dataset allows otherresearchers to compare their methods to the one pre-sented in this paper. Experimental marker trajectories

were sampled at 60 Hz. The exact same experimentaldata were used for the simple and complex model. Themuscle force distribution underlying this walking mo-tion was computed for the right limb of both modelsby combining dynamic optimization with an inversedynamics analysis of skeletal motion where measuredjoint kinematics and external (ground reaction) forceswere inputs and the joint reaction torques were out-puts.7,15 The inverse dynamics joint torques along withthe muscle-tendon lengths and velocities and themuscle moment arms were calculated using the stan-dard workflow in OpenSim 3.2 and used as inputs forthe dynamic optimization problems described below(see Fig. 3 for more details). These problems weresolved for the controls and states (see below for aformulation-dependent definition) over the motioncycle. The initial and final states, however, are un-known. We found that the initial and final states onlyinfluenced the optimal controls and states over a per-iod of about 50 ms at the beginning and end of thetime interval over which the dynamic optimizationproblem was solved. Therefore, problems were solvedfor a time interval containing five additional datapoints at the beginning and end of the motion cycle tolimit the influence of the unknown initial and finalstate (the final state influences the optimal control atpreceding time instants) on the solution for the motioncycle under consideration and results for these addi-tional data points were not reported.‘

Problem Formulations and Solution Method

The goal of each optimization problem was to findmuscle excitations bounded between 0 and 1 thatproduced the specified inverse dynamics joint torqueswhile minimizing the integral of the sum of squared

FIGURE 2. Characteristics describing normalized muscle-tendon properties. Tendon force-length relationship ft ð~lTÞ with ~lT nor-malized tendon length (left), active (solid line) and passive (dashed line) muscle force-length relationships factð~lMÞ and fpasð~lMÞ with~lM normalized muscle length (middle), and muscle force-velocity relationship fvð~vMÞ with ~vM normalized muscle velocity (right).Negative tendon forces are non-physiological but will never occur when muscle and tendon force are equilibrated (Eq. 7), sincemuscle force cannot drop below zero (Eq. 4). This modification of ft makes the solution of Eqs. (3)–(7) better conditioned when themuscle-tendon actuator is slack (zero tendon force corresponds to normalized tendon length of 1 rather than a whole range oftendon lengths).

Optimal Control Formulations to Solve Muscle Redundancy 2925

Page 5: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

excitations for all muscles over the duration of themotion. The use of a quadratic cost functional was firstproposed by Pedotti at al.24 and is a measure of mus-cular effort. Activation and contraction dynamics re-late muscle excitations to muscle forces whereas thepre-computed muscle moment arms relate muscle for-ces to joint torques. For each degree of freedom, anideal actuator that can produce torque instantaneouslywas added to the model to guarantee problem feasi-bility in the presence of modeling and measurementerrors. The use of these non-physiological actuatorswas discouraged by weighting their contributionheavily in the cost function. This approach resulted inthe following dynamic optimization problems.

Cost Functional

The cost functional consisted of two terms. The firstterm represented muscular effort modeled by the inte-gral of the sum of squared muscle excitations, whereasthe second term penalized the use of the non-physio-logical ideal torque actuators:

rtf

t0

XMm¼1

e2m þ wXKk¼1

e2Tk

!dt ð8Þ

where t is time, t0 and tf are the initial and final time,respectively, m = 1,…,M indicates the different mus-cles, eTk are the inputs for the ideal actuators,k = 1,…,K indicates the different degrees of freedom,and w = 1000 is a weight penalizing the use of the non-physiological ideal actuators. This weight was chosensuch that the contribution of the ideal torque actuatorsis below 1 Nm for walking, which we think is accept-able given measurement and modeling uncertainties.

Bounds

Muscle excitations were bounded between 0 and 1whereas the ideal torque actuators could generate bothpositive and negative torques:

0 � em � 1 ð9Þ

�1 � eTk � 1 ð10Þ

for m = 1,…, M and k = 1,…, K, respectively.

Path Constraints

The pre-computed muscle moment arms related themuscle forces to the inverse dynamics joint reactiontorques:

FIGURE 3. Block diagram illustrating the process and software used to solve the muscle redundancy problem. Setup-files forOpenSim’s Scale and Inverse Kinematics Tools were taken from the Model folder installed with OpenSim 3.2. The InverseDynamics Tool was set up to filter the coordinates using a frequency of 6 Hz.

DE GROOTE et al.2926

Page 6: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

TIDk ¼XMm¼1

dmkFTm þ eTkTmax ð11Þ

for k = 1,…,K, where TIDk is the inverse dynamicsjoint torque, dmk is the moment arm of muscle m withrespect to the kth degree of freedom, andTmax = 150 Nm is the maximal torque output of theideal actuators. Tmax was chosen to have the sameorder of magnitude as the maximal joint torques ex-erted during the motion to guarantee feasibility of thedynamic optimization problem.

Constraints Imposing Muscle Dynamics

Activation dynamics was imposed using Eqs. (1)–(2). Contraction dynamics was imposed using fourdifferent formulations as described below:

1. Using normalized tendon force ~FT ¼ FT

F0M

as astate:

d ~FT

dt¼ f1ða; ~FTÞ: ð12Þ

2. Using normalized muscle fiber length as a state:

d~lMdt

¼ f2ða; ~lMÞ: ð13Þ

This formulation of contraction dynamics was typ-ically used in previous methods (e.g.,9,29).

3. Using normalized tendon force as a state andintroducing uF, the scaled time derivative of thenormalized tendon force, as a new controlsimplifying the contraction dynamic equations:

d ~FT

dt¼ sFuF; ð14Þ

where sF = 10 is a scaling factor. The scaling factorwas chosen such that the controls uF had the sameorder of magnitude as the other controls and the states.The Hill model was then imposed as a path constraint:

f3 a; ~FT; uF� �

¼ 0: ð15Þ

4. Using normalized muscle fiber length as a stateand introducing uv, the scaled time derivative ofthe normalized muscle length, as a new controlsimplifying the contraction dynamic equations:

d~lMdt

¼ vmaxM

lOMuv: ð16Þ

where vmaxM =l0M is a scaling factor that converts uv,

normalized muscle fiber velocity ~vM ¼ vMvmaxM, into the first

time derivative of normalized muscle fiber length. Notethat normalized muscle fiber velocity is not the firsttime derivative of normalized muscle length unlessnormalized time is being used. The Hill model was thenimposed as a path constraint:

f4 a; ~lM; uv� �

¼ 0: ð17Þ

All functions fi, i = 1,…,4, were derived from the Hillmodel described by Eqs. (3)–(7) (see online supplementfor full-form expressions). In formulation 2 and 4,which use normalized muscle fiber length as a state, FT

was computed from ~lM based on Eqs. (5), (6), and (3)to evaluate joint torques (Eq. 11). Evaluating f1 and f2required dividing by muscle activation. Muscle activa-tion was bounded between 0.01 and 1 for all formu-lations to allow comparison of the solutions obtainedwith the different formulations. The optimal controlsand cost function are only expected to be identical ifthe optimization problems are equivalent, which wouldnot be the case if the states were bounded differently.Normalized muscle forces were bounded between 0and 3, normalized muscle fiber lengths were boundedbetween 0.4 and 1.6, controls uF were boundedbetween 250 and 50, and controls uv were boundedbetween 21 and 1. At the optimal solution, only thebounds on muscle excitations and muscle activationswere active. The feasible set of formulations 3 and 4differs from the feasible set of formulations 1 and 2 dueto the bounds on the additional controls. However,unless these bounds are active at the optimal solution,all formulations have the same globally optimal muscleexcitations. Initial and final states were constrained tobe within the bounds specified for the states but werenot prescribed.

The four muscle dynamic optimization problemswere solved numerically through direct collocationusing GPOPS-II optimal control software.22 GPOPS-II is a MATLAB program that transcribes the dynamicoptimization problem to a NLP using a Legendre-Guass-Radau (LGR) quadrature collocation method.All problems were solved on a mesh with 100 equallyspaced intervals using third order LGR collocation.Analysis of the mesh accuracy (see below) showed thata further increase in the number of mesh intervals hadonly a small influence on the optimal solution. Theinterior point solver IPOPT30 was used to solve theresulting large-scale NLPs using second derivativeinformation with a NLP relative error tolerance of1e26 and a maximum of 2000 iterations. The open-source automatic differentiation software ADiGator23

was used to generate derivative source code for use byIPOPT. Automatic differentiation generates analyticderivatives of general functions defined by computer

Optimal Control Formulations to Solve Muscle Redundancy 2927

Page 7: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

code by applying differentiation rules (e.g., product,quotient, and chain rules) on the elementary functionoperations that underlie the code.23 All computationswere performed on an Intel Core i7-4600U 2.1 GHzprocessor with 16 GB RAM. This computation pro-cess is illustrated by the block diagram in Fig. 3.

Analysis of Results

The four problem formulations were evaluated byestimating muscle forces over one walking cycle usingboth the simple and complex musculoskeletal model.Convergence, optimal cost function values, meshaccuracy, and CPU times for the different formula-tions were compared. Mesh accuracy was studied bycalculating the root mean square (RMS) differencebetween the excitations calculated using 100 and 200mesh intervals, respectively. Solution robustnessagainst changes in the initial guess for the controls andthe states was also investigated. Robustness was de-fined as the RMS difference between excitations cal-culated using a hot start and an arbitrary initial guess.The hot start was obtained from muscle activationscalculated using a previously proposed approach thataccounted for activation dynamics but not contractiondynamics.8 These activations were used as the initialguess for both the muscle excitations and activations.Dynamically consistent muscle fiber lengths and mus-cle forces as well as muscle velocities and timederivatives of muscle forces were computed based oncontraction dynamics using the initial guess for theactivations as an input. These quantities were used asthe initial guess for the other controls and states. Thearbitrary initial guess consisted of constant values forall controls and states (initial guess of 0.2 for excita-tions, activations, and normalized tendon force; initialguess of 1 for normalized fiber lengths, initial guess of0 for all other controls and states). In addition, theeffect of bounding muscle activations between 0 and 1instead of between 0.01 and 1 on the CPU time andmesh accuracy for the third and fourth formulations,which do not require division by muscle activation,was investigated.

Optimality of the results was verified two ways.First, a post-optimality analysis as described in detailby Graham and Rao11 was performed to investigatethe proximity of the numerical solution to the trueoptimal solution of the dynamic optimization problem.To this end, the first-order optimality condition thatthe costate is the sensitivity of the cost with respect tothe state along the optimal solution was verified basedon the equivalence between the NLP and calculus ofvariations optimality conditions for LRG collocationmethods. A discrete approximation of the costate ofthe dynamic optimization problem was obtained by a

linear transformation of the Lagrange multipliers ofthe NLP arising from LGR collocation,10 and thiscomputation is automatically performed by GPOPS-IIwhen solving an optimization problem. To performthis post-optimality analysis, the dynamic optimizationproblem was resolved over the walking cycle imposingthe previously obtained solution at the beginning ofthe walking cycle as the initial state. The sensitivity ofthe cost with respect to the initial state was approxi-mated by resolving the dynamic optimization problemusing a perturbed initial state and computing the ratioof the change in cost to the change in initial state. Bycomparing the costate approximations at the initialtime with the sensitivity of the cost to changes of 0.001in the initial activation of each muscle, we evaluatedthe optimality of the obtained solutions. For thisanalysis, GPOPS-II’s mesh refinement algorithm wasused. Since contraction dynamics was imposed as apath constraint in formulations 3 and 4 and GPOPS-II’s mesh refinement algorithm does not account forpath constraints, the mesh was refined based on acti-vation dynamics accuracy only. This post-optimalityanalysis was performed for formulations 3 and 4 only,since formulations 1 and 2 did not always converge,and only for the simple model, since problem formu-lation and solution methods are not model-specific andcomputation times were much lower for the simplemodel.

Second, a less formal verification was performed byusing the equivalence between static and dynamicoptimization in the limit of zero activation and deac-tivation time constants and infinite tendon stiffness.Since the static optimization problem is quadratic, theglobal optimality of its solution can be guaranteed.Close proximity of the solution of the dynamic opti-mization problem with small activation and deactiva-tion time constants and high tendon stiffness to thesolution of the static optimization problem is thereforean indication of the optimality of the dynamic opti-mization solution. It is important to note here thatoptimality of the dynamic optimization solution of theproblem with modified parameters does not guaranteeoptimality of the solution of the problem with originalparameters. We resolved the dynamic optimizationproblem with activation and deactivation time con-stants of 5 ms instead of 15 and 60 ms, respectively,and by increasing the value of parameter kT deter-mining the steepness of the tendon force length char-acteristic from 35 to 1000 (see also online supplement).We then compared the solution of this limit problem tothe solution of a corresponding static optimizationproblem. The static optimization problem was config-ured to match the dynamic optimization problem asclosely as possible. The cost function was the integrandof the cost functional of the dynamic optimization

DE GROOTE et al.2928

Page 8: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

problem evaluated at each time instant i, where muscleexcitation was replaced by muscle activation. Muscleactivations were bounded between 0 and 1 whereas theinputs for the ideal torque actuators—eTk—werebounded between -1 and 1. Pre-computed musclemoment arms were used to relate the tendon forces andideal torques to the inverse dynamics joint reactiontorques (Eq. 11). Muscle activation and tendon forcewere linearly related through Eqs. (4) and (7) using arigid tendon with length lsT. The static optimization

problem was solved using MATLAB’s lsqlin.

RESULTS

Optimal control problem formulation influencedconvergence (Tables 1, 2). Only formulations 3 and 4,which used extra controls and an implicit formulationof contraction dynamics, converged for all conditionsevaluated in this study. Convergence of formulation 2,which used normalized fiber length as a state, waspoorest. The different formulations converged tonearly identical optimal muscle excitations for both thesimple (Fig. 4) and complex model (Fig. 5). In allcases, only the lower bounds on muscle excitations andmuscle activations were active. The contributions ofthe ideal torque actuators to the inverse dynamicstorques were always smaller than 0.7 Nm. These idealtorques do not exceed what is expected given mea-surement and modeling uncertainty. The reader is re-ferred to the online supplement for figures of ideal

torques and muscle activations and tendon forces of allmuscles of the complex model.

For the simple model, all formulations except for-mulation 2 converged from both the hot start and thearbitrary initial guess. Formulation 2 converged whengiven the optimal solution of formulation 4 as an ini-tial guess. Optimal solutions of the different formula-tions and for different initial guesses were nearlyidentical as can be seen from the cost function valuesand robustness against initial guess in Table 1 andfrom the optimal muscle excitation patterns in Fig. 4.Mesh accuracy was similar for formulations 1, 3, and4. CPU times were between 7 and 45 s with formula-tion 3 having the lowest CPU times.

For the complex model, only formulations 3 and 4converged from both the hot start and the arbitraryinitial guess. Formulation 1 converged only from the hotstart and formulation 2 did not converge from either thehot start or the arbitrary initial guess (Table 2). Optimalsolutions of the different formulations and for differentinitial guesses were nearly identical, as can be seen fromthe cost function values and robustness against initialguess in Table 2 and from the optimal muscle excitationpatterns in Fig. 5. Mesh accuracy was similar for for-mulations 1, 3, and 4. CPU times were between 988 and2723 s with formulation 3 having the lowest CPU times.

Allowing activations to drop to zero for formula-tions 3 and 4, which did not require dividing by muscleactivation to evaluate contraction dynamics, had asmall but positive effect on mesh accuracy and almostalways reduced computation time (Tables 3, 4).

TABLE 1. Comparison of different problem formulations for the simple model.

Formulation

Hot start Arbitrary initial guess

1 2* 3 4 1 2 3 4

Convergence Yes Yes Yes Yes Yes No Yes Yes

Optimal value 0.3339 0.3378 0.3336 0.3385 0.3339 – 0.3339 0.3385

Accuracy 0.0024 0.0044 0.0024 0.0026 0.0024 – 0.0024 0.0026

CPU time (s) 15 193 13 22 27 – 7 45

Robustness 3.59e26 – 1.17e24 1.75e27 3.59e26 – 1.17e24 1.75e27

*Formulation 2 did not converge from the hot start but converged from the optimal solution of formulation 4.

TABLE 2. Comparison of different problem formulations for the complex model.

Formulation

Hot start Arbitrary initial guess

1 2 3 4 1 2 3 4

Convergence Yes No Yes Yes No No Yes Yes

Optimal value 0.9600 – 0.9590 0.957 – – 0.9591 0.9589

Accuracy 0.0021 – 0.020 0.0020 – – 0.0020 0.0020

CPU time (s) 1727 – 1937 1389 – – 988 2723

Robustness – – 8.90e25 1.89e24 – – 8.90e25 1.89e24

Robustness could not be computed for formulation 1, since convergence was not obtained for the arbitrary initial guess.

Optimal Control Formulations to Solve Muscle Redundancy 2929

Page 9: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

Both optimality tests confirmed the close proximityof the numerical solutions to the optimal solution ofthe dynamic optimization problems. First, the costateapproximations at the initial time matched the finitedifference approximation of the sensitivity of the costwith respect to the initial state (Table 5). Second, theRMS difference between the optimal activationsobtained by static and dynamic optimization decreasedby a factor ten from 0.0223 to 0.0027 when activationand deactivation time constants were decreased andtendon stiffness was increased (formulation 3, activa-tions bounded between 0 and 1, 100 mesh intervals),showing that the dynamic optimization solutionapproximated the static optimization solution whenthe two approaches were made similar. With a furtherdecrease in time constants and increase in tendonstiffness, no accurate solution was obtained on a meshwith 100 intervals due to the increased stiffness ofmuscle activation and contraction dynamics.

DISCUSSION

This study evaluated four possible optimal controlproblem formulations for solving the muscle redun-

dancy problem while taking muscle activation andcontraction dynamics into account. Although all for-mulations converged from at least one initial guess forthe simple model, the formulations that used explicitcontraction dynamics failed to converge for all casesthat were evaluated in this study (Tables 1, 2). Theformulation with explicit contraction dynamics andnormalized fiber length as the state variable wasespecially sensitive to the initial guess. In contrast, thetwo formulations that used implicit contractiondynamics converged to an optimal solution in all casesfor all initial guesses. These findings suggest that use ofimplicit contraction dynamics may result in the mostrobust formulation of the dynamic optimizationproblem when using direct collocation.

Introducing additional controls that are propor-tional to the time derivative of the states resulted invery simple dynamic equations. The nonlinear equa-tions describing contraction dynamics were then im-posed as algebraic path constraints in their implicitform. By using the implicit form of the Hill model,evaluation of contraction dynamics did not requireinversion of normalized force-velocity curves. Incombination with the bounds on the controls andstates, this formulation always resulted in well-boun-

FIGURE 4. Optimal muscle excitations for the nine muscles of the simple model computed using formulation 1 (black), formu-lation 2 (orange), formulation 3 (gray), and formulation 4 (red). The different solutions nearly coincide.

DE GROOTE et al.2930

Page 10: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

ded values for all variables in the Hill model (Eqs. 3–7), which may have helped convergence. This well-bounded nature could not be guaranteed for formu-

lations that used explicit contraction dynamics andrequired inversion of the force-velocity characteristicin combination with unbounded values for the state

FIGURE 5. Optimal muscle excitations for a subset of the muscles of the complex model computed using formulation 1 (black),formulation 3 (gray), and formulation 4 (red). The different solutions nearly coincide.

TABLE 3. Comparison of formulations 3 and 4 with muscle activation bound between 0 and 1 for the simple model.

Formulation

Hot start Arbitrary initial guess

3 4 3 4

Convergence Yes Yes Yes Yes

Optimal value 0.2970 0.3013 0.2969 0.3013

Accuracy 0.0023 0.0024 0.0023 0.0024

CPU time (s) 11 11 6 36

Robustness 1.15e24 1.61e27 1.15e24 1.61e27

TABLE 4. Comparison of formulations 3 and 4 with muscle activation bound between 0 and 1 for the complex model.

Formulation

Hot start Arbitrary initial guess

3 4 3 4

Convergence Yes Yes Yes Yes

Optimal value 0.8647 0.8643 0.8646 0.8643

Accuracy 0.0019 0.0019 0.0019 0.0019

CPU time (s) 1520 1037 1170 2025

Robustness 9.46e25 8.91e26 9.46e25 8.91e26

Optimal Control Formulations to Solve Muscle Redundancy 2931

Page 11: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

(tendon force or muscle fiber length) derivatives. Fur-thermore, formulations that used tendon force as astate generally converged faster due to fewer NLPiterations. This result might be explained by the morelinear relationship between muscle activation andtendon force than between muscle activation andmuscle fiber length.

An additional advantage of these implicit formula-tions is that muscle activations are allowed to drop tozero, since no division by muscle activation is requiredto evaluate contraction dynamics. When muscle acti-vation is small, the equilibrium between muscle forceand tendon force (substitute Eqs. 3–4 into Eq. 7) de-fines muscle fiber velocity poorly since the fibervelocity dependent term is multiplied by a small valuefor activation. When muscle activation is zero, how-ever, muscle length is fully determined by the equilib-rium between passive muscle force and tendon force.This observation may explain why imposing lowerbounds of 0 instead of 0.01 on muscle activations had apositive effect on computation times.

Although direct collocation methods for solving themuscle redundancy problem have been explored inprevious studies,1,2,7,8,29 this study is the first toinvestigate the influence of different problem formu-lations on the accuracy and robustness of the numer-ical solution. The results of this study are especiallyimportant since optimality of the obtained solutionswas never checked previously confirming the statementof Hicks et al. that verification of numerical methodsused to solve for the unknowns in a simulation is oftenoverlooked.12 In addition, robustness as well asnumerical challenges related to the convergence ofgradient-based solvers have been identified as animportant limitation to the use of dynamic optimiza-tion by non-experts.14,29 The close proximity of thenumerical solutions to the optimal solution of thedynamic optimization problems was confirmed twoways. In addition, the direct collocation solutions ofthe formulations that used implicit contraction

dynamics have low dependence on the initial guess andhence these formulations can be considered to be ro-bust. Moreover, the low dependence on the initialguess is an indication that there is no need to useglobal optimization methods for these particularproblems. Results from two really different initialguesses were reported—a hot start that can beobtained in a few CPU seconds8 and arbitrary con-stant values in time for all controls and states. We didnot explore the use of a completely random initialguess, since better than random initial guesses arereadily available.

Direct collocation is a computationally efficientalternative to direct shooting methods, which arecommonly used. In contrast to shooting methods thattypically require large computation times and often donot converge to an optimal solution, we obtainedconvergence in 7 to 45 s of CPU time for a simplemodel and 16–45 min of CPU time for a complexmodel. Using automatic differentiation reduced CPUtimes by about a factor of ten compared to using finitedifference derivatives. Automatic differentiation is analternative for numerical or symbolic differentiation.Numerical differentiation by finite differences requiresmultiple function evaluations and is less accurate dueto the finite approximation. Symbolic differentiationalso results in analytic derivatives but has the disad-vantage of being sensitive to the complexity of thefunction.23 The increase in computational efficiencywhen using automatic differentiation followed fromthe reduced CPU time in NLP function evaluationsand for the formulations with fiber length as a statealso from the reduced number of NLP iterations. Thereduced number of NLP iterations might be explainedby the higher gain in accuracy for the formulationswith fiber length as a state that rely on the highly non-linear relation between muscle activity and fiber length.Additional advantages of our method over directshooting methods are that we do not need to use asimple parametrization of the controls (e.g., block

TABLE 5. Post-optimality results for formulations 3 and 4.

HAM BFsh GM IP RF VA GA SOL TA

Formulation 3—simple model

k�aðt0Þ 20.0059 20.0014 0.0021 20.0027 0.0026 0.0069 20.0030 0.0049 20.0052

DJ/Da 20.0058 20.0013 0.0021 20.0027 0.0030 0.0075 20.0030 0.0048 20.0051

Formulation 4—simple model

k�aðt0Þ 20.0059 20.0014 0.0021 20.0027 0.0026 0.0069 20.0030 0.0049 20.0052

DJ/Da 20.0058 20.0015 0.0022* 20.0025 0.0031 0.0076 20.0030 0.0050 20.0051

Analysis was performed for formulations 3 and 4 with muscle activation bound between 0 and 1 for the simple model. k�aðt0Þ is the optimal

costate of muscle activation at the initial time, and DJ/Da is the ratio of the change in cost to the change in initial activation. Muscle names are

abbreviated: HAM for hamstrings, BFsh for biceps femoris short head, GM for gluteus maximus, IP for iliopsoas, VA for vasti, GA for

gastrocnemii, SOL for soleus, and TA for tibialis anterior.

* Computed with a Da of 0.0005 instead of 0.001.

DE GROOTE et al.2932

Page 12: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

patterns20) to keep the problem tractable, and we caneasily assess the accuracy of the numerical solution.

Direct comparison of CPU times with results fromthe literature is difficult, since in contrast to themajority of reported studies, we used an inversedynamics instead of forward dynamics approach forskeletal dynamics. Since skeletal dynamics was solvedby an inverse dynamics analysis preceding our opti-mizations, only muscle dynamics instead of muscleplus skeletal dynamics was evaluated during the opti-mization. As a result, computational efficiency wasincreased. In addition, CPU times are influenced byproblem formulation and the specific motion beingtracked. Nevertheless, Menegaldo et al.15 needed about55 min of CPU time to solve a similar dynamic opti-mization problem preceded by an inverse dynamicsanalysis of skeletal motion for a simple three degree-of-freedom planar model with ten muscles based on directshooting, whereas we required less than a minute ofCPU time for a model of comparable complexity.

Van den Bogert et al.29 have previously used directcollocation in combination with an implicit formula-tion of muscle contraction dynamics, and althoughtheir findings about computational efficiency weresimilar to ours, they found that convergence dependedcritically on the availability of a good initial guess.There are several possible reasons for this difference inrobustness. First, van den Bogert et al. use a forwardinstead of inverse dynamics approach to solve forskeletal motion, resulting in a harder dynamic opti-mization problem. Second, we not only used an im-plicit formulation of contraction dynamics but alsointroduced additional controls defined as the statederivatives, which were bounded. The well-boundednature of the optimization problem might have im-proved the robustness to the initial guess. Third, amore accurate collocation method—Legendre-Guass-Radau quadrature instead of midpoint Euler—wasused in this study.

The proposed muscle dynamic optimizationapproach is a robust alternative for computed musclecontrol (CMC), a popular approach to computedynamically consistent muscle controls that track agiven motion.28 Instead of solving a dynamic opti-mization problem, CMC uses static optimization alongwith feedforward and feedback control to drive amusculoskeletal model towards the experimentallymeasured kinematics. However, due to the combina-tion of static optimization and a forward simulation ofmuscle and skeleton dynamics based on time-march-ing, muscle forces computed with CMC are extremelysensitive to model parameter values (e.g., segmentmass and inertia) and the instant in time at which thesimulation is started.32 In contrast, our approach isrobust against small changes in model parameter val-

ues because of the low sensitivity of inverse dynamicssimulations to mass and inertia parameters32 and theabsence of time-marching. In addition, the muscleforce solution does not depend on the initial and finaltime except for a short time interval of about 50 ms atthe beginning and end of the motion due to the un-known initial and final state. The computational effi-ciency of the direct collocation method proposed inthis paper is comparable to CMC and hence the use ofa robust, dynamic optimization method instead ofCMC comes at no additional cost.

Computation times are still considerably higher fordynamic than for static optimization and hence mod-eling of muscle dynamics should be motivated by theresearch question. Some have argued that static anddynamic optimization yield similar muscle forces dur-ing walking5 and even running.14 To illustrate that thissimilarity should be assessed in light of the researchquestion, we compared static and dynamic optimiza-tion solutions for walking and running. Solutions forrunning were obtained by applying the same modelsand methods on one cycle of treadmill running datacollected at 9.5 km/h from a male test subject (64.8 kg,1.76 m). The subject provided written informed con-sent in accordance with the ethical committee of UZLeuven. Static and dynamic optimization yielded dif-ferent muscle activations during walking for muscleswith long, compliant tendons such as the gastrocnemiiand soleus, where the rigid tendon assumption of staticoptimization is less valid (Fig. 6). The correspondingmuscle forces, however, were very similar for the twooptimization approaches. Hence, a compliant tendonallows generating the same amount of force with lowermuscle activation by allowing the muscle to operatecloser to its optimal fiber length and hence augmentsthe efficiency of the muscle. These results suggest thatmodeling of muscle dynamics may be important tostudy muscle efficiency during walking but may nothave a large influence on the computation of jointcontact forces, which are mainly determined by muscleforces. Modeling muscle dynamics is more importantto study faster motions such as running where theneglect of muscle dynamics limits the performance ofthe model, resulting in maximal muscle activity forsome muscles (Fig. 7) and different muscle force pre-dictions for static and dynamic optimization. Thisfinding is in accordance with Miller et al.,16 who foundthat sprinting performance significantly decreases inthe absence of tendon compliance. Hence, we concludethat modeling muscle dynamics may be important toassess efficiency and performance, even in slow mo-tions, and to assess muscle forces in faster motions. Inaddition, the use of muscle dynamic optimization in-stead of static optimization enables using time-depen-dent cost functions such as metabolic energy

Optimal Control Formulations to Solve Muscle Redundancy 2933

Page 13: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

consumption; studying the effect of tendon stiffness,which is especially relevant in elderly and athletes;including history dependent muscle dynamics; andaccounting for muscle state feedback.

An important limitation of our study is that we usedinverse dynamics to solve skeletal dynamics, which isapplicable only if skeletal motion is known a priori.Previously, forward dynamic approaches have beenused to assess muscle contributions to a measuredmotion (e.g.,20). This approach was possibly motivatedby the lack of inverse dynamic methods that accountedfor muscle dynamics at that time. Our method providesa computationally efficient alternative for forwarddynamic approaches that track a known motion, but itcannot replace forward dynamic approaches that areused to predict optimal motion patterns. Note thatunder the assumption of zero tracking errors and equalcontribution of the ideal torque actuators, the use ofan inverse and forward dynamic analysis of skeletalmotion to estimate muscle forces for a given motionare equivalent, i.e., they result in the same muscleexcitation patterns. Our inverse dynamic approach,however, does not allow non-zero tracking errors. Weplan to extend the proposed direct collocation methodto include skeletal dynamics, enabling predictive sim-

ulations in the future. Another limitation of this studyis that results for only two motion cycles werereported. However, the method worked equally wellwhen applied to additional data (walking, running,and perturbed standing of different subjects).

The use of gradient-based optimization methodsrequires that objective and constraint functions aretwice continuously differentiable. Therefore we had touse a smooth approximation of the activationdynamics model proposed by Winters et al.33 Weinvestigated the influence of the parameter b definingthe smoothness of the transition between activationand deactivation dynamics on the optimal solution andfound that it was small. Similarly, all normalizedmuscle force-length and force-velocity characteristicsneed to be smooth and twice continuously differen-tiable. Characteristics proposed in the literature varywidely. In our problems, use of a steeper normalizedmuscle force-velocity curve and of smaller activationand deactivation time constants required a finer meshto obtain the same accuracy and resulted in highercomputation times.

In conclusion, we evaluated different optimal con-trol problem formulations for computing dynamicallyconsistent muscle controls that reproduce inverse

FIGURE 6. Comparison of muscle activations during walking computed based on static optimization (purple) and formulation 4 ofthe muscle dynamic optimization problem (red) for a subset of the muscles of the complex model.

DE GROOTE et al.2934

Page 14: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

dynamics joint torques during walking. Optimal con-trol problem formulation mainly influenced conver-gence and CPU time. The formulations that usedimplicit muscle dynamics in combination with addi-tional controls allowed for a robust solution of themuscle redundancy problem for a 3D musculoskeletalmodel with 43 muscles per leg in about 20 min of CPUtime. The close proximity of the numerical solutions tothe optimal solution of the dynamic optimizationproblem was confirmed in two ways. Our approach,which is based on direct collocation, is orders ofmagnitude faster than direct shooting approaches thathave been used previously to compute muscle inputsthat track a measured motion. Hence, direct colloca-tion in combination with the proposed implicit for-mulation of contraction dynamics is a computationallyefficient and robust alternative to direct shootingmethods for solving dynamic optimization problemswith motion tracking. Therefore, this approach mightenable the use of dynamic optimization by non-expertsseeking to investigate the effect of muscle dynamics onefficiency and optimal performance. Future workshould focus on comparing the present approach toother approaches for computing muscle forces. Thepresent approach lacks some of the major limitations

of established methods such as static optimization andCMC while remaining computationally efficient.

ACKNOWLEDGMENTS

This study was funded in part by NSF GrantsCBET-1404767, DMS-1522629, Office of Naval Re-search Grant N00014-15-1-2048, IWT-SBO Grant120057 and IWT-TBM Grant 140184. We wish tothank Ilse Jonkers and Sam Van Rossom for makingthe running data available.

OPEN ACCESS

This article is distributed under the terms of theCreative Commons Attribution 4.0 International Li-cense (http://creativecommons.org/licenses/by/4.0/),which permits unrestricted use, distribution, and re-production in any medium, provided you give appro-priate credit to the original author(s) and the source,provide a link to the Creative Commons license, andindicate if changes were made.

FIGURE 7. Comparison of muscle activations during running computed based on static optimization (purple) and formulation 4of the muscle dynamic optimization problem (red) for a subset of the muscles of the complex model.

Optimal Control Formulations to Solve Muscle Redundancy 2935

Page 15: Evaluation of Direct Collocation Optimal Control …...Evaluation of Direct Collocation Optimal Control Problem Formulations for Solving the Muscle Redundancy Problem FRIEDL DE GROOTE,

REFERENCES

1Ackermann, M., and A. J. van den Bogert. Simulation ofgait using a 3D musculoskeletal model. State College, PA:ASB Annu. Meet., 2009.2Ackermann, M., and A. J. van den Bogert. Optimalityprinciples for model-based prediction of human gait. J.Biomech. 43(6):1055–1060, 2010.3Anderson, F. C., and M. G. Pandy. A dynamic optimiza-tion solution for vertical jumping in three dimensions.Comput. Methods Biomech. Biomed. Eng. 2:201–231, 1999.4Anderson, F. C., and M. G. Pandy. Dynamic optimizationof human walking. J. Biomech. Eng. 123(5):381–390, 2001.5Anderson, F. C., and M. G. Pandy. Static and dynamicoptimization solutions for gait are practically equivalent. J.Biomech. 34:153–161, 2001.6Crowninshield, R. D., and R. A. Brand. A physiologicallybased criterion of muscle force prediction in locomotion. J.Biomech. 14(11):793–801, 1981.7De Groote, F., B. Demeulenaere, J. Swevers, J. DeSchutter, and I. Jonkers. A physiology-based inverse dy-namic analysis of human gait using sequential convexprogramming: a comparative study. Comput. MethodsBiomech. Biomed. Eng. 15(10):1093–1102, 2012.8De Groote, F., G. Pipeleers, I. Jonkers, B. Demeulenaere,C. Patten, J. Swevers, and J. De Schutter. A physiologybased inverse dynamic analysis of human gait: potentialand perspectives. Comput. Methods Biomech. Biomed. Eng.12(5):563–574, 2009.9Delp, S. L., F. C. Anderson, A. S. Arnold, P. Loan, A.Habib, C. T. John, E. Guendelman, and D. G. Thelen.OpenSim: open-source software to create and analyze dy-namic simulations of movement. IEEE Trans. Biomed.Eng. 54:1940–1950, 2007.

10Garg, D., M. A. Patterson, C. Francolin, C. L. Darby, G.T. Huntington, W. W. Hager, and A. V. Rao. Direct tra-jectory optimization and costate estimation of finite-hori-zon and infinite-horizon optimal control problems via aRadau pseudospectral method. Comput. Optim. Appl.49(2):335–358, 2011.

11Graham, K. F., and A. V. Rao. Minimum-time trajectoryoptimization of multiple revolution low-thrust earth-orbittransfers. J. Spacecraft Rockets 52(3):711–727, 2015.

12Hicks, J. L., T. K. Uchida, A. Seth, A. Rajagopal, and S. L.Delp. Is my model good enough? Best practices for verifi-cation and validation of musculoskeletal models and sim-ulations of movement. J. Biomech. Eng. 137:020905, 2015.

13Knarr, B. A., D. S. Reisman, S. A. Binder-Macleod, and J.S. Higginson. Changes in predicted muscle coordinationwith subject-specific muscle parameters for individuals afterstroke. Stroke Res. Treat. 2014:321747, 2014.

14Lin, Y.-C., T. W. Dorn, G. Schache, and M. G. Pandy.Comparison of different methods for estimating muscleforces in human movement. Proc. Inst. Mech. Eng. H226(2):103–112, 2012.

15Menegaldo, L. L., A. de Toledo Fleury, and H. I. Weber. A‘cheap’ optimal control approach to estimate muscle forcesin musculoskeletal systems. J. Biomech. 39:1787–1795, 2006.

16Miller, R. H., B. R. Umberger, and G. E. Caldwell. Limi-tations to maximum sprinting speed imposed by musclemechanical properties. J. Biomech. 45:1092–1097, 2012.

17Morrow, M. M., J. W. Rankin, R. R. Neptune, and K. R.Kaufman. A comparison of static and dynamic optimiza-tion muscle force predictions during wheelchair propulsion.J. Biomech. 47:3459–3465, 2014.

18Neptune, R. R. Optimization algorithm performance indetermining optimal controls in human movement analy-ses. J. Biomech. Eng. 121(2):249–252, 1999.

19Neptune, R. R., and M. L. Hull. A theoretical analysis ofpreferred pedaling rate selection in endurance cycling. J.Biomech. 32(4):409–415, 1999.

20Neptune, R. R., S. A. Kautz, and F. E. Zajac. Contribu-tions of the individual ankle plantar flexors to support,forward progression and swing initiation during walking. J.Biomech. 34:1387–1398, 2001.

21Pandy, M. G., F. C. Anderson, and D. G. Hull. Aparameter optimization approach for the optimal controlof large-scale musculoskeletal systems. J. Biomech. Eng.114:450–460, 1992.

22Patterson, M. A. and A. V. Rao. GPOPS-II: a MATLABsoftware for solving multiple-phase optimal control prob-lems using hp-adaptive gaussian quadrature collocationmethods and sparse nonlinear programming. ACM Trans.Math. Soft. 41(1):Article 1, 37, 2014.

23Patterson, M. A., M. Weinstein, and A. V. Rao. An effi-cient overloaded method for computing derivatives ofmathematical functions in MATLAB. ACM Trans. Math.Soft. 39(3):Article 17, 39, 2013.

24Pedotti, A., V. V. Krishnan, and L. Stark. Optimization ofmuscle-force sequencing in human locomotion. Math.Biosci. 38(1–2):57–76, 1978.

25Schutte, L. Using musculoskeletal models to explorestrategies for improving performance in electrical stimula-tion-induced leg cycle ergometry. Dissertation, StanfordUniversity, 122-124, 1992.

26Steele, K. M., A. Seth, J. L. Hicks, M. H. Schwartz, and S.L. Delp. Muscle contributions to vertical and fore-aftaccelerations are altered in subjects with crouch gait. GaitPosture 38(1):86–91, 2013.

27Thelen, D. G. Adjustment of muscle mechanics modelparameters to simulate dynamic contractions in olderadults. J. Biomech. Eng. 125:70–77, 2003.

28Thelen, D. G., F. C. Anderson, and S. L. Delp. Generatingforward dynamic simulations of movement using computedmuscle control. J. Biomech. 36(3):321–328, 2003.

29van den Bogert, A. J., D. Blana, and D. Heinrich. Implicitmethods for efficient musculoskeletal simulation and opti-mal control. Procedia IUTAM 2:297–316, 2011.

30Wachter, A., and L. T. Biegler. On the implementation of aprimal-dual interior point filter line search algorithm forlarge-scale nonlinear programming. Math. Program.106(1):25–57, 2006.

31Wellsandt, E., E. S. Gardinier, K. Manal, M. J. Axe, T. S.Buchanan, and L. Snyder-Mackler. Decreased knee jointloading associated with early knee osteoarthritis afteranterior cruciate ligament injury. Am. J. Sports Med.44(1):143–151, 2016.

32Wesseling, M., F. De Groote, and I. Jonkers. The effect ofperturbing body segment parameters on calculated jointmoments and muscle forces during gait. J. Biomech.47:596–601, 2014.

33Winters, J. M. An improved muscle-reflex actuator for usein large-scale neuromusculoskeletal models. Ann. Biomed.Eng. 23(4):359–374, 1995.

34Yoder,A. J.,A. J. Petrella, andA.K. Silverman.Trunk-pelvismotion, joint loads, and muscle forces during walking with atranstibial amputation. Gait Posture 41(3):757–762, 2015.

35Zajac, F. E. Muscle and tendon: properties, models, scal-ing, and application to biomechanics and motor control.Crit. Rev. Biomed. Eng. 17(4):359–411, 1989.

DE GROOTE et al.2936