recruitment solver

Dear support team

As I?fd like to compare the different opimization criteria for the
muscle force distribution I?fm trying to understand the different
recruitment solver within AnyBody, most of all the two
variables ?elinear penalty?f and ?equadratic penalty?f. If I understood
it correctly the min/max solver minimizes the objective function

f(zi)= b + Qp * ‡"zi,

where zi is the activity of muscle I, b is the maximum activity (with
zi<=b), and Lp is the linear penalty. In this case, when Lp = 0 the
maximum activity is minimized. When Lp is high, the sum of the muscle
activity will be minimized.

My question concerns the quadratic programming algorithm: what is
here the objective function to be minimized? Is it accordingly:

f(zi)= b + Qp * ‡"zi^2?

If so, how high must Qp be that the minimization problem corresponds
to a minimization of the square sum of the muscle activity? I?fm
interested in the latter minimization. As the model consists of a lot
of muscle, at one point the quadratic programming solver doesn?ft find
a solution anymore (?eproblem is unbounded?f). When I decrease Qp (<35)
a solution is found. Now, I?fd like to know what this variable Qp
means. In a simple model (consisting of two segments connected by a
hinge joint, 2 agonistic and 1 antagonistic muscle, 1 external force)
it is easy to show that as Qp increases the solution converge to the
force distribution where the square sum of muscle activity is minimal
(as this simple problem is analytically solvable). But is it possible
to say how close to the latter solution I am with a smaller Qp?
By the way, have you changed the quadratic programming solver in the
beta version 2.0? Strangely, in the new version the problem is always
unbounded using the OOSOLQP recruitment solver, although it is
exactly the same model, which worked quite well in the old version.

Thanks a lot for your help
Christine

Hi Christine

Please see the answers below

— In anyscript@yahoogroups.com, “christine_schaerer”
<christine_schaerer@y…> wrote:
> Dear support team
>
> As I?fd like to compare the different opimization criteria for
the
> muscle force distribution I?fm trying to understand the
different
> recruitment solver within AnyBody, most of all the two
> variables ?elinear penalty?f and ?equadratic
penalty?f. If I
understood
> it correctly the min/max solver minimizes the objective function
>
> f(zi)= b + Qp * ‡"zi,
>
> where zi is the activity of muscle I, b is the maximum activity
(with
> zi<=b), and Lp is the linear penalty. In this case, when Lp = 0
the
> maximum activity is minimized. When Lp is high, the sum of the
muscle
> activity will be minimized.
>
> My question concerns the quadratic programming algorithm: what is
> here the objective function to be minimized? Is it accordingly:
>
> f(zi)= b + Qp * ‡"zi^2?
>

Your functions are correct, i assume that the sign “‡” means
summation and that Lp by mistake came out as Qp in the first
function

> If so, how high must Qp be that the minimization problem
corresponds
> to a minimization of the square sum of the muscle activity?

It is difficult to answer what the magnitude of RecruitmentQp-
Penalty should be in order to obtain an optimization corresponding
to a minimization of the square sum of the muscle activity. This
will be problem dependent, please try to investigate the convergence
of the problem for an increasing QP penalty, in order to determine
the size of the penalty.

I?fm
> interested in the latter minimization. As the model consists of a
lot
> of muscle, at one point the quadratic programming solver
doesn?ft
find
> a solution anymore (?eproblem is unbounded?f). When I
decrease Qp
(<35)
> a solution is found.

The OOSolQp solver is not the most robust of the solvers we are
working on resolving this issue

Now, I?fd like to know what this variable Qp
> means. In a simple model (consisting of two segments connected by
a
> hinge joint, 2 agonistic and 1 antagonistic muscle, 1 external
force)
> it is easy to show that as Qp increases the solution converge to
the
> force distribution where the square sum of muscle activity is
minimal
> (as this simple problem is analytically solvable). But is it
possible
> to say how close to the latter solution I am with a smaller Qp?

The best hint you can get is how solution converge for an increasing
QP penalty.

> By the way, have you changed the quadratic programming solver in
the
> beta version 2.0? Strangely, in the new version the problem is
always
> unbounded using the OOSOLQP recruitment solver, although it is
> exactly the same model, which worked quite well in the old version.
>
> Thanks a lot for your help
> Christine

There should not be any changes which could have this effect, but as
mentioned above we are working on improving the robustness of the QP
solver. Please give us some information about your model such as how
many muscles and if they are wrapping etc.

I will discuss your problems with my colleauges on monday, maybe we
can find a better solution to the problems you have.

Please do not hesitate to ask again if this do not answer your
questions

Best regards

AnyBody support

Hello Christine,

  • and welcome to the group. This is John, and I just wanted to add a
    few comments to the answer you received earlier from one of my
    colleagues:

Most of the questions you are asking are answered in the tutorial “A
study of studies”. If you have not already had a look at it, it may
be a good idea to do so. However, some additional comments are
relevant:

One subtlety about muscle recruitment that the tutorial does not
describe is the dependency of joint forces on the recruitment
criterion. As you know, muscle forces produce joint forces, and one
very important application of the AnyBody Modeling System is to
compute estimates of the size of these joint forces. Unfortunately,
nobody knows which criterion the human body uses to recruit muscle
forces, and the computed joint forces depend on the choice of
criterion.

But we are not completely lost, because the system gives us the
opportunity to bracket the result, i.e. find an interval in which the
correct solution will be. This is because the linear criterion and
the min/max criterion form the two extreme ends of the possible
results of muscle recruitment in terms of recruitment criteria with
synergistic muscles:

The linear criterion, which you will get with a large linear penalty,
tends to only activate the strongest muscle about each degree of
freedom. So, if you use a large value of the linear recruitment
penalty, then you will get an unrealistic muscle recruitment, but
none the less a useful information because it forms the lower limit
of joint reaction forces.

The min/max criterion is opposite. It will make the muscles help each
other as much as possible with no regard for joint reaction force,
and hence it generates a solution with maximum joint reaction, i.e.
the other end of the interval.

Please notice that the min/max criterion will sometimes predict
antagonistic muscle forces, but only to the extent that they help
reducing the maximum muscle load. This means that the co-contraction
seen in unskilled movements, such as an untrained individual trying
to balance on a tight rope, will not be predicted by any of these
criteria. Thus, the system presumes that the movements you are
modeling are skilled.

Best regards,
John

Dear Every Body,

My model is composed by 4 segments: pelvis, thigh, shank and foot.
each of them are driven by 6 drivers.
there is no joint in my model.
my model has about 30 muscles.
the kinematics analysis ran correctly.
but when i was trying to do the ‘inverse dynamic’ , Anybody claimed
that the problem was unbounded.

i had put AnyReacForce (6) at the pelvis but i don’t have any force
under the foot.

do you have an explanation and a solution?

Thank you.

nb: it’s for my memory work, and i’d like to give explanation about
that and also may be give a ‘way to solve it’ for the future student.
it’s for Monday :wink: thank you

Hello Lola,

It is hard to say precisely what is wrong with your model without
looking closer at the details. However, from your description it does
sound like the model is somewhat unusual.

Instead of joints you are driving all the segments in 6 dofs.
Obviously this will work in terms of kinematics because the amount of
specified positions exactly matches the number of dofs for each
segment.

In terms of kinetics, the matter is different and depends on the way
you have defined the drivers. If the drivers have Reaction.Type =
{1,1,1,…}, then the inverse dynamic analysis will work, but the
result will not be very interesting because the drivers are carrying
the full load for each segment, and there will be nothing for the
muscles to do.

If the drivers are not carrying the load (Reaction.Type =
{0,0,0,…}), then the muscles must balance the exterior load, and
this is probably what you want. However, when the muscles are pulling
on the segments, the joints must be available to balance the load
from the muscles. In the absense of joints the muscles are unable to
work, in fact just like your own body would be dysfunctional if it
had no joints.

Best regards
AnyBody Support

— In anyscript@yahoogroups.com, “loladanhaive” <loladanhaive@y…>
wrote:
> Dear Every Body,
>
> My model is composed by 4 segments: pelvis, thigh, shank and foot.
> each of them are driven by 6 drivers.
> there is no joint in my model.
> my model has about 30 muscles.
> the kinematics analysis ran correctly.
> but when i was trying to do the ‘inverse dynamic’ , Anybody claimed
> that the problem was unbounded.
>
> i had put AnyReacForce (6) at the pelvis but i don’t have any force
> under the foot.
>
> do you have an explanation and a solution?
>
> Thank you.
>
> nb: it’s for my memory work, and i’d like to give explanation about
> that and also may be give a ‘way to solve it’ for the future
student.
> it’s for Monday :wink: thank you

Thank you for your answer.

Have you got any idea on how i could try to go round this problem?

i suddenly have two idea in mind:

first:

do you think that if i had add reaction force between segment when
the muscles would be pulling
on the segments, the ReactionForce would be available to balance
the load from the muscles?

if yes what kind of reaction force should i add?

second:
do you think that if i had add ‘trick’ drivers between segment and
that i put their (Reaction.Type = {1,1,1,…}), and all my other
driver to (Reaction.Type = {0,0,0,…}) so that

, when the muscles would be pulling
on the segments, the Reaction would be available to balance the
load from the muscles?

Hope i’m not telling too much stupidity.

Lola Danhaive

Hi Lola

> i suddenly have two idea in mind:
>
> first:
> do you think that if i had add reaction force between segment when
> the muscles would be pulling
> on the segments, the ReactionForce would be available to balance
> the load from the muscles?
>
> if yes what kind of reaction force should i add?

You should add exactly the reactions that the usual joints provide. -
At least this is the case if you want the model to resemble a real
leg. If you add other reactions than those provided by the real
joints, then you are changing the mechanics of the system
fundamentally, and the results you will get in terms of forces will
probably be very different from the force balance in a real leg.

What is the reason why you are trying to avoid defining the usual
joints?

> second:
> do you think that if i had add ‘trick’ drivers between segment and
> that i put their (Reaction.Type = {1,1,1,…}), and all my other
> driver to (Reaction.Type = {0,0,0,…}) so that
> when the muscles would be pulling
> on the segments, the Reaction would be available to balance the
> load from the muscles?

These ‘trick’ drivers would be exactly like the reaction forces
mentioned above except that they would provide a position in addition
to the reaction force. This would mean that to avoid kinematic over-
determinacy you would have to remove as many of the original drivers
as you define ‘trick’ drivers. So the AnyReacForces are a better
solution.

But at the end of the day, the best thing is to create a model of the
leg like it really is mechanically.

Best regards,
AnyBody Support

Hi

I had avoid to modelise joint because i found that they were
difficult to implement. where is exactly de center of rotation of
the knee??

That’s why i didn’t do it, but it was may be not such a good idea…

thank you.

lola danhaive

— In anyscript@yahoogroups.com, “AnyBody Support” <support@a…>
wrote:
> Hi Lola
>
> > i suddenly have two idea in mind:
> >
> > first:
> > do you think that if i had add reaction force between segment
when
> > the muscles would be pulling
> > on the segments, the ReactionForce would be available to balance
> > the load from the muscles?
> >
> > if yes what kind of reaction force should i add?
>
> You should add exactly the reactions that the usual joints
provide. -
> At least this is the case if you want the model to resemble a real
> leg. If you add other reactions than those provided by the real
> joints, then you are changing the mechanics of the system
> fundamentally, and the results you will get in terms of forces
will
> probably be very different from the force balance in a real leg.
>
> What is the reason why you are trying to avoid defining the usual
> joints?
>
> > second:
> > do you think that if i had add ‘trick’ drivers between segment
and
> > that i put their (Reaction.Type = {1,1,1,…}), and all my
other
> > driver to (Reaction.Type = {0,0,0,…}) so that
> > when the muscles would be pulling
> > on the segments, the Reaction would be available to balance the
> > load from the muscles?
>
> These ‘trick’ drivers would be exactly like the reaction forces
> mentioned above except that they would provide a position in
addition
> to the reaction force. This would mean that to avoid kinematic
over-
> determinacy you would have to remove as many of the original
drivers
> as you define ‘trick’ drivers. So the AnyReacForces are a better
> solution.
>
> But at the end of the day, the best thing is to create a model of
the
> leg like it really is mechanically.
>
> Best regards,
> AnyBody Support

Hi Lola,

> I had avoid to modelise joint because i found that they were
> difficult to implement. where is exactly de center of rotation of
> the knee??
>
> That’s why i didn’t do it, but it was may be not such a good idea…

Well, you do have a point. If, for instance, we model the knee as a
hinge and disregard the fact that it does not have a fixed center of
rotation, then we may still find from mocap data that it it has
rotation and even some degree of lateral flexion that is not
compatible with a hinge joint. So mocap experimentalists sometimes
are inclined to disregard the joints completely and just rely on the
actual segment moveents they have found. As long as we are only doing
kinematics that may all be well and fine.

But when we go from pure kinematics to kinetics, the requirements are
stricter; we also must make sure that the force equilibrium is
correct. This is why the AnyBody Modeling Sytem allows for a
separation of kinematics and kinetics. So, you can in fact do what
you originally planned: drive the segments kinematically as they
actually move. You can also by careful definition of AnyReacForces
provide exactly the kinetic reactions you believe the joints are
providing.

So it seems all would be good? Well, there is at least one thing to
beware of: Forces that move will perform work. This is also the case
for the joint reactions you define. If the segments actually move at
the joints where you are presuming the reaction forces to be active,
then these forces will perform work. Real reaction forces are passive
and do not perform work, so you will essentially have added a motor
to the model that will perform som small amount of work and ruin the
energy balance of the system. It may not be enough to make any real
difference to the result, but it is definitely something to watch out
for.

The approach we recommend is always to try to model the body with
enough complexity to capture the properties you wish to investigate.
Shortcuts almost always have some undesired side effect. For many
investigations a hinge knee works fine, but for some cases you need
something more accurate. The AnyBody Research Project has developed a
knee that has a much more precise kinematics, and it will be
available in version 5 of the repository.

Best regards,
AnyBody Support