How to add vibration

Hello, I have been studying vibration recently. I tried to modify the SeatedHuman Demo by adding AnyKinEqFourierDriver function on the seatseg.and studying the force of muscles under the vibration along the Y axis. Now I modify the constraint and drive in the environment file,
The previous constraints were as follows:
AnyFolder Jnt = {
AnyKinLinear SeatGlobalLinMeasure = {
AnyRefNode &SegNode = ..Seg.Seat.SeatAdjNode;
AnyRefNode &GroundNode = ..GlobalRef.GroundNode;
};

AnyKinRotational SeatGlobalRotMeasure = {
  AnyRefNode &SegNode = ..Seg.Seat.SeatAdjNode;
  AnyRefNode &GroundNode = ..GlobalRef.GroundNode;
  Type = RotVector;
  AngVelOnOff = On;
};        

AnyKinEq SeatGlobalConst = {
  AnyKinLinear &LinMeasure = .SeatGlobalLinMeasure;
  AnyKinRotational &RotMeasure = .SeatGlobalRotMeasure;
  MeasureOrganizer = {0, 2, 3, 4};
};        

The previous driver file is shown below:
AnyKinEqSimpleDriver SeatGlobalDrv = {
AnyKinLinear &LinMeasure = ..Jnt.SeatGlobalLinMeasure;
AnyKinRotational &RotMeasure = ..Jnt.SeatGlobalRotMeasure;
MeasureOrganizer = {1,5};
DriverPos = {-.DrvPos.SeatGlobalLinYPos,(-90+.DrvPos.SeatGlobalZRot) pi/180};
DriverVel = {-.DrvVel.SeatGlobalLinYVel,.DrvVel.SeatGlobalZRotVel
pi/180};
Reaction.Type = {On,On};
};
The modified driver and constraint files are shown below:
AnyFolder Jnt = {
AnyPrismaticJoint Ground_Segment_Joint =
{

AnyRefFrame &groundfoot =  ..Seg.Seat.SeatAdjNode;

Axis=y;

AnyRefFrame &segment1_node =     Main.Model.EnvironmentModel.GlobalRef1;

};
AnyKinEqFourierDriver Vibration =
{
Type = Sin;
Freq = 2; //Do not use too high freq
A = {{0, 0.1 }};
B = {{0, 0}};

AnyKinMeasure &humanmode = Main.Model.EnvironmentModel.Jnt.Ground_Segment_Joint;
};

and perform inverse kinematics to meet the constraint conditions,
but the model became very strange.How do I define this driver and constraint? THANK YOU for YOUR support

Hi Zhong,

Please describe what you mean by strange it is kinematics or kinetics?

Secondly i can see you have added a vibration driver to the seat but did you also remove a equivalent driver from the model otherwise it will be kinematically overdetermined. and it would not solve.

Best regards
Søren

Hi Soren,
According to your previous reply and the guidance of the tutorial, I modified the model file. Using the original Seatedhuman Demo, I deleted the drive and constraint of the seatSeg, and changed the constraint function to move only along the Y-axis, and changed the driving function to the Fourier function that vibrating along the Y-axis.The code changes are as follows:
First define a point on the seat that points in the same y direction as the ground coordinate system:

Change the constraint file to move along the Y-axis



Change the driver function to the Fourier function

Since I want to explore the force of the human body in the sitting position when the Angle of the back is fixed at 15° and the seatSeg is vibrating, I modify the main document as follows:

When performing theInverseDynamics, the constraint and drive problem are not shown, but the following error message appears:

Could you tell me how to solve it?
Best regards
zhong

Hi Zhong,

This is muscle wrapping issue, the modifications you did to the drivers etc. seems to make it run ok, but the muscle path could not be determined correctly for this muscle.

If you have access to the newest AMS version 7.3 the cure is simple since it has a new muscle wrapping algorithm which is both much faster and more reliable. It can be enabled using this statement in your main file.

Main ={
System.Compatibility.AnyBody73_ExperimentalShortestPathSolver = On;
};

Note also that this requires AMMR 2.3, since modifications has been made to several muscles.
See this message for more details

Best regards

Søren

Alternatively the simplest thing to try is to increase the variable "StringMesh" in the muscle, this may help the muscle to converge.

Please also see this section of the wiki which describes solutions for this.

Hi,Soren,
Thank you for your patient answer. I will try to implement this code with a new version AMMR 2.3. Thank you again.
best regards
Zhong

Hi,Soren,
According to your advice I basically settled the problem of adding vibration function, now I have a question, about the abdomen muscles' activation. For example, Multifidi muscle, I noticed this muscle is divided into many blocks, when performing the inverseDynamics, The results are as follows:


if want to know Multifidi muscle's activation , How can I do? to take the average of all the values?or to add up all the values, or to take the maximum of all values?or to take the square root of the sum? or by any other algorithm?
Could you tell me how to solve it?
Best regards
zhong

Hi Zhong,

Condensing the data can be done in many ways, there is no unique answers to this.

I have previously tried to use a the max function on a muscle group, but average is also and option.

Best regards
Søren

Hi,Soren
Thank you for your answer. I wonder if it is possible to directly define the function in the script to get the maximum activation of the muscle group without exporting the data comparison. For example ,if I want to know the maximum activation of the Multifidi.Could you tell me what can i do achieve this ?
Best regards
Zhong

Hi Zhong,

This is possible so e.g.

 AnyVar ModelEnvelope = max({Main.Model.BodyModel.Right.Leg.Mus.GluteusMaximus1.Activity,
      Main.Model.BodyModel.Right.Leg.Mus.GluteusMaximus2.Activity,Main.Model.BodyModel.Right.Leg.Mus.GluteusMaximus3.Activity});

This code is taken from the AMMR model in Validation/GaitVaughan model see the file EMGComparison.any

There is also min and mean etc... see the functions available in the pull out window right side of the GUI.

Best regards
Søren

Hi Søren,
According to your Suggestions and tutorials, I have solved this problem. Thank you!
Best regards
Zhong

1 Like

This topic was automatically closed 125 days after the last reply. New replies are no longer allowed.