Revolute Joint measure angle / normalize
조회 수: 5 (최근 30일)
이전 댓글 표시
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".
댓글 수: 0
답변 (1개)
Steve Miller
2021년 10월 28일
Hi Tobias,
I believe there is a solution using the mod block. See screenshot below and attached model.
--Steve
댓글 수: 0
참고 항목
카테고리
Help Center 및 File Exchange에서 Assembly에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!