STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest...

16
EUROMECH Colloquium 511 on Biomechanics of Human Motion J. Ambrosio et.al. (eds.) Ponta Delgada, Azores, Portugal, 9–12 March 2011 STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER MOVEMENTS Ramona Maas 1 , Tobias Siebert 2 , and Sigrid Leyendecker 1 1 Computational Dynamics and Control University of Kaiserslautern e-mail: {rmaas,sigrid.leyendecker}@rhrk.uni-kl.de 2 Institute of Motion Science Friedrich Schiller University Jena e-mail: [email protected] Keywords: structure preservation, grasping, DMOCC, optimal control, finger movement. Abstract. A common tool to solve dynamical problems, in particular in biomechanic in- vestigations, is MATLAB/Simulink. Many integration methods, as used for example in MAT- LAB/Simulink, rely on standard discretisations of the continuous equations of motion. These methods often lead to time stepping schemes, that show numerical dissipation in energy and momentum. In contrast to that, we use a discrete variational principle to derive a time-stepping scheme. This method yields discrete analogues to the Euler- Lagrange equations and Noether’s theorem, which ensures that the structure of the underlying continuous dynamical system is preserved. Using this method, the simulation results are symplectic momentum consistent and exhibit a good energy behaviour. We implement a typical nonlinear Hill-type muscle model in the structure preserving simulation framework and investigate the differences to standard simulation of muscle actuated movements with MATLAB/Simulink, especially concerning the correct representation of energy and angu- lar momentum. A numerical example shows that the MATLAB/Simulink integrators artificially loose or gain energy and angular momentum, whereas all results of the symplectic momentum method are structure preserving. With this structure preserving simulation framework including actuation by muscle models, we investigate the trajectory of fingers during grasping movements. Since human movements are controlled by the central nervous system (CNS), we formulate finger movements as optimal con- trol problems for constrained forced motion with a physiologically motivated objective function as described in [1]. For the solution of the optimal control problem, we use DMOCC (Dis- crete Mechanics and Optimal Control for Constrained Systems, introduced in [2]), which can be distinguished from other direct transcription methods by its structure preserving formula- tion. This is a key feature of the method, since numerical dissipation could lead to over- or underestimation of the joint torques or muscle forces. 1

Transcript of STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest...

Page 1: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

EUROMECH Colloquium 511 on Biomechanics of Human MotionJ. Ambrosio et.al. (eds.)

Ponta Delgada, Azores, Portugal, 9–12 March 2011

STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGERMOVEMENTS

Ramona Maas1, Tobias Siebert2, and Sigrid Leyendecker1

1 Computational Dynamics and ControlUniversity of Kaiserslautern

e-mail: {rmaas,sigrid.leyendecker}@rhrk.uni-kl.de

2 Institute of Motion ScienceFriedrich Schiller University Jenae-mail: [email protected]

Keywords: structure preservation, grasping, DMOCC, optimal control, finger movement.

Abstract. A common tool to solve dynamical problems, in particular in biomechanic in-vestigations, is MATLAB/Simulink. Many integration methods, as used for example in MAT-LAB/Simulink, rely on standard discretisations of the continuous equations of motion. Thesemethods often lead to time stepping schemes, that show numerical dissipation in energy andmomentum.In contrast to that, we use a discrete variational principle to derive a time-stepping scheme.This method yields discrete analogues to the Euler- Lagrange equations and Noether’s theorem,which ensures that the structure of the underlying continuous dynamical system is preserved.Using this method, the simulation results are symplectic momentum consistent and exhibit agood energy behaviour.We implement a typical nonlinear Hill-type muscle model in the structure preserving simulationframework and investigate the differences to standard simulation of muscle actuated movementswith MATLAB/Simulink, especially concerning the correct representation of energy and angu-lar momentum. A numerical example shows that the MATLAB/Simulink integrators artificiallyloose or gain energy and angular momentum, whereas all results of the symplectic momentummethod are structure preserving.With this structure preserving simulation framework including actuation by muscle models, weinvestigate the trajectory of fingers during grasping movements. Since human movements arecontrolled by the central nervous system (CNS), we formulate finger movements as optimal con-trol problems for constrained forced motion with a physiologically motivated objective functionas described in [1]. For the solution of the optimal control problem, we use DMOCC (Dis-crete Mechanics and Optimal Control for Constrained Systems, introduced in [2]), which canbe distinguished from other direct transcription methods by its structure preserving formula-tion. This is a key feature of the method, since numerical dissipation could lead to over- orunderestimation of the joint torques or muscle forces.

1

Page 2: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

1 INTRODUCTION

In biomechanical studies, the simulation of muscle forced movements is an active researchtopic of growing attention. Movements like walking, jumping, see for example [3, 4, 5] orgrasping, see [6, 7, 8] are in the focus of several investigations for different reasons. For ex-ample one aims at understanding, how these movements are controlled by the central nervoussystem (CNS) as described in [6], or at producing high-tech protheses and orthotic devices thatare designed and improved via simulation.One possibility to simulate such movements is to represent the system of interest by a multibodysystem. To be able to draw reasonable physiological conclusions out of the simulation results, itis necessary to actuate the system by adequate muscle models. In gross movement simulation,Hill-based muscle models have been used almost exclusively [9, 10].In a forward multibody dynamics simulation, the muscle activity leads to muscle forces thatactuate the system. As it is sometimes necessary to use up to 50 Hill-type muscles in one model[11], it is important to save computational effort by using the largest possible timestep in thenumerical integration while not loosing too much accuracy.On the other hand, it is possible to optimal control the movement such that it minimises a phys-iologically motivated cost function, as for example metabolic effort of the motion or a criterionof maximum endurance of musculoskeletal function, as in [1]. This approach yields the optimalmuscle activation and trajectory of the movement in the sense of a given objective function. Asin most skeleton joint structures the number of muscles exceeds the degrees of freedom, theoptimal control problem can also be useful to solve this redundancy problem. Solving an opti-mal control problem, it gets even more important to enlarge the timestep size of the numericalintegrator as far as possible, as the number of optimisation variables is inversely proportionalto the timestep size. Hence using the largest possible timestep is crucial for efficient optimalcontrol simulations.A well known and comfortable tool to investigate multibody dynamics is MATLAB/Simulinkand a lot of research has been done using MATLAB/Simulink to model muscle driven move-ments, see for example [12, 3, 4, 5].Standard integration methods are based on the approximation of (time-) derivatives in the con-tinuous equations of motion by their discrete expressions based e.g. on finite differences. It iswell known that, following this approach, the structure of the dynamical system might not pre-served, i.e. the results can be inconsistent in energy and angular momentum during a dynamicsimulation. This holds for example for the integrators available in MATLAB/Simulink and canhave an impact on the resulting muscle forces just as on the activity prediction. In particularif the optimal control problem is formulated with respect to a cost function related to energyor muscle work, an artificially loss or gain in energy can significantly influence the results andlead to an over- or under estimation of muscle forces.A variational integrator yields discrete analogues to the Euler-Lagrange equations, Noether’stheorem, and the Legendre transform, see [13, 14]. Eventually, this leads to a structure preserv-ing time stepping scheme, i.e. resulting integrator is symplectic-momentum conserving and theenergy is not artificially dissipated.The first part of this work concentrates on the quantification the artificial gain or loss in en-ergy and angular momentum for simple numerical examples of muscle driven forward dynamicmovements calculated with MATLAB/Simulink and to compare the results to a structure pre-serving simulation method.Secondly, the structure preserving simulation framework is used to optimal control finger move-

2

Page 3: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

ments during grasping, using DMOCC as introduced in [2]. Due to the implementation of non-linear Hill-type muscle models instead of finger actuation by joint torques, see [15], this leadsto an optimal muscle activation and finger trajectory regarding a specified objective function. Itis known that human movements, especially grasping movements, are controlled unconsciouslyby our CNS. One possibility to investigate the question, which criteria are used by our CNSto control grasping movements, is an optimal control simulation. Using a physiologically mo-tivated objective function, this results not only in an optimal muscle activity and an optimalfinger trajectory, but also solves the common redundancy problem, which is caused by the factthat in most skeleton joint structures, the number of muscles exceeds the number of degrees offreedom [1]. The resulting trajectories can be compared to literature and experiments to drawconclusions concerning the most appropriate criterion, as for example in [15] for actuation byjoint torques.In the following Chapter 2, we briefly describe the dynamics of constrained forced multibodysystems in the continuous and in the discrete setting. The nonlinear Hill-type muscle model weuse in this work is strongly related to [16] and is described in Chapter 3. In Chapter 4, the resultsfor both Simulink and the symplectic momentum method are compared for a simple exampleof a muscle driven movement using an experimentally validated muscle model of a rat muscle.We concentrate on comparing energy and angular momentum consistency in the Simulink andthe symplectic momentum simulations. Finally, we investigate a muscle driven finger move-ment, which is realised with muscle parameters similar to that of the rat muscle, see Chapter 5.Using this grasping-like forward dynamics movement as an initial guess for the optimal controlsimulation, we make a first numerical experiment concerning the structure preserving optimalcontrol of muscle-driven finger movements, which is described in Chapter 6.

2 CONSTRAINED FORCED DYNAMICS

2.1 Continuous formulation

The evolution of time-continuous mechanical systems can for instance be described withLagrangian mechanics. We consider the n-dimensional system with the configuration variableq in a configuration manifold Q ⊆ Rn. The constrained version of the principle of Lagranged’Alembert, as described in [2] yields

δ

∫ tN

t0

L(q, q)− gT (q) · λ dt+

∫ tN

t0

f · δq dt = 0 (1)

for all variations δq ∈ TQ vanishing at endpoints and δλ ∈ Rm. Here, L(q, q) : TQ→ R is theLagrangian of the system, which represents the difference between kinetic and potential energy.Let the motion be constrained by the vector valued function of holonomic, scleronomic con-straints g(q) = 0 ∈ Rm, resulting e.g. from the rigid body formulation and the joint couplingsin between the bodies. Additionally, λ(t) represents the vector of time-dependent Lagrangemultipliers. The last term describes the virtual work of the non-conservative forces f ∈ Rn thatactuate the system. With some straight forward calculations, the variational principle leads tothe (n + m)-dimensional differential-algebraic system of equations of motion for constrainedforced dynamics.

∂L(q, q)

∂q− d

dt

(∂L(q, q)

∂q

)−GT (q) · λ+ f = 0

g(q) = 0

(2)

3

Page 4: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

Here G(q) = Dg(q) denotes the m × n Jacobian of the constraints. The equations of motiondescribe the underlying physical system and represent its structure preserving characteristics.According to Noether’s Theorem from 1918, a symmetry (invariance) of the action of a phys-ical system leads to a corresponding conservation law, see [13]. For example if no forces andno gravity act on a system, then it is invariant with respect to translations / rotations and themomentum / angular momentum is conserved. If the system is invariant with respect to timereparametrisation, this results in energy conservation. Consequently, if the system is actuatedby forces, the total energy of the system cannot be conserved anymore, but the change in energy∆E exactly represents the work performed by the forces and velocities q during the time periodfrom t0 to tN .

∆E −∫ tN

t0

fq dt = 0 (3)

The angular momentum is also not a constant of the motion, if the system is actuated by forcesand influenced by gravity. The change in angular momentum ∆L exactly represents the integralfrom t0 to tN over the sum of the applied joint torques τ 1 ∈ R3 plus the moments resulting fromforces and gravity acting on the bodies (τ 2 ∈ R3).

∆L−∫ tN

t0

τ 1 + τ 2 dt = 0 (4)

2.2 Discrete variational dynamics – the symplectic momentum method

A structure preserving time-stepping scheme can be derived, via a discrete variational prin-ciple, i.e. due to the discretisation at an earlier level (compared to the discretisation of theequations of motion), the structure of the physical system (consistency in energy and angu-lar momentum as described in Chapter 1) is inherited by the discrete approximation. In otherwords, the discrete simulation results exactly represent the behaviour of the analytical systemconcerning the consistency of momentum maps or symplecticity. In a time interval [tn, tn+1]the first term of equation (1) is approximated by the discrete Lagrangian Ld : Q×Q→ R andthe discrete constraint function gd : Q→ Rm as shown in [14, 2].

Ld(qn, qn+1)− 1

2gT

d (qn) · λn −1

2gT

d (qn+1) · λn+1 ≈∫ tn+1

tn

L(q, q)− gT (q) · λ dt (5)

The discrete LagrangianLd(qn, qn+1) consists of a finite difference approximation of the kineticenergy integral and the midpoint rule is used for the integral of potential energy. The discreteconstraint function reads gd(qn) = ∆t g(qn), with ∆t = tn+1 − tn, denoting the constant timestep. The last part of equation (1) representing the virtual work of external nonconservativeforces is similarly approximated by

f−n · δqn + f+

n · δqn+1 ≈∫ tn+1

tn

f · δq dt (6)

Using these discretisations, the discrete version of the constrained Lagrange-d’Alembert prin-ciple reads

δ

N−1∑n=0

Ld(qn, qn+1)− ∆t2gT (qn) · λn −

∆t2gT (qn+1) · λn+1 +

N−1∑n=0

f−n · δqn + f+n · δqn+1 = 0 (7)

4

Page 5: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

for all variations {δqn}Nn=0 and {δλn}Nn=0 with δq0 = δqN = 0. With a straight forwardcalculation, this leads to the discrete constrained forced Euler-Lagrange equations of motion

D2Ld(qn−1, qn) +D1Ld(qn, qn+1)−∆tGT (qn) · λn + f+n−1 + f−

n = 0

g(qn+1) = 0(8)

withGT (qn) ·λn denoting the discrete constraint forces. The dimension of this discrete systemof equations is – as in the continuous case – (n + m). The key feature to notice here is that (8)is not obtained via discretising (2). Instead it is obtained via a discrete variational principle.

2.2.1 The discrete null space method

To save computational effort and to eliminate conditioning issues related with the Lagrangemultipliers, a reduction of the system to a lower dimension is done by premultiplying (8) witha discrete null space matrix fulfilling

range (P (qn)) = null (G(qn)) (9)

Therewith, the constraint forces and with them the unknown Lagrange multipliers vanish fromthe discrete equations of motion (8) and the systems dimension is reduced to n.

P T (qn) ·(D2Ld(qn−1, qn) +D1Ld(qn, qn+1) + f+

n−1 + f−n

)= 0

g(qn+1) = 0(10)

2.2.2 Nodal reparametrisation

A further reduction of the system to its minimal possible dimension can be achieved byexpressing qn in terms of local discrete generalised coordinates un ∈ U ⊆ Rn−m, such that theconstraints are fulfilled. Consider the constraint manifold C = {q ∈ Q|g(q) = 0}, then qn canbe expressed via the local reparametrisation map F : U ⊆ Rn−m × Q → C, so as to fulfil theconstraints.

qn = F (un, qn−1) with g(qn) = g(F (un, qn−1)) = 0 (11)

Using this nodal reparametrisation in the reduced discrete equations of motion (10), this furtherreduces the system to n−m equations.

P T (qn) ·(D2Ld(qn−1, qn) +D1Ld(qn,F (un+1, qn)) + f+

n−1 + f−n

)= 0 (12)

Note that (12) is equivalent to (8), thus it is structure preserving. The symplectic momentummethod permits structure preserving simulation, i.e. the simulation results of the dynamicalsystem will be consistent in angular momentum and symplecticity. For linear systems, theresults will also be consistent in energy. For nonlinear systems, the symplectic momentummethod still has a good energy behaviour in the sense that energy stays close to the correct valueeven for long simulation periods. This is what clearly distinguishes the symplectic- momentummethod from many commercially available integrators as available e.g. in Simulink.

5

Page 6: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

3 ACTUATION BY MUSCLES FORCES

In order to perform biomechanical simulations of human and animal locomotion, it is im-portant to understand the behaviour of muscles, as they connect body segments and enable theCNS to control movements. By excitation, the CNS enables the requested muscles to createforces that are applied to bones and joints via tendons. It is a key task in biomechanical investi-gations to describe the properties of this muscolotendon system and to build up muscle modelsthat represent its properties in an accurate manner, see [10]. Several models describing the dy-namical behaviour of isolated muscles have been developed, for example in [17, 10]. Most ofthem are based on the findings of [18], who in particular discovered the force-velocity relationof muscles. However, most of these models do not or hardly take passive muscle forces intoaccount. One possibility to represent these passive muscle forces is shown in [19].The muscle model used in this work is based on [16], who compared the nonlinear behaviour oftwo common Hill-type models differing in the arrangement of serial (SEC) and parallel elasticcomponent (PEC). According to the better representation of experimental results, we choose

Figure 1: The Hill-type muscle model, taken from [16].

their model [CC] for our investigations, where a PEC is in parallel with the contractile com-ponent CC, and both of them are connected in series to a SEC, see Figure 1. The muscleparameters used in the simulations are given in Table 1. Using this model, the difference be-tween the single forces in the SEC (FSEC ∈ R) and the PEC (FPEC ∈ R) can be described bya typical multiplicative approach as introduced in [21].

FSEC − FPEC = A(t) · Fim · fl · fv (13)

Herein, A(t) ∈ R is the muscle activation state which can for example be described by anexponential function and the stimulus S ∈ R. The time is denoted by t ∈ R, while τ ∈ R lumpsthe time constants of calcium influx from the sarcoplasmic reticulum into the sarcoplasm, asdescribed in [16]. To avoid division by zero when isolating fv in (13), A(t) needs to be atleast equal to A0 ∈ R+, which is ensured by a case-by-case definition. A0 represents the pre-activation of the muscle.

A(t) =

S − e

−t

τ , S − A0 > e−t

τ

A0, S − A0 ≤ e−t

τ

(14)

Fim ∈ R is the maximal possible active isometric force, a parameter determined in experiments,while fl ∈ R and fv ∈ R are factors that describe the force-length and force-velocity property,

6

Page 7: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

parameter value unitl1 -7.23 mml2 -2.5 mml3 1.05 mml4 21 mmfc 0.84 Fim

vmax -182.2 mm/sγ 0.151k1 0.4509 Nk2 0.0836 mm−1

F1 1.3482 N∆lSEC1 0.7427 mmksh 4.3555lm 44.8 mmFim 11.2 NS 1A0 0.01τ 0.065 sA 1.4B 0.0525C 0.021

Table 1: Muscle parameters of rat M. gastrocnemius medialis. The parameters’ identification is described in [20].

respectively. According to [10], FSEC depends on the SEC elongation ∆lSEC as follows

FSEC(∆lSEC) =

F1

eksh − 1·

eksh∆lSEC

∆lSEC1 − 1

, 0 < ∆lSEC < ∆lSEC1

F1 + k · (∆lSEC −∆lSEC1), ∆lSEC1 ≤ ∆lSEC

(15)

At the force F1 and the corresponding elongation ∆lSEC1 this relationship changes from expo-nential to linear, the parameter k can be calculated from

k =F1

eksh − 1· ksh

∆lSEC1

· eksh (16)

where dimensionless shape parameter ksh ∈ R has to be determined by experiments. Theforce-elongation relationship of the PEC is taken from [22], using the parameters k1, k2 ∈ R.

FPEC(∆lPEC) =

{k1 ·

(ek2·∆lPEC − 1

), ∆lPEC > 0

0, ∆lPEC ≤ 0(17)

7

Page 8: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

The force-length relation of the CC is described by a piecewise linear function according to [16]

fl(lCC) =

fc

l2 − l1· (lCC − l1), l1 ≤ lCC ≤ l2

fc +fc − 1

l2· (lCC − l2), l2 < lCC ≤ 0

1, 0 < lCC ≤ l3

1 +−1

l4 − l3· (lCC − l3), l3 < lCC ≤ l4

0, lCC < l1 ∨ lCC > l4

(18)

where fc ∈ R is the force, at which the ascending limb changes slope, lCC is the length of thecontractile component and l1, l2, l3 and l4 are specific lengths that are crucial for the sarcomereforce-length relationship. The second important property of muscles is their force-velocity be-haviour. In this work, we use the Hill hyperbola for concentric contractions, see [18]. Here, theparameter fv is defined by the maximal possible contraction velocity vmax, the actual contrac-tion velocity vCC and a parameter γ ∈ R to fit the curvature. The eccentric part is described bya mirrored hyperbola, see [21], with experimentally determined constant parameters A, B andC ∈ R. If the contraction velocity vCC is greater than the maximal contraction velocity vmax,then fv is zero. Concluding, the factor fv can be calculated from (11).

fv(vCC) =

CvCC

vmax

−B+ A, vCC < 0

vmax − vCC

vmax +vCC

γ

, 0 ≤ vCC ≤ vmax

0, vCC > vmax

(19)

The dynamical system is in our case actuated by discrete muscle forces and gravity. In thediscrete setting, these actuation changes the discrete configuration and with it, the length ofthe muscolotendon complex lMTC . Using a muscle model as shown in Figure 1, we get twokinematic relations for lMTC :

lMTC = ∆lSEC + ∆lCC + lm (20)

lMTC = ∆lSEC + ∆lPEC + lmslack (21)

The parameters lm is the constant sum of the slack length of the SEC and the optimal length ofthe CC and lmslack is the constant sum of SEC and PEC slack lengths.Due to the actual muscle length lMTCn and due to a certain activation level A(tn) evaluated atthe discrete time node tn, the length of the SEC and PEC elements change. This results in newforces FPECn and FSECn . With fln resulting from (18), we can evaluate fvn via (13). Inverting(19) finally yields vCCn . The CC element elongates or contracts depending of the contractionvelocity of the muscle. This elongation or contraction ∆lCCn+1 is derived via numerical inte-gration of vCCn , in our case we use a trapezoidal rule for that.

∆lCCn+1 −∆lCCn

tn+1 − tn=

1

2

((f−1

v (vCCn) + f−1v (vCCn+1)

)(22)

FSECn is the muscle force that actuates the dynamical model and leads to a new muscle lengthlMTCn+1 . From now on, FSEC will be therefore be called FMTC .

8

Page 9: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

4 MUSCLE LIFTING AN ARM – A COMPARISON TO SIMULINK

To observe energy- and angular momentum consistency of the symplectic-momentum re-sults and its lack in the Simulink (toolbox SimMechanics) simulations, we investigate a firstnumerical example. Herein an arm, supported by a spherical joint at a wall, is lifted by a muscleagainst gravity, see Figure 2. While lifting this arm, the angular momentum is not constant,

Figure 2: Muscle lifting an arm.

but the change in angular momentum in one time step ∆Ln+1 = Ln+1 − Ln represents themomentum resulting from forces and gravity acting on the bodies (τ 2 ∈ R3), i.e.

Lcheckn+1 = ∆Ln+1 −∫ tn+1

tn

τ 2 dt = 0 (23)

For simplicity, we compare the results of the symplectic momentum method to the MAT-

0 0.2 0.4 0.6 0.830

40

50

60

ref sol dt=1e−6 symplectic momentum Simulink ode8

0 0.2 0.4 0.6 0.80

1

2

3

4single muscle lifting arm −− dt 0.0001

0 0.2 0.4 0.6 0.8−200

−100

0

100

Figure 3: Muscle force FMTC , contraction velocity vCC and muscle length lMTC during simulation of a singlemuscle lifting an arm.

LAB/Simulink fixed step integrator ode8, which is based on the same method as the comfort-able and frequently-used variable time step solver ode45. The global behaviour of all simulation

9

Page 10: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

methods calculated at a time step of ∆t = 10−4 fits very well to the result of a reference solutioncalculated with a time step of ∆t = 10−6, see Figure 3. Simulations with larger time steps arenot possible with the muscle parameters given in Table 1, both the Simulink integrators and thesymplectic momentum method do not converge or show unreasonable results. Even though thetime step is quite small and despite the fact that there are nearly no visible differences betweenthe methods concerning the observed variables, the Simulink method still leads to significantenergy and angular momentum errors, see Figure 4.

0 0.5 1−0.02

0

0.02

0.04

0.06

0.08

symplectitc momentumSimulink ode8

0 0.5 1−2

−1

0

1

2 x 10−4

0 0.5 1−6

−4

−2

0

2

4

6 x 10−3

0 0.5 1−1

0

1

2 x 10−5

Figure 4: Energy and angular momentum consistency for muscle lifting an arm: absolute values (upper plots) anderror per time step (lower plots).

5 FORWARD DYNAMICS FINGER MOVEMENT

To simulate grasping movements, the introduced muscle model is applied to actuate a modelof a human finger. The human finger consists of several bones (phalanxes) connected by joints,hence it can be modelled as a constrained forced multibody system with constraints resultingfrom the rigid body formulation and the joints between the bodies. To approximate the anatomyof a finger, see Figure 5, the proximal and medial phalanx are modelled as cylinders, the distalphalanx is modelled as a cone. The metacarpophalangeal joint (MCP) is represented as a spher-ical joint, the proximal and distal interphalangeal joint (PIP and DIP) are modelled via revolutejoints.According to [23], there are three muscles that are responsible for a finger moving from ex-tension to flexion, as it is the case when grasping. The muscle responsible for extension of thefinger is called musculus extensor digitorum (MED). The flexion of the finger is controlled bytwo muscles, musculus flexor digitorum superficialis (MFDS), inserting at the medial phalanxand musculus flexor digitorum profundus (MFDP), inserting on the distal phalanx. Accordingto [23, 24], the assumed directions for the tendons are illustrated by colours in Figure 5. Theblue lines indicate the force directions for the MED, the green colour is related to the MFDPand the red coloured lines to MFDS.

10

Page 11: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

The finger movement starts in an horizontal position with zero initial velocity while gravityis present. Due to prescribed muscle activations for each of the three muscles, different timedependent muscle forces develop, that actuate the finger.For this first example, we use the model parameters of the rat muscle, see Table 1 for all threemuscles to actuate the finger. Only the maximal possible muscle force parameter Fim was re-duced to 2.4N , to ensure convergency of the dynamics. This unrealistic muscle parameters maybe one of the reasons, why the resulting movement happens relatively fast. In Figure 5 we see anillustration of the initial configuration of the finger on the left hand side of the plot and the finalconfiguration after 0.05 s simulation time. The trajectory of the finger tip is illustrated in the

Figure 5: Initial and final configuration of the finger model during grasping simulation: Assumed tendon insertionand direction for musculus extensor digitorum (blue), musculus flexor digitorum superficialis (red) and musculusflexor digitorum profundus (green).

left plot of Figure 6. With the exception of a small peak in the middle, the trajectory is similarto typical grasping trajectories, which follow a logarithmic spiral according to [25]. In a furtheroptimal control simulation we can avoid these unrealistic peak by inequality constraints on thejoint angles. On the right side of Figure 6 we can see that the simulation angular momentumconsistent, which means that equation 4 is fulfilled to numerical accuracy.

Figure 7 shows the muscle parameters during this movement for all three involved muscles.We assume the flexor muscles MFDP and MFDS to be fully activated (A = 1), whereas theMED is assumed to be at the pre-activation level A = A0 = 0.01 (Figure 7, bottom right).From the plot of lMTC ((Figure 7, top left), we can see that the MED is elongated during themovement, whereas the other two, especially the MFDP is shortened. This can also be observedfrom the contraction velocity plot (Figure 7, bottom left), where we can see, that the MFDP iscontracting fast, whereas especially the MED is reducing contraction velocity in the beginningof the movement until the contraction velocity gets positive, meaning elongation of the contrac-tile element takes place. In the illustration of the muscle forces (Figure 7, top right), we cansee that the largest force is produced by the MFDS towards the end of the movement and by theMED during its elongation phase..

11

Page 12: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

−1−0.5

00.5

1

0.030.04

0.050.06

0.070.08

−0.04

−0.03

−0.02

−0.01

0

1−direction [mm]2−direction [mm]

3−di

rect

ion

[mm

]

0 0.01 0.02 0.03 0.04 0.05−1

−0.8

−0.6

−0.4

−0.2

0

0.2

0.4

0.6

0.8

1 x 10−9

L1L2L3

Figure 6: Trajectory of the fingertip during forward dynamics simulation (left) and angular momentum consistencyduring simulation (right).

0 0.01 0.02 0.03 0.04 0.0540

45

50

55

60

MFDSMFDPMED

0 0.01 0.02 0.03 0.04 0.050

0.5

1

1.5

2

0 0.01 0.02 0.03 0.04 0.05−200

−150

−100

−50

0

50

0 0.01 0.02 0.03 0.04 0.050

0.2

0.4

0.6

0.8

1

Figure 7: Muscle behaviour during forward dynamics simulation: length of the muscolotendon complex lMTC

(top left), muscle forces FMTC (top right), contraction velocity vCC (bottom left) and muscle activity A (bottomright).

12

Page 13: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

6 OPTIMAL CONTROL OF A FINGER MOVEMENT

Next, we use the structure preserving simulation framework DMOCC to formulate an opti-mal control problem for a grasping movement. The problem is, to find an optimal trajectoryand muscle activation, such that a given objective functional J(q, q,f) is minimised, while thefinger is moving from an initial position (at rest) to a final finger tip position inside a prede-fined area (the final momentum is not prescribed) and the discrete equations of motion (12) arefulfilled. Details on the method DMOCC can be found in [2]. The objective function to beminimised in this example is related to the muscle force effort of the motion.

J(q, q,f) =

∫ tN

t0

(FMTC)2MED + (FMTC)2

MFDS + (FMTC)2MFDP dt (24)

Similar to [1], we focus on muscle forces during the movement, but neglect the influence ofthe cross sectional area of the muscles. Using the results of Chapter 5 as an initial guess forthe optimal control problem, we get a much more grasping like trajectory of the finger tip,see Figure 8. In [25] it is stated that the fingertip follows logarithmic spirals during grasping.Therefore we compare the resulting trajectory to a logarithmic spiral through start and end pointof the movement. The resulting trajectory for this objective functional is close to the logarithmicspiral, but nevertheless, local differences are visible.In this simulation, the flexor muscle forces and activity, see Figure 9 right, show an oscillating

0.04 0.045 0.05 0.055 0.06 0.065 0.07 0.075 0.08−0.04

−0.035

−0.03

−0.025

−0.02

−0.015

−0.01

−0.005

0

0.005

2−direction [mm]

3−di

rect

ion

[mm

]

fingertip trajectorylogarithmic spiral

Figure 8: Trajectory of the fingertip during optimal control grasping simulation compared to logarithmic spiral.

behaviour, whereas the extensor muscle stays at a nearly constant moderate activity level. Itsproduced force increases up to a certain nearly constant level due to elongation. It is obvious,that the muscle force effort is minimised, as the area under the force curves is reduced comparedto the initial guess (compare top right plot of Figure 7 and Figure 9). The next step is to set aboundary condition on the final momentum of the movement to be able to optimal control a realrest-to-rest manoeuvre.

13

Page 14: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

0 0.01 0.02 0.03 0.04 0.0540

45

50

55

60

MFDSMFDPMED

0 0.01 0.02 0.03 0.04 0.050

0.5

1

1.5

2

0 0.01 0.02 0.03 0.04 0.05−200

−150

−100

−50

0

50

0 0.01 0.02 0.03 0.04 0.050

0.2

0.4

0.6

0.8

1

Figure 9: Muscle behaviour during optimal control simulation: length of the muscolotendon complex lMTC (topleft), muscle forces FMTC (top right), contraction velocity vCC (bottom left) and muscle activity A (bottom right)

7 CONCLUSIONS

In this work, we use a structure preserving simulation method including the actuation bynonlinear Hill-type muscle models to simulate forward dynamics and optimal control prob-lems in multibody dynamics. We compare the results to the well known and user friendly toolMATLAB/Simulink for a simple numerical example of an arm, that is lifted by one muscle.The muscle we use for this simulation is an experimentally validated model of a rat muscle.The results of this example show accurate structure preservation for the symplectic momentummethod but a numerical dissipation in both energy and angular momentum for the results ofMATLAB/Simulink. However, the global behaviour of both methods is comparable.We use this symplectic momentum simulation framework to simulate a forward dynamics grasp-ing movement. Therefore, we include three muscles (with parameters similar to the rat muscle)that actuate a finger model consisting of several rigid bodies connected with joints. By pre-setting the muscle activation and in presence of gravity, the finger is moved from an outstretchedhorizontal position into a grasping like end position.Using the trajectory and muscle activity of this simulation as an initial guess, we solve an opti-mal control problem in order to minimise an objective function related to the muscle force effortof the movement. The resulting trajectory is similar to typical grasping trajectories. Further on,different physiologically motivated cost functions will be compared concerning the resultingfingertip trajectories and muscle activity prediction.

14

Page 15: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

REFERENCES

[1] R. D. Crowninshield and R. A. Brand. A physiologically based criterion of muscle forceprediction in locomotion. Journal of Biomechanics, 14(11):793–801, 1981.

[2] S. Leyendecker, S. Ober-Blobaum, J. E. Marsden, and M. Ortiz. Discrete mechanics andoptimal control for constrained systems. Optimal Control Applications & Methods, DOI:10.1002/oca.912, 2009.

[3] H. Geyer and H. Herr. A muscle -reflex model that encodes principles of legged mechanicsproduces human walking dynamics and muscle activities. IEEE Transactions on neuralsystems and rehabilitation engineering, 18(3):263–273, 2010.

[4] H. Geyer, A. Seyfarth, and R. Blickhan. Positive force feedback in bouncing gaits. Pro-ceedings of the Royal Society London, 270:2173–2183, 2003.

[5] C. L. Lim, N. B. Jones, S. K. Spurgeon, and J. J. A. Scott. Modelling of knee joint musclesduring the swing phase of gait – a forward dynamics approach using MATLAB/Simulink.Simulation Modelling Practice and Theory, 11:91–107, 2003.

[6] J. Friedman and T. Flash. Trajectory of the index finger during grasping. ExperimentalBrain Research, 196(4):497–509, 2009.

[7] D. C. Harding, K. D. Brandt, and B. M. Hillberry. Finger joint force minimization in pi-anists using optimization techniques. Journal of Biomechanics, 26(12):1403–1412, 1993.

[8] V. J. Santos and F. J. Valero-Cuevas. Reported anatomical variability naturally leads tomultimodal distributions of Denavit-Hartenberg parameters for the human thumb. IEEETransactions on Biomechnanical Engineering, 53(2):155–163, 2006.

[9] A. J. van den Bogert, Gerritsen K. G., and Cole G. K. Human muscle modelling from auser’s perspective. Journal of Electromyography and Kinesiology, 8(2):119–124, 1998.

[10] J. M. Winters and S. L. Y Woo. Multiple Muscle Systems: Biomechanics and MovementOrganization. Springer, New York, 1 edition, 1990.

[11] R. R. Neptune, K. Sasaki, and S. A. Kautz. The effect of walking speed on muscle functionand mechanical energetics. Gait Posture, 28(1):135–143, 2008.

[12] E. J. Cheng, I. E. Brown, and G. E. Loeb. Virtual muscle: a computational approach tounderstanding the effects of muscle properties on motor control. Journal of NeuroscienceMethods, 101:117–130, 2000.

[13] J. E. Marsden and M. West. Discrete mechanics and variational integrators. Acta Numer-ica, 10:357–514, 2001.

[14] S. Leyendecker, J. E. Marsden, and M. Ortiz. Variational integrators for constrained dy-namical systems. Zeitschrift fur Angewandte Mathematik und Mechanik, 88(9):677–708,2008.

[15] R. Maas and S. Leyendecker. Structure preserving optimal control simulation of index fin-ger dynamics. In The 1st Joint International Conference on Multibody System Dynamics,Lappeenranta, Finland, May 25-27 2010.

15

Page 16: STRUCTURE PRESERVING OPTIMAL CONTROL OF FINGER … · to the timestep size. Hence using the largest possible timestep is crucial for efficient optimal control simulations. A well

Ramona Maas, Tobias Siebert and Sigrid Leyendecker

[16] T. Siebert, C. Rode, W. Herzog, O. Till, and R. Blickhan. Nonlinearities make a difference:comparison of two common Hill-type models with real muscle. Biological Cybernetics,98(2):133–143, 2008.

[17] M. Epstein and W. Herzog. Theoretical Models of Skeletal Muscle: Biological and Math-ematical Considerations. John Wiley Sons, 1998.

[18] A. V. Hill. The heat of shortening and the dynamic constants of muscle. Proceedings ofthe Royal Society, 126:136195, 1938.

[19] F. E. Zajac. Muscle and tendon: properties, models, scaling, and application to biome-chanics and motor control. Critical Reviews in Biomedical Engineering, 17(4):359–411,1989.

[20] O. Till, T. Siebert, C. Rode, and R. Blickhan. Characterization of isovelocity extension ofactivated muscle: a Hill-type model for eccentric contractions and a method for parameterdetermination. Journal of Theoretical Biology, 255:176–187, 2008.

[21] A. J. van Soest and M. F. Bobbert. The contribution of muscle properties in the control ofexplosive movements. Biological Cybernetics, 69(3):195–204, 1993.

[22] I. E. Brown, S.H. Scott, and G. E. Loeb. Mechanics of feline soleus: II Design and valida-tion of a mathematical model. Journal of Muscle Research and Cell Motility, 17:221–233,1996.

[23] B.N. Tillmann. Atlas der Anatomie des Menschen. Springer Medizin Verlag Heidelberg,2 edition, 2010.

[24] F. R. Wilson. Die Hand – Geniestreich der Evolution. Klett-Cotta, 2 edition, 2000.

[25] D.G. Kamper, E.G. Cruz, and M.P. Siegel. Stereotypical fingertip trajectories during grasp.The Journal of Neurophysiology, 90(6):3702–3710, 2003.

16