Vector input in Simscape Revolute Joint

I am working with the "Revolute Joint" in Simscape multibody. Is it possible to give a vector from workspace as input for Position Target? My end aim is to view the angles in the vector below as a transition over time
vals = [90.0000, 91.4324, 92.7370];
I know that Position Target takes only scalar values but is there a workaround?
--MY SOULTION--
Currently I am giving one element after another from the vector and updating the whole diagram at every step.
Thanks in advance

Answers (1)

J Chen
J Chen on 29 Aug 2019
You can specify the motion of the joint: expand the Actuation, set Torque to Automically Computed and Motion to Provided by Input. You probably need a Simulink-PS Converter block and do the following: in the Input Handling tab, set Filtering to Filter input, set Input filtering order to Second-order filtering.

4 Comments

I tried the above.
Added a From Workspace, connected it to the Simulink-PS Converter and followed your steps. The problem is I only need about 3 degree change from the initial position of my link (90 to 93 degrees in increments, which I have as a vector in workspace).
We are calculating torque using the above method which is too high and the link swings all over the place.
Please let me know if this is solvable.
Thanks
J Chen
J Chen on 29 Aug 2019
Edited: J Chen on 29 Aug 2019
The attached file shows an example. Slowly change the position to reduce required torque. Damping can be added in the Internal Mechanics of the Revolute Joint block.
Thank you very much for the reply but I use Matlab 2017b. Can you sent it as a previous version file. (File -> export model to -> previous version file)
Model in R2017b is attached.

Sign in to comment.

Asked:

on 28 Aug 2019

Commented:

on 3 Sep 2019

Community Treasure Hunt

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

Start Hunting!