How can I put a signal (angle) on a joint actuator

5 views (last 30 days)
I'm trying to connect a input signal to a body in simmechanics. The input includes two variables synchronized with a clock. The output of this signal is in rad, to tranfer this to a angle I used a gain block 360/2PI. I plotted this with matlab, and the signal is correct.
Now I want to put this input on a body, I toke a joint actuator and an revolute block. See picture below. When i try to run the simulation I get the error showing in the picture.
I understand that the signal needs to have the same dimension as the joint actuator. I get what simulink wants, but I got no clue how to fix this.
Does somebody knows what to do???

Accepted Answer

Guy Rouleau
Guy Rouleau on 30 Oct 2013

More Answers (2)

Zack Peters
Zack Peters on 29 Oct 2013
Hi Bastiaan,
I believe that the Joint Sensor block is expecting an input signal with a width of 3, which translates to angle/angular velocity/angular acceleration.
If you open up the dialog for the Joint Actuator block you can specify whether to actuate via motion (position/velocity/acceleration) or via Generalized Forces. Also, within the dialog parameters you are able to specify the units (i.e. rads or degrees). Here is more information about the Joint Actuator block.
If you have a desired position trajectory it can be difficult to come up with three signals. You can differentiate the position signal using Simulink's Derivative block, but that signal can be unstable. A better approach is to develop a higher derivative signal (i.e. angular acceleration) and integrate to come up with velocity/position. Another alternative is to put a derivative filter on the signal. Here is more information about applying motions in SimMechanics.
Finall, you can create a signal with a width of 3 using the Mux block.
~Zack

Bastiaan
Bastiaan on 30 Oct 2013
Thank you for your help Zack. I fixed the problem, and now my model is working correctly

Categories

Find more on Applications in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!