Discover MakerZone

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

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

To resolve issues starting MATLAB on Mac OS X 10.10 (Yosemite) visit: http://www.mathworks.com/matlabcentral/answers/159016

Second Generation Sim Mechanics Motion Actuation

Asked by nicholas on 8 Nov 2013
Latest activity Answered by Guy Rouleau on 14 Nov 2013

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.

0 Comments

nicholas

3 Answers

Answer by Guy Rouleau on 9 Nov 2013

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:

http://www.mathworks.com/help/physmod/sm/ug/joint-actuation-1.html

0 Comments

Guy Rouleau
Answer by Tony on 13 Nov 2013
Edited by Tony 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".

0 Comments

Tony
Answer by Guy Rouleau on 14 Nov 2013

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

http://blogs.mathworks.com/seth/2013/11/13/motion-actuation-in-simmechanics-r2013b

0 Comments

Guy Rouleau

Contact us