Constraints for double pendulum in SimScape

3 次查看(过去 30 天)
Hello,
I have a problem that a double pendulum represents quite well. I want to have constraints such that the angle (relative to the frame) of the first body is a function of the angle of the second body (relative to the first body). That would mean if I rotated the second body by applying a torque the first body would rotate by this user defined constraint. Is there a possibility to define such constraint ? Thank you for the answers.
  2 个评论
Lorenzo
Lorenzo 2023-5-19
Hello Ondrej,
Not quite sure if this is what you need but you can "actuate" a revolute joint (which would be the joint used in your double pendulum example), by giving it an input-angle (the resulting torque will be computed automatically).
In turn the angle might be measured from another joint by using the "Sensing" field.
Does this answer your question?
Best,
Lorenzo
Ondrej Zoufaly
Ondrej Zoufaly 2023-5-19
Yes I used sensing position from the joint of the second body as motion input to the first body. There was a warning because of Algebraic loop, but Matlab has some algebraic loop solvers so it worked. Nevertheless I used Algebraic Constraint to build my angle constraint (I can use scope to see if the input into the Algebraic constraint is near 0 to check that my constraint is fulfilled). It works so far so I think I figured it out. Thank you for your answer.
Ondrej.

请先登录,再进行评论。

回答(0 个)

类别

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

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by