How to simulate a spherical pendulum in matlab?

33 ビュー (過去 30 日間)
Bas Siebers
Bas Siebers 2015 年 2 月 10 日
コメント済み: Bas Siebers 2015 年 4 月 22 日
Hi,
I want to simulate a spherical pendulum in matlab. So far, I have found the equation of motion of the spherical pendulum:
But I haven't a clue how to simulate this. Any help whil be useful.
Kind regards, Bas

採用された回答

Roger Stafford
Roger Stafford 2015 年 2 月 11 日
編集済み: Roger Stafford 2015 年 2 月 11 日
Bas, you have a sign error in the gravity term. It should be:
-g*sin(phi)/L
Use one of matlab's 'ode' solvers to numerically solve these equations. Read about how to use them at:
http://www.mathworks.com/help/matlab/math/ordinary-differential-equations.html
Note that you would have numerical accuracy difficulty if the angle phi approaches near zero because of the division by sin(phi) in the first equation. At that point theta would change very rapidly. That is inherent in the physical situation as measured by the two angles.
  5 件のコメント
Roger Stafford
Roger Stafford 2015 年 2 月 26 日
Yes, there is a way. If you (carefully!) transform your coordinate system to cartesian coordinates, this problem should not occur. That will require three dependent variables, x, y, and z. A third equation will express the constraint that the distance from the support point is the value 'L'.
As I mentioned, the problem is caused by the nature of the definition of the two angles - when phi is near zero, a small motion can change theta by large amounts. That is an artificial difficulty.
Bas Siebers
Bas Siebers 2015 年 4 月 22 日
Hi Roger,
I started again with solving this problem. Do you known how to transform my coordinates to cartesian coordinates?

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

その他の回答 (1 件)

Youssef  Khmou
Youssef Khmou 2015 年 2 月 11 日
編集済み: Youssef Khmou 2015 年 2 月 11 日

カテゴリ

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

製品

Community Treasure Hunt

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

Start Hunting!

Translated by