How to change the rigid transform parameters between two frames during simulation in MultiBody Simscape?

Hi, is there any way how to change the rigid transform parameters between two frames during simulation in MultiBody Simscape? Ideally, I would need a rigid transform block containing a signal input to change the translational offset. I tried to set the offset as a parameter but I couldn't figure out how to update it during simulation, let's say using an S-function. Or is there any other trick I could use? Thank you!

 Accepted Answer

To achieve what you are trying to do, you would need to add a joint. That would allow you to specify the distance between two points using a signal.
The detailed explanation:
To specify only the distance between the two points, you would need to use a joint with a prismatic primitive, and ensure that that primitive is always pointing between the two frames. If your mechanism will ensure that the z-axis of each frame will always be colinear and aligned, you can just use a Prismatic joint. However, if the motion of both frames is completely free, you will need to chain a few elements together.
This combination should work in a generic case. You may need put solids between the Joints to avoid a degenerate mass distribution.
Frame - Universal Joint - Prismatic Joint - Universal Joint - Frame
--Steve

2 Comments

I was looking to do something similar. I want to define a new frame but the problem is the new frame is defined based on 2 parameters that are recalculated every time step. Is there a way to input these values into a rigid transform or joint block?
Hi @George - if you define your new frame using a Rigid Transform block, the parameters will not update every time step. The parameters are evaluated before the simulation begins and will have the specified offset the entire time. For the offset between the frames to change in time, the new frame must be connected via a Joint to the original frame.
--Steve

Sign in to comment.

More Answers (0)

Categories

Community Treasure Hunt

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

Start Hunting!