Contact force oscillations/parameter tuning
- Ross Miller
- Posts: 372
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Contact force oscillations/parameter tuning
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
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
- Ross Miller
- Posts: 372
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Contact force oscillations/parameter tuning
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.
- Pasha van Bijlert
- Posts: 219
- Joined: Sun May 10, 2020 3:15 am
Re: Contact force oscillations/parameter tuning
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
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
- Nicholas Bianco
- Posts: 1003
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Contact force oscillations/parameter tuning
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.
You can always use MocoOutputGoal for minimizing body accelerations too.
- Pasha van Bijlert
- Posts: 219
- Joined: Sun May 10, 2020 3:15 am
Re: Contact force oscillations/parameter tuning
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
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
- Ross Miller
- Posts: 372
- Joined: Tue Sep 22, 2009 2:02 pm
Re: Contact force oscillations/parameter tuning
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
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
- Pasha van Bijlert
- Posts: 219
- Joined: Sun May 10, 2020 3:15 am
Re: Contact force oscillations/parameter tuning
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've not tried that for predictive simulations. You could try giving it tracking targets of zero and see what happens.
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.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.
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).- 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
Cheers,
Pasha
- Pasha van Bijlert
- Posts: 219
- Joined: Sun May 10, 2020 3:15 am
Re: Contact force oscillations/parameter tuning
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
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
- Nicholas Bianco
- Posts: 1003
- Joined: Thu Oct 04, 2012 8:09 pm
Re: Contact force oscillations/parameter tuning
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
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
- Matthew Lee
- Posts: 52
- Joined: Sat Jun 20, 2020 7:46 pm
Re: Contact force oscillations/parameter tuning
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
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