What is the proper approach (or a good example) for enforcing prismatic joint limits on a joint that is also actuated?

2 views (last 30 days)
I've taken the IC engine piston example (mech_iceng_vis), eliminated gravity, actuated the joint, and am trying to use the translational hard stop block to enforce stroke limits. Because I can only have one actuated input per joint, I've used one actuated joint and one joint to enforce the stroke limits. However, it's not working; instead, when the contact occurs, the system goes wildly unstable and the solver eventually fails:
I'm wondering:
  1. How should I handle actuated joints that have limits? Is this the proper approach?
  2. I've been using SimMechanics 1G because it seems more apparent, I'm using 2012b, and the more useful examples I found were in 1G. Is there any significant advantage of going to 2G?
  3. Are there any good relevant examples? I found many similar ones (e.g. ex 1, ex 2 ), a few that had bad links, but none that included blocks with desired force inputs.

Accepted Answer

Sebastian Castro
Sebastian Castro on 18 Jun 2015
Edited: Sebastian Castro on 18 Jun 2015
Using the Translational Hard Stop block is the proper approach. However, I'd make sure to check the following things about that:
  1. Are you using the Prismatic-Translational Interface block to connect the hard stop to your joint?
  2. Have you tried reducing the stiffness and damping parameters of the hard stop block to see if that removes the instability.
  3. What are your solver settings like? Maybe the time-step or tolerances (depends on what you have set) are too large for the system dynamics.
Also, regarding your 1G vs 2G question: It depends on what kind of functionality you want. 2G came out in R2012a, so R2012b is only the second release and therefore you'd be missing out on a few things that you could do with 1G. For R2012b, 1G will contain more modeling features but the 2G animation/visualization is a lot nicer in my opinion. So, if you can, I'd go for 2G.
In the latest release (R2015a), the only thing that 1G can do but 2G can't is variable mass/inertia on bodies.
- Sebastian
  2 Comments
Hannes Daepp
Hannes Daepp on 18 Jun 2015
Hi Sebastian -- thanks for your response. I am using the translational interface.
I was able to get a better response by lower damping/stiffness and increasing the time step to 1e-3 (fixed time step, since my end goal is to use this model with a discrete controller that I've previously connected to a system with a fixed time step):
I am still unsure if my approach is the best way to configure the limits with an actuated joint (by basically using two joints, one for actuation and one for limits, connected to the same bodies) -- it seems overly complicated (though it appears to work now, following your suggested changes). Here's a screenshot of my model, which I've attached (I guess it didn't upload the first time). If there's anything in my approach that seems significantly misguided, I'd appreciate any comments you might have.
Thanks,
Hannes
Sebastian Castro
Sebastian Castro on 18 Jun 2015
Edited: Sebastian Castro on 18 Jun 2015
That will work, but you're right... it's not ideal to have 2 joints. You can't use one joint because you can only have 1 joint actuator in each block, right?
One thing you can do is right-click the interface block and select "Mask -> Look Under Mask". You can copy the blocks inside there and add your forcing function to the Joint Actuator signal inside there.
Another possibility is to add an "Ideal Force Source" Simscape block in parallel with your hard stop, and incorporate your forcing function in that way.
Do either of these work?
- Sebastian

Sign in to comment.

More Answers (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!