Constraints and reaction types for the knee exoskeleton with two links

Hi, I am trying to simulate a simple knee exoskeleton in AnyBody (by connecting with the human model in squat example). The exo has two CAD parts (thigh and shank), and one hinge joint for the knee. I managed to run the kinematics analysis by changing the constraints types by trial and error (shown in the attachment - not sure if these values area correct).
Then, to check the if dynamics of the model works properly, I provided an equal assistive torque to the human knee joint and exoskeleton hinge joint separately in two simulations. muscle activity of the vastus was compared.
Applying the assistive torque at human knee joint gave the expected results, by reducing the muscle activity to the desired level. However, the same assistive torque, when applied to the exoskeleton hinge joint, gives the results that does not make sense to me. It seems like vastus muscle is doing nothing throughout the simulation (i.e. activity was around 10^(-7), when it is supposed to be around 0.15).

Same as with constraints types, I set the reaction types arbitrarily by trial and error in a way that I could run the dynamics analysis somehow without getting a warning message about redundant constraints (shown in the attachment). I suspect that the problem lies in the way I have setup the constraints and reaction types. I read about soft and hard constraints in few places, which says that the soft ones are allowed to change during the simulation, whereas hard ones are not. However, I don't fully understand how to set all the constraint types and reaction types for the two contact points and hinge joint in a way that an assistive torque applied at exo joint gives close results as the assistive torque applied at the human knee joint.
I would be grateful if anyone could provide some guidance about how these constraints and reaction types should change with the underlying principal.

Hi Jeevan,

First of all, I would like to point you to our wiki page on connecting an exoskeleton to the human over here, where you can find detailed steps on how to go about connecting an exo to the human.

I agree with your approach regarding applying an assistive torque at the human knee joint and the exoskeleton hinge joint. This should clearly indicate if your model is working as expected or not.

If I were to go about your exoskeleton model, I would not use soft constraints. I would suggest you to use MeasureOrganizer in AnyKinEq to select the appropriate constraints and set them as hard constraints and avoid using soft constraints.

We know that the two exoskeleton segments would add 12 Degrees of Freedom (DOFs) in the model. Then, you would need an equal number of constraints. You get 5 constraints from the hinge joint of the exoskeleton. Then, you still need 7 more. I would suggest adding a cylindrical joint between the human knee and exoskeleton hinge joint (4 constraints). Then you need 3 more constraints: one constraint to fix the medial-lateral distance of the exoskeleton from the human. And two constraints to fix the angle of the exo hinge joint relative to the human. At your thigh connection you could fix the anterior-posterior and medial-lateral (x and z axes) translations. And at your shank point point you can fix the anterior-posterior (x axis) translation. If you have used AnyKinEq, I assume that the corresponding points you have used on the human and exoskeleton segments are coincident. Please set Reaction Type to Off for all the kinematic constraints that you are adding, except for the exo hinge joint where you will need the reaction forces at the 5 constraints.

For the inverse dynamics analysis, again, you would need 12 reactions to balance the 12 constraints that are added. 5 can come from the constraints at the exoskeleton hinge joint. And the remaining 7 can come from the human-exoskeleton connection. You can have 3 linear reactions each at the thigh and shank points and one reaction moment along the axial rotation. You can use AnyReacForce to add the reactions without adding kinematic constraints.

Please note, that there are several ways you can add these 7 constraints and reactions and I am just suggesting one way. This doesn't mean that other ways are incorrect.

I hope my answer helps.

Best regards,
Dave

Hi Dave,

Thank you very much for your reply. Since you have mentioned that corresponding points on the human and exoskeleton segments should be coincide when using AnyKinEq, I would like to resolve this before applying the other directions you have mentioned.

Referring to the attached image, first I created A, B, B', C nodes on the human model (A, B on thigh segment and B', C on shank segment, such that B, B' coincide each other visually). Then, I calculated AB, B'C distances using 'vnorm', and modelled exoskeleton in solid works such that AB = DE and B'C = EF. The exoskeleton was simply designed to understand the process, meaning that it's just two straight beams connected by a hinge joint.

Regarding the coincidence, I have few doubts.

  1. Should A,B, B',C exactly vertically aligned? If so how can I do that ?( because leg segments are not exactly vertical, and the each node was positioned relative to different segment).
  2. Should the rotation axis of hinge joint exactly aligned with the rotation axis of the knee joint? I am not sure if this happens in the current setup, since I just chose B, B' position where knee joint rotation seems to happen.

Also I hope to study the interactions force between human and exoskeleton after getting the knee joint functional. Therefore, I want to develop a exo - human connection that supports this secondary objective in the future. I just started using AnyKinEq because I could not find any other way to connect human and exoskeleton. Please let me know if there is a better and/or convenient way to connect human and exoskeleton considering the long term objectives.

Best Regards
Jeevan

Hi Jeevan,

You are right, it is important to understand how to make reference nodes using information already available. Firstly, you should look in the model tree how exactly the human knee joint is defined. You can find it if you follow this path: Main.HumanModel.BodyModel.Right.Leg.Jnt.Knee. If you look in this definition, you will find that this revolute joint uses a couple of nodes that are referred as thigh node and shank node. These, in fact, are pointers to the knee joint nodes on the human thigh and shank segments, correspondingly. Once you identify these nodes, you can define more reference nodes inside these nodes. These will take the sRel and ARel properties relative to the parent reference node (i.e., the knee joint node). So maybe you want to specify an offset along the axis (z) of the knee joint and the vertical direction (y). That is, you can define the nodes A,B,B',C on the human segments starting from the actual nodes used for defining the knee joint. Since, you define these nodes with some values that you know, then, you can recreate these nodes also on the exoskeleton. One more tip: you don't need to go into the actual script file where the knee joint nodes are defined to define more nodes. You can access existing objects anywhere in the model. Somewhere within the main, type:

Main.HumanModel.BodyModel.Right.Leg.Seg.Shank.KneeJoint = {
AnyRefNode A = {sRel = ....; ARel = ...;};
};

As for your doubts:

  1. I am not sure I understand this one correctly, but I think they don't need to be vertically aligned. I guess A can be in front of the leg and B can be located laterally, or anywhere else as you want. The only thing that should be important is that you have same relative offset between D and E on the exo as A and B on the human, and similarly for shank. Otherwise, if you add constraints, it will be an issue if you specify two nodes to be coincident when in reality they are not designed to be coincident.
  2. Yes, the hinge joints of the exoskeleton and human knee should be coaxial. I think if you follow the previous part of the reply, you should be able to ensure they are coincident.

Considering your long-term objectives, you should really look at kinematics and kinetics of the model as decoupled problems that you need to focus on independently of each other. AnyKinEq is probably fine for kinematics if you are comfortable using it. You could also start by something which allows some customization like AnyKinEqSimpleDriver. You could also consider some of the pre-defined joints. For investigating the interactions, you could start by using reaction forces as I mentioned previously. On the wiki page I linked, you can also read about adding contact elements. Contact elements can allow you to study the interaction force in more detail as you can obtain 6 dof interaction force at each interface, which is not possible with reaction forces since reaction forces are limited to the no. of constraints in the exo. For more info on contact elements, I will refer you to our previous webcast where you can have a brief introduction of the different ways to model the interface and find links to publications dealing with these topics in detail. You can also access the model used in those publications over here. Through this model you can see how to add contact elements. Admittedly, it's a bit complex.

I hope the answer helps.

Best regards
Dave

Hi Dave,

Thank you very much again for your reply. I created a new exoskeleton model and applied all the directions you had mentioned. Now the kinematic analysis run without any issue.

However, the Inverse Dynamic analysis fails with a error massage about redundant constraints. I attached the error massage and some of the code segments I used to apply the directions you mentioned in previous comments (attached image). Same type of code segments were used to create AnyKinEq and AnyReacForce for shank connection. It's highly appreciated if you could have a look and give me a suggestion to get my model working.

Best regards
Jeevan

Hi Jeevan,

I am glad to know that the kinematics analysis is working. I had a quick look at the code, and I think you should check the reactions at the AnyCylindricalJoint jnt_knee. They are on by default, and they may need to be turned off.

Best regards
Dave

Hi Dave,

The model finally works thanks to your directions, and the joint behave as it should be, when a external torque is applied. I really appreciate the highly useful feedback you provided.

However, I am new to AMS, and still trying to understand some code segments I used for this model. Referring to the attached image, I set the Reaction.type to off in 'AnyKinEq Thigh_connection' when adding constraints. However, for ID analysis, I added AnyReacForce to the same point (i.e. same base and target). In other words (as I understand), at one place I switched off Reaction.type and in another code segment I am setting reaction forces for the same connection. What does it actually mean?

Best Regards
Jeevan

Hi Jeevan,

You are right, it could have been a little shorter. Sometimes this is just an organization of the code to have the kinematic constraints to be decoupled from kinetic. The code was probably automatically generated and you get this kind of organization.

Please also notice MeasureOrganizer = {0,2} in case of the kinematic constraint - these are 2 selected degrees of freedom out of 6 for kinematic constraints, whereas reaction force is on the 3 linear degrees of freedom only.

Kind regards,
Pavel

Hi Pavel,

The code segments shown in the image of my last reply were not auto generated. I wrote them as per the Dave's previous comments. As I mentioned, it works now but I still do not understand few things related to this code.

What does it means by setting the reaction types to off? When should I do that if I am trying to extend the knee joint into a complete exoskeleton? What's the logic behind setting reaction types to on or off?

Also, I am trying to understand if there is any connection between setting these reaction types off in AnyKinEq, and setting reaction forces for ID in AnyReacForces (referring to the code segment of my previous comment)

Thanks for your time.

Best regards
Jeevan

Hi Jeevan,

Imagine a 2D system (planar arm: upper arm + forearm) - you can define their movement wrt each other without using muscles, but a some sort of engine/force generating mechanisms will be needed to carry this motion. A reaction force can be this kind mechanism - it will ensure equilibrium for this system. But if we actually want to introduce muscles - we need to disable the reaction force element for the kinematic driver, because a reaction force would do all the job leaving nothing for muscles. Hence, we would turn it off.

Secondly, sometimes the reaction force is set to off, because there could be something else handling dynamics for this degree of freedom. So as I said before - switching it off could be due to purely organizational aspects.

AnyKinEq is the base class for most of the drivers (0 movement for a specified kin. measure) - so there is nothing particular about this one. The most common reasons are suggested above.

When it comes to the exoskeleton - it will depend on the particular behaviour of one. If you know exoskeleton support - I would switch reaction forces off, compute and apply exo torque/force, and let muscles do the rest. And if you want to minimize work of muscles - you would enable the reaction forces, but then you are at the mercy of muscle recruitment solver, which computes that reaction force as a part of the optimization.

Kind regards,
Pavel

Hi Pavel,

Thank you very much for the explanation. I hope these facts will be highly useful for expanding my model.

Best regards
Jeevan

Thank you very much again for your reply. I created a new exoskeleton model and applied all the directions you had mentioned. Now the kinematic analysis run without any issue.