Lesson 4: Inverse Dynamic Analysis

Inverse dynamic analysis is at the heart of what the AnyBody Modeling System does. An InverseDynamicAnalysis operation is like the KinematicAnalysis, except it is augmented with calculation of forces in the system.

Computing forces in a rigid body mechanical system is more difficult than it may seem. In principle, resolving forces is a question of setting up the equilibrium equations and solving them. But in mechanism analysis in general and biomechanics in particular, there are several complications. The system may very easily become statically indeterminate, which means that there are not enough equilibrium equations available to resolve the forces in the system. Another complication is caused by the muscles in the system because they can only pull. This constrains the space of possible solutions and adds a fair bit of mathematical complexity to the problem.

So the basic requirement to the InverseDynamicAnalysis solver is that is must be able to cope with

  • Statically indeterminate problems
  • Unilateral forces elements.

The fact that a mechanical system involving multiple muscles usually has too few equilibrium equations is not just of mathematical interest. The physical interpretation is that infinitely many different sets of forces can balance the mechanism. Have a look at the example we have been using in many of the tutorials, the simple arm performing a dumbbell curl:

To simplify a little, let us consider just the elbow joint. The model has six muscles spanning the elbow. Four of these are flexors and can work against the gravity on the dumbbell. In principle, only one flexor is necessary provided it is strong enough, so having four flexors available gives all sorts of possibilities for different force combinations. Technically, infinitely many different muscle force combinations can balance the exterior load in a system like this. This is the essence of statical indeterminacy.

For use in this tutorial, a slightly modified version of the model is provided here:
demo.diffmusarm2D.any. Please download it, save it, and load it into the AnyBody Modeling System.

How does a real human body handle this situation? Actually, not a lot is known about how the human body distributes force between redundant muscles. Compared to other scientific achievements, such as charting the human genome, it may seem like a simple matter to figure out how much a given muscle is pulling on a bone. But it is far from simple.

  • Measuring force in the first place is not easy. It is always based on measurement of a deformation of something.
  • Measuring force in the human body is almost impossible because it requires insertion of measurement devices into the body. This is subject to obvious ethical restrictions, and even if a harmless measurement device could be inserted, it would be difficult to rule out the possibility that it would influence the function of the body and thereby the results.
  • Measuring muscle force is possibly the most difficult of all because it involves very large forces in soft tissues.
  • Even if we could measure a muscle force, it could only be done for particular situations, and it may not reveal the overall strategy behind the body's recruitment of muscle forces.

So what do we know about muscle forces in the human body? Well, the following is generally agreed on:

  • Although infinitely many different muscle activation patterns can produce a given movement and balance given exterior forces, the recruitment is not random. For repeated movements there seems to be a consistent pattern of muscle activation. In other words, it seems to be based on some rational criterion.
  • When several muscles are spanning a joint, they tend to collaborate. Although it may be enough to activate one or a few muscles, the body tends to use all the available muscles.
  • In many movements it can be observed that some muscles seem to work against the movement or the exterior load. These are called antagonistic muscles.
  • Large muscles provide more force than small muscles.

With the possible exception of the antagonistic muscles, all of this indicates that the body is trying to make the best of its resources. In fact, it is also known that idle muscles quickly lose their strength. Similarly, muscles that are exercised will build up strength. This is really the body's way of making the best of its resources, and it leads to the suspicion that the recruitment of muscles is also based on some sort of optimality criterion. The interesting point is that if the insufficient system of equilibrium equations is augmented with an optimality criterion involving muscle forces, then the problem can have a unique solution. This is precisely the basis of muscle recruitment in the AnyBody Modeling System.

The basic optimality assumption in the AnyBody Modeling System is that the body attempts to use its muscles in such a way that fatigue is postponed as far as possible. This leads to the idea of minimizing maximum muscle activity.

Before we proceed, let us investigate the concept of muscle activity. In the AnyBody Modeling System, muscle activity is defined as muscle force divided by strength. Simple as that may seem, activity depends on our definition of muscle strength. You may think of muscle strength either as a constant property of a muscle or as something that changes with the operational conditions of the muscle. For instance, it is well known that muscle strength decreases with contraction velocity, so that muscles contracting quickly have less strength than muscles contracting slowly. This only depends on the kind of muscle model you choose, and it does not change the fact that the AnyBody Modeling System will recruit muscles according to the following criterion:

Minimize

(maximum muscle activity)
+ e1*(sum of activities)
+ e2*(sum of squared activities)

Subject to

  • Equilibrium equations fulfilled
  • Muscles are not allowed to push

In the standard setup of InverseDynamicAnalysis operations in the AnyBody Modeling System, e1 and e2 are both zero. This means that the system is minimizing the maximum muscle activity in each time step. Let us have a look at the consequences of that. Have you loaded demo.diffmusarm2D.any into the system yet? If not, please do it now, and run the InverseDynamicAnalysis. Open a ChartFX View, and browse your way through the output tree to the muscles. Expand any muscle, click "Activity", and replace the muscle's name in the specification line with an asterisk like this:

ArmModelStudy.Output.Model.Muscles.*.Activity

You should get the picture shown below:

Although we have eight muscles in the model you see only a few curves. The explanation is that, in the absence of e1 and e2 in the problem formulation above, the system minimizes the maximum activity of any muscle and this causes the muscle activity curves to fall on top of each other. So each curve you see is really several curves covering each other. However, since the muscles have different strengths, the common activities lead to different muscle forces. If we similarly plot the muscle forces by means of the Specification line:

ArmModelStudy.Output.Model.Muscles.*.Fm

we will get this result:

So the very systematic activation pattern becomes much more complex when viewed as muscle forces. Let us for a moment return to the activities again. They appear to range between approximately 0.30 and 1.20. These are direct measures of the load of the muscles. A load of 1.0 corresponds to the muscle working at its ultimate strength. In this case it appears that the muscles are about 20% overloaded when the dumbbell approaches the end of its movement. One of the advantages of the min/max criterion we are using here is that it guarantees that there is no other muscle recruitment that would lead to a smaller maximum activity. In other words, this criterion exploits the organism to its maximum potential and causes the muscles to collaborate maximally. This is a reasonable strategy for an organism trying to survive in a competitive environment.

But let us take a look at the consequence of increasing the value of e1. The name of e1 in AnyScript is RecruitmentLpPenalty. It is a member of the AnyBodyStudy class, so we can assign a value to it. Add the red line to the AnyScript model, load it, and run the InverseDynamicAnalysis again:

// The study: Operations to be performed on the model
AnyBodyStudy ArmModelStudy = {
  AnyFolder &Model = .ArmModel;
  RecruitmentSolver = MinMaxSimplex;
  RecruitmentLpPenalty = 1.0e+3;
  Gravity = {0.0, -9.81, 0.0};
};

We have assigned the rather large value of 1.0e+3 to RecruitmentLpPenalty. Plotting the activities again produces the following results:

This result is much different from the one we had before. The value of 1.0e+3 completely dominates the criterion, so here we are actually minimizing the sum of muscle activities. This has the effect of recruiting a minimum set of muscles and only those that are best suited at each position. This is known not to be correct because the muscles are not collaborating. So what is RecruitmentLpPenalty good for anyway? Well, the clean min/max criterion with e1 = 0 sometimes can cause unrealistic fluctuations of submaximal muscles between time steps. In those cases, small values of RecruitmentLpPenalty, say 1.0e-6 or 1.0e-5 can regularize the problem numerically. In this simple case, it makes no difference. If you keep increasing RecruitmentLpPenalty to, say, 1.0e-3, it will begin to make a difference on the submaximal muscles, and this is a sign that you may have increased it too much.

Quadratic muscle recruitment

As long as the solution algorithm is linear, the value of e2 will make no difference. The algorithm is specified by the variable RecruitmentSolver, and the linear options are

  • RecruitmentSolver = MinMaxSimplex;
  • RecruitmentSolver = MinMaxOOSolSimplex;

These algorithms are very similar in nature and are really just different implementations of the same technology. For very large and complex problems one algorithm may outperform the other, and this is why both are available in the system.

However, there is also a third algorithm available, and it differs radically from the two former:

  • RecruitmentSolver = MinMaxOOSolQP;

As the name indicates, this algorithm is quadratic, and it permits inclusion of quadratic terms and thereby e2 in the criterion. This has two potentials:

  1. Small values of e2 may regularize complex problems numerically much like e1 can do.
  2. Large values of e2 can change the formulation of the problem into something different just like e1 can do, but unlike e1, it makes physiological sense to use large values of e2.

Initially, try setting up the study like this:

// The study: Operations to be performed on the model
AnyBodyStudy ArmModelStudy = {
  AnyFolder &Model = .ArmModel;
  RecruitmentSolver = MinMaxOOSolQP;
  RecruitmentLpPenalty = 0.0;
  RecruitmentQpPenalty = 0.01;
  Gravity = {0.0, -9.81, 0.0};
};

As you have probably guessed, the AnyScript name of e2 is RecruitmentQpPenalty. Load and rerun the model again and have a look at the activities. They should be just like before. You have changed the solution algorithm from linear to quadratic but not the formulation of the problem. Since both algorithms solve the same problem, the results are identical.

However, try changing the setting of the variable like this:

RecruitmentQpPenalty = 1000.0;

This rather high value of e2 will dominate the criterion and leave you with a quadratic solution to the muscle recruitment problem. Some scientists prefer this solution to the min/max formulation, and AnyBody gives you the opportunity to choose min/max, quadratic, or any combination of the two by variation of RecruitmentQpPenalty. The quadratic solution to the problem is the following:

As you can see, the tendencies are much the same as before, but the muscular synergy is less outspoken in the quadratic case, and the maximum muscle activity is therefore higher. Muscles recruited according to the quadratic criterion will tire before muscles recruited according to the min/max criterion, but the difference particularly for the activation envelope is not very dramatic. In any case, the AnyBody Modeling System gives you the opportunity to pick the criterion you believe is the best.

The final lesson in the study of studies deals with muscle calibration.

AnyBody Technology A/S · Niels Jernes Vej 10 · DK-9220 Aalborg Ø · Denmark · Tel. +45 9635 4286 · Fax. +45 9635 4599
Copyright (c) AnyBody Technology A/S · 2006 · All rights reserved · Email webmaster@anybodytech.com