Page 1 of 1

How to predict hemiparetic gait

Posted: Thu Feb 03, 2022 4:01 am
by choyj1085
Hi,

Thanks to Moco team for supporting such an advanced tool.

I have a question about assisting an hemiparetic gait.
I want to make a hemiparetic gait but the motion deviation is very small. I read the paper about Mocotrack which simulate about the hip adduction/dorsiflexor weakness. as the paper said, I reduced max isometric force of right limb muscles by 50% but the change was very small. can you give me some advices to make a hemiparetic gait? your reply will be great help to me.

Thanks a lot.

Re: How to predict hemiparetic gait

Posted: Thu Feb 03, 2022 12:48 pm
by nbianco
Hi Yongjin,

Assuming that you're referring to the recent Johnson et al. 2022 bioRxiv preprint, the code for that project can be found here: https://simtk.org/projects/post-stroke-sym.

Best,
Nick

Re: How to predict hemiparetic gait

Posted: Thu Feb 03, 2022 10:45 pm
by choyj1085
I'm really thank you for your help.

with the another code, i've simulated the asymmetric gait but the result is same as normal gait.
I checked the model and the max isometric force and other kinematics features were modified for asymmetry.

I thought if the model has no error then initial guess can be the factor affecting the result.
So, When I load initial guess from .sto file, is the motion fixed as the normal walking even though the model is modified like stroke patients.
I wonder the range of initial guess called by setGuessFile() function.


also, when i set initial guess manually, i had a error like this when I use setState() function.
Java exception occurred:
java.lang.NullPointerException: SimTK::Vector const & reference is null

at org.opensim.modeling.opensimMocoJNI.MocoTrajectory_setState(Native Method)

at org.opensim.modeling.MocoTrajectory.setState(MocoTrajectory.java:353)

I guess it's because the getNumTimes() function returns 0 value so, i edited and ran the code but the error looks like this

java.lang.RuntimeException: For state /forceset/bflh_r/normalized_tendon_force, expected 0 elements but got 1. is there anything wrong?

Best regards

Re: How to predict hemiparetic gait

Posted: Sun Feb 06, 2022 2:28 am
by choyj1085
Hi

I keep testing about asymmetric gait but I couldn't implement asymmetric gait which stroke patients really show.

so, I have some guesses about the moco and i'll be really greatful if you give an opinons about these.

First, even though I reduced muscle isometric force by 60%, speed of each leg which calculated from Mocotrack is same with each other.
I think it cannot be possible to keep the speed even though the muscle force is reduced. if the asymmetric gait of patients can be implemented by Moco, so i guess what should be considered is the goal. I think the performance of mocosolver is too good comparing with state of patients.
is it possible to implement stroke asymmetric gait using Moco? if possible, should the goal be modified?

Second, I thought the reason gait is more stable than I expected is it's simulated with 2D model(DGF model). it reduces the need to concern the balance when model is walking.
if the model is 3D and if we consider about the frontal plane, would the gait be closer to that of patients?

Again, I'll be really greatful if you give an opinons about these questions.
Best regards.

Re: How to predict hemiparetic gait

Posted: Fri Feb 11, 2022 3:44 pm
by nbianco
Hi Yongjin,

I'm not sure exactly what's wrong with your guess, but you might be missing some variables in the guess file. I like to create an initial guess from the solver that I know is compatible with the problem, and then modify that guess to suit my needs:

Code: Select all

solver = study.initCasADiSolver();
guess = solver.createGuess();
# modify 'guess' here
solver.setGuess(guess);
To answer your questions:
I think it cannot be possible to keep the speed even though the muscle force is reduced.
This may be true if the actuators in the model are not strong enough to track the reference data. But this may be an interesting outcome if you're looking to see the effect of weakness on movement ability.
I think the performance of mocosolver is too good comparing with state of patients.
is it possible to implement stroke asymmetric gait using Moco? if possible, should the goal be modified?
I'm having trouble understanding exactly what you mean here, but for simulating asymmetric gait, the bioRxiv paper and simulation code I linked is your current best resource for that.
Second, I thought the reason gait is more stable than I expected is it's simulated with 2D model(DGF model). it reduces the need to concern the balance when model is walking.
if the model is 3D and if we consider about the frontal plane, would the gait be closer to that of patients?
Yes, excluding frontal plane motions mean we ignore important features of balance during asymmetric walking. However, model complexity depends on what you're looking to study with your simulations. If you're studying balance, then yes, you probably need a 3D model. If you're studying changes in metabolics based on weakness in sagittal plane muscles (like we did in the bioRxiv preprint) then a 2D model can be a reasonable approximation.

Best,
Nick

Re: How to predict hemiparetic gait

Posted: Sun Feb 20, 2022 9:08 pm
by choyj1085
Hi
Thank you for your advice. Following your advice, I tried to implement a hemiparetic gait.
Because my goal is to see the change in hemiparetic gait according to cable assistance, I tried to observe the change in gait when various conditions are changed and it was based on Mocotrack example code.
By editing muscle activation time, I can mimic hemiparetic gait more similarly but I still have few problems.

First, I have trouble setting a cable force trajectory. I choose Mocotrack sample because according to journal paper, it was suitable for change of kinematics with things like exoskeleton. at Mocotrack example, code set reference trajectory with setStatesReference() function with marker trajectory or kinematic data(in case of Mocotrack, coordinate.sto). To implement cable force trajectory, should I add the force data at this file? Because the reference data is about kinematics, I'm not sure force data can be emerged. Or, is there any function which can set about force data.

Second, I edited armless model to see the frontal plane motion. So, subtalar joint which set as weld joint becomes pinjoint. After that, frontal plane motion can be seen. However, It is not correctly calculated. In stance phase, the foot should stay fixed but subtalar angle of model keep rotating. I want to increase the correctness of calculation and where should I start to edit for this?

And, is there any way to add a noise during calculation process. the reason I ask this question is, even though defects such as muscle force is implemented, model walks so well. so I wonder if I can add noise during calculation process to mimic the decrease of accuracy of neurological response.

Any adivce will be very appreciated.
Best regards

Re: How to predict hemiparetic gait

Posted: Mon Feb 21, 2022 3:36 pm
by nbianco
Hi Yongjin,
To implement cable force trajectory, should I add the force data at this file?
No, your force trajectory should implemented with either a PrescribedForce, a PathActuator (which adds a control to the problem), or something similar.
Second, I edited armless model to see the frontal plane motion. So, subtalar joint which set as weld joint becomes pinjoint. After that, frontal plane motion can be seen. However, It is not correctly calculated. In stance phase, the foot should stay fixed but subtalar angle of model keep rotating. I want to increase the correctness of calculation and where should I start to edit for this?
I'm not sure what you mean here; could you provide more info about foot kinematics (e.g., plots)? You should check that the pelvis joint relative to the ground is a 3D joint as well.
And, is there any way to add a noise during calculation process. the reason I ask this question is, even though defects such as muscle force is implemented, model walks so well. so I wonder if I can add noise during calculation process to mimic the decrease of accuracy of neurological response.
Unfortunately, no. There's no way to add noise to the problem with Moco in the way you're describing.

-Nick