Hello AnyBody,
I would like to add an auxiliary torque at each of the left and right hip and knee joints in the Plug-in-gait-simple model, in order to simulate the effect of a conceptual exoskeleton during human gait.
Below is my code.
/// Study for running the inverse dynamic simulation
AnyBodyStudy InverseDynamicStudy =
{
//RightKnee
AnyFunInterpol RightKneeForce =
{
Type = PiecewiseLinear;
FileName = "D:\Anybody_Task\Right_knee.csv";
};
AnyForce RightKneeMoment =
{
F = .RightKneeForce(Main.Studies.InverseDynamicStudy.t);
AnyKinMeasure &ref = Main.HumanModel.BodyModel.Interface.Right.KneeFlexion;
viewForce.Visible = On;
};
//LeftKnee
AnyFunInterpol LeftKneeForce =
{
Type = PiecewiseLinear;
FileName = "D:\Anybody_Task\Left_knee.csv";
};
AnyForce LeftKneeMoment =
{
F = .RightKneeForce(Main.Studies.InverseDynamicStudy.t);
AnyKinMeasure &ref = Main.HumanModel.BodyModel.Interface.Left.KneeFlexion;
viewForce.Visible = On;
};
//RightHip
AnyFunInterpol RightHipForce =
{
Type = PiecewiseLinear;
FileName = "D:\Anybody_Task\Right_hip.csv";
};
AnyForce RightHipMoment =
{
F = .RightHipForce(Main.Studies.InverseDynamicStudy.t);
AnyKinMeasure &ref = Main.HumanModel.BodyModel.Interface.Right.HipFlexion;
viewForce.Visible = On;
};
//LeftHip
AnyFunInterpol LeftHipForce =
{
Type = PiecewiseLinear;
FileName = "D:\Anybody_Task\Left_hip.csv";
};
AnyForce LeftHipMoment =
{
F = .LeftHipForce(Main.Studies.InverseDynamicStudy.t);
AnyKinMeasure &ref = Main.HumanModel.BodyModel.Interface.Left.HipFlexion;
viewForce.Visible = On;
};
"But I ran into a problem: the resulting joint moments are only shifted up/down compared to the case without the auxiliary torques.
The path I used to read / apply the torque is:Studies-InverseDynamicStudy-BodyModel-SelectedOutput-Right-Leg-JointMomentMeasure-HipFlexion or KneeFlexion
Here are two plots comparing the joint moments before and after adding the assist torque.
Uploading: 图片1.png…
Uploading: image.png…
The figure below shows a comparison between my assist torque and the original (baseline) torque.
Uploading: 图片3.png…
Uploading: 图片4.png…
Uploading: 图片5.png…
Uploading: 图片6.png…
After I applied the torque in AnyBody, the observed result turned out like this.
Uploading: 图片7.png…
Uploading: 图片8.png…
The joint moment now looks like this—how should I interpret it, and how can I apply the torque I calculated correctly?
My interpolation file has time (frames) in the first column and torque values (Nm) in the second column.
Any suggestions would be greatly appreciated—thank you very much!