MATLAB Answers


Second Generation Sim Mechanics Motion Actuation

Asked by nicholas
on 8 Nov 2013
Latest activity Edited by John Kelly
on 26 Feb 2015

I'm trying to actuate a prismatic joint to follow a specific motion. I basically want the joint motion to be sinusoidal in the vertical direction. In the prismatic joint dialogue box, I've selected "Provided by Input" under the Actuation >> Motion drop-down menu. Then I have a sine source going through a 3-input Mux (for position, velocity, and acceleration) through a Simulink-PS converter to the Prismatic Joint input. This arrangement isn't working, and I've tried several other arrangements that have failed. I'm sure there is a way to do it, but I haven't had any luck. Any advice would be greatly appreciated.

Again, I'm using the second generation of sim mechanics.


3 Answers

Answer by Guy Rouleau
on 9 Nov 2013
Edited by John Kelly
on 26 Feb 2015

Sicne you don't provide the error, it is difficult to diagnose... The "Joint Actuation" doc page explains what you need to actuate a joint in motion:


Answer by ts
on 13 Nov 2013
Edited by ts
on 13 Nov 2013

Also, here are two things for you to check:

  • Have you set the filtering mode of the Simulink-PS Converter block to Specify input derivative(s)? The block should expose a total of three physical signal input ports for the position, velocity, and acceleration signals. You specify the filtering mode in the Input Handling tab of the block dialog box.
  • Have you set Actuation > Force/Torque to Automatically Computed in an equal number of degrees of freedom as that being motion-actuated? You don't have to do this in the same joint primitive or even in the same joint block — but, in a given mechanism, the two numbers should match.

For each 1-DoF joint primitive that you motion-actuate, you should set a 1-DoF primitive to have its actuation force or torque automatically computed. If the number of degrees of freedom being motion-actuated exceeds the number being force- or torque-actuated, SimMechanics throws an error message that starts like this:

In the dynamically coupled component containing Prismatic Joint Prismatic_Joint1, there are fewer joint primitive degrees of freedom with automatically computed force or torque (0) than with motion from inputs (1).

The difference between the two numbers tells you how many degrees of freedom to change. In the message above, that number is one. In the (admittedly unlikely) event that your model has only one joint block, you might change Actuation > Force parameter in the one Prismatic Primitive to "Automatically Computed".


Answer by Guy Rouleau
on 14 Nov 2013

I just published this post today... this should help:


Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi test

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

MATLAB Academy

New to MATLAB?

Learn MATLAB today!