Revolute Joint measure angle / normalize

5 ビュー (過去 30 日間)
Tobias Schindler
Tobias Schindler 2019 年 3 月 27 日
回答済み: Steve Miller 2021 年 10 月 28 日
The angle of the revolute joint in the inverted pendulum on a chart example (using the sensing option of the revolute joint) is either 0-> -infinity or 0 -> infinity depending on the rotational direction (cw, ccw).
I want to measure the angle in an normalized way so that the position of the pendulum with respect to a world frame (e. g. as an angle from 0->2*pi or from -pi->pi). Standard procedures such as using mod(2*pi) do not work since the revolute joint angles of the sensing port are not unique.
Using the transform sensor did not yield a solution, because i was only able to get the angle between the frame and some reference frame which also has non unique representations for different positions of the pendulum (e.g. the "absolute position" as seen in the mechanics explorer pi/4 and 3/2 pi are encoded as the same measurement values of the transfor sensor [pi/4] due to only measureing the difference.
tl;dr: How to measure the angle between the pendulum and the chart in a normalized way which is independend of rotational direction in the Simulink example "control of an inverted pendulum on a chart".

回答 (1 件)

Steve Miller
Steve Miller 2021 年 10 月 28 日
Hi Tobias,
I believe there is a solution using the mod block. See screenshot below and attached model.
--Steve

カテゴリ

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

製品


リリース

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by