CMC with contact model not working (2.4)

Provide easy-to-use, extensible software for modeling, simulating, controlling, and analyzing the neuromusculoskeletal system.
POST REPLY
User avatar
Thomas Hofmann
Posts: 11
Joined: Tue Aug 23, 2011 1:38 am

CMC with contact model not working (2.4)

Post by Thomas Hofmann » Wed Dec 05, 2012 6:59 am

Hi,

for my diploma thesis I'm trying to calculate contact- and jointforces for the right arm wearing an orthosis. i'm using the model from Holzbaur et al. and linked it to the orthosis via some elastic foundation contact models. The problem is, that the cmc-simulation never finishes and opensim crashes without any error-message. There are no external forces acting on the model (its a passive orthosis) and ID for the model without contact is working. I'm just trying to give the model a prescribed motion and the orthosis should be moving along, due to the contact forces.

Here's a list of what I've already tried to solve the problem:
-created simple movement with just 2 DOF moving
-reduced/removed DOF's, wrapping objects, constraints, muscles of the model
-changed from Schutte to Thelen muscle model
-reduced the number of faces of the meshed contact bodies
-increased reserves
-looked for other suitable models but the upper extremity dynamic model isnt free for download yet (i already had contact with Wendy Murray) and other available models including the upper extremitys (full body) are just copying the model from Holzbaur.

Running the simulation without any muscles, only reserves, works and gives plausible results.
But I need to have muscle forces to calculate joint reactions. Unfortunately there are almost no topics regarding contact modeling in opensim, so I'm thankful for every advice.

Thanks in advance, Thomas

User avatar
Ayman Habib
Posts: 2235
Joined: Fri Apr 01, 2005 12:24 pm

Re: CMC with contact model not working (2.4)

Post by Ayman Habib » Thu Dec 13, 2012 3:11 pm

Hi Thomas,

Running CMC on models that have contact is challenging. For our gait models we don't use a contact model but rather apply the measured ground-reaction forces directly. I'm not sure what you're trying to model with contact or if you have measurements. If the latter would you be able to apply measured forces instead? If not, please post a screenshot or describe what you're modeling in more details and we'll try to help you out.

All the best,
-Ayman

User avatar
Thomas Hofmann
Posts: 11
Joined: Tue Aug 23, 2011 1:38 am

Re: CMC with contact model not working (2.4)

Post by Thomas Hofmann » Tue Dec 18, 2012 7:28 am

Hi Ayman,

thanks for your reply.

The goal of my thesis is to get a 3D model of an orthosis into OpenSim to see how wearing the othosis affects joint loads and produces contact forces, especially with not-ideal wearingpositions. With the additional picture I uploaded I hope you get an idea of what I'm trying to do.

I made some advances in the last few days: I managed to run a full cmc-simulation without the muscles but only ideal actuators instead. With this results I can compute contactforces but no joint loads.
Then I tried to use the command line instead of the GUI (it's a pitty I haven't used it before) and managed to run a full simulation WITH muscles but with standard cmc-timewindow and therefor (I guess) huge position-errors (0.6 rad max.).
Right now I'm trying to run the cmc-tool again via the command line with smaller timewindow (to increase tracking accuracy) and "slow target"-option, because "fast target" gave me an optimization error.
Normaly running the cmc-tool with my model and prescribed motion takes about 18 hours, with the "fast target"-option, so checking out different parameters from the setup-file is realy frustrating.

So, I'm thankfull for every little hint you can give me. Just let me know if you need more infos.

Best regards,
Thomas
Attachments
holzbaur_orthese_contact.png

User avatar
Ajay Seth
Posts: 136
Joined: Thu Mar 15, 2007 10:39 am

Re: CMC with contact model not working (2.4)

Post by Ajay Seth » Tue Dec 18, 2012 12:47 pm

As Ayman mentioned, performing CMC with contact is challenging. The main reason is that the contact elements have to be carefully positioned and properties tuned such that the initial conditions produce forces that are close to what is required for the system acceleration. In your case it is more than likely that the contact is deformed too much in the starting pose. Also, in terms of performance using an elastic foundation to model contact is going to be slow. I am assuming the cyan elements are the brace contact elements and the pink is on the arm (to be flesh?). In this case, the edges and sharp corners of the brace elements are problematic and require small integration steps to be resolved accurately. Also, how are you choosing the material properties of the contact force?

I recommend using a BushingForce to model a non-rigid (i.e. rigid = welded) or compliant brace in contact with the model. Like a Weld it defines a relative location and orientation of one body (the brace) in a frame on another body (the arm) so that the when aligned the bushing generates no force. The force is then proportional to the deflection (translation and orientation) of the frames from the neutral (aligned) position. You can define the linear stiffness and damping of that response. I have used the BushingForce with CMC without issues, but make sure to define the neutral position to be in (or near) equilibrium such that the forces of the bushing are not absurd at the initial condition. For example, use the starting pose when defining the location and orientation of the BushingForce element. You can also limit the kinematics of the brace to directions you are interested (compressive vs. shear) by defining a joint that only allows the brace to move in that direction (e.g. normal to the surface if all you are interested is in compressive loading of the brace).

Finally, you can use CMC's "slow" target as long as tracking errors are sufficiently weighted. Otherwise, you will still get a solution but the kinematics will not track. Also, if the model does not have sufficient actuation (i.e. to overcome erroneous contact forces) to match experimental kinematics you will always get bad answers. The "fast" target fails because it cannot satisfy the experimental accelerations, which are specified as constraints to the muscle redundancy problem.

User avatar
Thomas Hofmann
Posts: 11
Joined: Tue Aug 23, 2011 1:38 am

Re: CMC with contact model not working (2.4)

Post by Thomas Hofmann » Mon Dec 31, 2012 10:47 am

Hi Ajay,

thanks for your explanation and advice and sorry for replying so late.
In the meantime I reduced the stiffness of my contact-model by increasing the thickness of my elastic layer. With that, and slow-target and 0.001 s cmc-timewindow I ran a full cmc-simulation with a max. tracking error of ~7.5° which is fine for me (it took my computer ~60 hrs to finish). With the analyze-tool I got some decent contact-forces (the picture I posted was an old one, positioning now is much better), but joint reactions doesn't look that good. As an example I upload a picture of the elbow joint force with 2 different positions of the orthosis and without the orthosis.

Why does the joint force with the orthosis have so many oscillations, when the contact force itself has a smooth curvature? I noticed that the muscle forces with the contact-model also have this ugly oscillating curves. This is the reason for the ugly joint force I guess but why is there a difference in the smoothness of the muscle forces when I do cmc with and without a contact model?

I'm looking forward to get another reply from one of you soon.
Best wishes, Thomas.
Attachments
contact_res_wrist.png
smooth contact force
contact_res_wrist.png (6.9 KiB) Viewed 1362 times
elbow_res.png
ugly joint force
elbow_res.png (9.15 KiB) Viewed 1362 times

POST REPLY