Page 2 of 3
Re: Contact force oscillations/parameter tuning
Posted: Tue Nov 09, 2021 8:20 am
by rosshm
I noticed recently that Moco has an "AccelerationTrackingGoal" that minimizes the squared deviations between the model's accelerations and target accelerations, so it seems like users could implement an acceleration-minimizing term for explicit dynamics as well (i.e. use AccelerationTrackingGoal with the target accelerations all set to zero).
I've had better luck (more consistent convergence) using explicit multibody dynamics in Moco, but have not explored this extensively. When I use implicit, especially for high-dimensional problems, the convergence is spotty.
Ross
Re: Contact force oscillations/parameter tuning
Posted: Wed Nov 10, 2021 6:04 am
by rosshm
Related question: if you minimize accelerations of all DoF, is this (conceptually) equivalent to minimizing accelerations of the center of mass? I think it is, but only thought about it long enough to type this post.
Re: Contact force oscillations/parameter tuning
Posted: Wed Nov 10, 2021 3:52 pm
by pvb
Thanks for the tip about the AccelerationTrackingGoal, I'll have to try that in the future.
I think minimizing the accelerations of the individual DoF's is not completely equivalent to minimizing CoM accelerations, assuming your DoFs are joint angles, and not CoM position/velocity of individual segments.
Minimizing CoM accelerations would affect the shape of the GRF (presumably making it more spread out). There would be no effect if there is no contact with the ground (so during the flight phase of a jump, for instance, or a somersault). Arguably, minimizing the accelerations of all the DOFs could have an effect on intersegmental movement (but not total CoM movement) even if you're not touching the ground, so I think there are situations that you might get (slightly different results) from the two.
Cheers,
Pasha
Re: Contact force oscillations/parameter tuning
Posted: Wed Nov 10, 2021 9:41 pm
by nbianco
I'm not sure about minimizing the COM accelerations, but the MocoAccelerationTrackingGoal is for tracking body accelerations, not generalized accelerations. So if you track "zero" data, you will be minimizing body accelerations, which is different than "solver.set_minimize_implicit_multibody_accelerations(true)" for implicit mode.
You can always use MocoOutputGoal for minimizing body accelerations too.
Re: Contact force oscillations/parameter tuning
Posted: Sat Dec 11, 2021 5:27 pm
by pvb
Hi all,
I was wondering if someone has tried using MocoContactTrackingGoal to reduce impact peaks in their predictive optimizations? Did this result in qualitatively/quantitatively improved GRF curves in gait prediction?
Cheers,
Pasha
Re: Contact force oscillations/parameter tuning
Posted: Sun Dec 12, 2021 9:43 am
by rosshm
I've not tried that for predictive simulations. You could try giving it tracking targets of zero and see what happens.
My experience with impact peaks in predictive simulations (limited to human walking and running simulations):
- They tend to come from the foot quickly "slapping" the ground after initial contact
- Multi-segment feet seem to help although I'm not sure why
- More overall compliance and damping in the model seems to help, e.g. I see them mostly in 2-D and not so much in 3-D, and including passive joint moments with a damping term seems to help
I'd be inclined to try MocoAccelerationTrackingGoal with targets of zero (maybe for the whole body or maybe just for the feet) as well, since GRF spikes should be accompanied by body acceleration spikes.
Ross
Re: Contact force oscillations/parameter tuning
Posted: Sun Dec 12, 2021 10:06 am
by pvb
I've not tried that for predictive simulations. You could try giving it tracking targets of zero and see what happens.
This was my thinking as well. Since ContactTrackingGoal is a squared cost term, this might push down the impact peaks. Planning on trying it somewhere in the coming weeks.
I'd be inclined to try MocoAccelerationTrackingGoal with targets of zero (maybe for the whole body or maybe just for the feet) as well, since GRF spikes should be accompanied by body acceleration spikes.
I'll give that a shot as well, although I'd switched to implicit MBD so that I could minimize multibody accelerations. I'll report back when I get around to it.
- More overall compliance and damping in the model seems to help, e.g. I see them mostly in 2-D and not so much in 3-D, and including passive joint moments with a damping term seems to help
Compliance definitely helped in my case. Damping/dissipation actually increased the impact peaks for me, which makes sense because you're punishing speeds with a higher reaction force (specifically in the contact model though, not sure what a joint damper might do).
Cheers,
Pasha
Re: Contact force oscillations/parameter tuning
Posted: Sun Dec 19, 2021 3:25 pm
by pvb
Hi all,
I've added in a MocoContactTrackingGoal, with a GRF .STO that's all zeros. Because moco reads this in as a TimeSeriesTable, I had to add a timeseries vector. Does this time vector then get used during the optimisation, or does MOCO only use the force values with the row numbers as the collocation points? The time vector doesn't seem to have to correspond to the times in my initial guess of the mocoTrajectory, but I'm not sure how the input data is treated for this cost in that case. I've got the same question regarding acceleration tracking goal, since that requires a TimeSeriesTableVec3 (which also has a time vector).
Cheers,
Pasha
Re: Contact force oscillations/parameter tuning
Posted: Mon Jan 03, 2022 12:11 pm
by nbianco
Hi Pasha,
Yes, the time vector is relevant for both tracking goals. You'll need to ensure that the time vector spans the time range of your simulation.
Carmichael Ong from our lab at Stanford has previously minimized the acceleration of the head to help reduce ground reaction force peaks in his 2D predictive simulations:
https://pubmed.ncbi.nlm.nih.gov/31589597/.
Though, if you've already switched to implicit multibody dynamics, I'd think that minimizing accelerations would do the trick.
Best,
Nick
Re: Contact force oscillations/parameter tuning
Posted: Tue Mar 12, 2024 4:56 am
by luckyme
Hi Pasha,
Sorry to reopen this old topic. Could you give me some suggestions on how you finally solved the problem of oscillation and spikes occured in vertical ground reaction force ?
Best Wishes,
Matthew