How to use measured variables in simscape multibody

6 ビュー (過去 30 日間)
Federico Barison
Federico Barison 2024 年 5 月 6 日
コメント済み: Federico Barison 2024 年 7 月 22 日
I'm trying to create a multibody model of the compensated arm i designed (see picture attached) to optimize its geometry.
I have some problems identifying a way to determine the cable end where the spring must be attached.
To do so i want to impose the cable length constant and so i'm measuring the wrap angles of spool and pulley, as you can see in the slx attached. The problem is that i have to run the program first with the subsystem commented out to create the variables 'WA_spool1' and 'WA_perno1', and then i can generate the two rigid transforms in the subsystem and measure the section's length.
Is it possible to use those variables in real time inside the simscape program? Do you know any other way i can model this spring-cable assembly in simscape multibody?

採用された回答

Himanshu
Himanshu 2024 年 7 月 19 日
Hey Federico,
To solve this problem, you can use Simulink to create a feedback loop that updates the wrap angles in real-time, eliminating the need to run the program twice. One approach is to use a MATLAB Function block or an S-Function to dynamically calculate the wrap angles and update the rigid transforms within the same simulation step. Here's the documentation for the same:
Alternatively, you can explore Simscape's built-in capabilities to model cable-spring assemblies more accurately by using specialized blocks that maintain cable length and automatically adjust the spring attachment point based on the current system configuration. The following documentation may be helpful:
Hope this helps!
  1 件のコメント
Federico Barison
Federico Barison 2024 年 7 月 22 日
thanks for your response
The second suggestion you gave me seems exactly what i was looking for in first instance.
In the attached documentation they talk about defining state tagets in joints connected to the cable system in order to "use those targets to set the length of the cord and to guide the placement of its ends".
But i couldn't find any more detailed information or practical example on how to achieve these objectives, do you have any other suggestion to try to understand how this works?

サインインしてコメントする。

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeSimscape Multibody についてさらに検索

製品


リリース

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by