Filter löschen
Filter löschen

Constraints for double pendulum in SimScape

3 Ansichten (letzte 30 Tage)
Ondrej Zoufaly
Ondrej Zoufaly am 16 Mai 2023
Kommentiert: Ondrej Zoufaly am 19 Mai 2023
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 Kommentare
Lorenzo
Lorenzo am 19 Mai 2023
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 am 19 Mai 2023
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.

Melden Sie sich an, um zu kommentieren.

Antworten (0)

Produkte


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by