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

6 次查看(过去 30 天)
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???

采纳的回答

Guy Rouleau
Guy Rouleau 2013-10-30

更多回答(2 个)

Zack Peters
Zack Peters 2013-10-29
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 2013-10-30
Thank you for your help Zack. I fixed the problem, and now my model is working correctly

类别

Help CenterFile Exchange 中查找有关 Applications 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by