Numerical instability of spherical pendulum

Hi,
I am trying to simulate a spherical pendulum. The equation of motion of the spherical pendulum are:
So far, I was able to simulate the equation of motion with a ode45 solver. However I experiencing numerical instabilities when the phi angle approach zero.
Does any one have an idea to get rid off these numerical instabilities?
Thank you in advance,
Bas

 採用された回答

Mischa Kim
Mischa Kim 2015 年 2 月 25 日

0 投票

Bas, the plus sign in your equation does look a bit strange. Shouldn't that be a minus instead?

8 件のコメント

Bas Siebers
Bas Siebers 2015 年 2 月 26 日
Yes that needs to be a minus sign
Mischa Kim
Mischa Kim 2015 年 2 月 26 日
Did the sign change take care of the instability issue?
Bas Siebers
Bas Siebers 2015 年 2 月 26 日
No, I still have the same problem.
Mischa Kim
Mischa Kim 2015 年 2 月 26 日
Can you attach the code?
Bas Siebers
Bas Siebers 2015 年 2 月 26 日
I have attached two files:
- the function 'odefun'
- the program
I get numerical instabilities when I give initial_dot_theta a value that isn't equal to zero
Mischa Kim
Mischa Kim 2015 年 2 月 26 日
Without having gone through your code in detail, I believe you are good to go. I have created the plot below from your code.
  1. The azimuth is growing out of bounds and that's to be expected (conservation of angular momentum). The pendulum is simply rotating about the z-axis. Consecutive rotations do not start from zero but continue at 360, 720, etc. So this has nothing to do with an unstable behavior of any kind.
  2. Another thing to be expected is that the elevation does not cross zero for non-zero angular momentum (about the z-axis), also due to conservation of angular momentum. Nice to see in the plot, when elevation decreases the azimuth rate is higher.
Hope this helps.
Bas Siebers
Bas Siebers 2015 年 2 月 26 日
編集済み: Bas Siebers 2015 年 2 月 26 日
Thank you, I have still one question: Why is the line of the azimuth angle not straight? With other words, why is the velocity of the azimuth angle not constant? Because the initial value of the azimuth angle velocity is constant.
Mischa Kim
Mischa Kim 2015 年 2 月 26 日
Angular momentum is conserved (constant), not azimuth rate. The equation for the angular momentum is
m*l^2*sin(phi)^2*thetadot = const.
Therefore, when phi decreases, thetadot increases, just like described above.

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

その他の回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeProgramming についてさらに検索

製品

質問済み:

2015 年 2 月 25 日

コメント済み:

2015 年 2 月 26 日

Community Treasure Hunt

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

Start Hunting!

Translated by