ut-issl / s2e-core

Spacecraft Simulation Environment Core codes
MIT License
46 stars 18 forks source link

Add flexible structure model #639

Closed TomokiMochizuki closed 3 months ago

TomokiMochizuki commented 4 months ago

Related issues

17

Description

This PR aims to add a flexible structure model, i.e. flexible boom or flexible SAP.

image

For the modelling of the flexible structure model, this PR suggests to use a relatively simple dynamics model proposed in the research conductec by Iwata et al. https://ntrs.nasa.gov/citations/20080012649

(I_b + I_p)\ddot{\psi}_b + I_p \ddot{\psi}_d = T_c \tag{1}
I_p(\ddot{\psi}_b + \ddot{\psi}_d) + c_p\dot{\psi}_d + k_p\psi_d = 0 \tag{2}

Equations (1) and (2) approximate the following terms as microterms.

\dot{\psi}_b \times \{ (I_b + I_p) \dot{\psi}_b\},\,
\textrm{Angular momentum}
\tag{3}

When considering the term written in (3), the Equation (1) can be rewritten as :

(I_b + I_p)\ddot{\psi}_b + I_p \ddot{\psi}_d  + \dot{\psi}_b \times \{(I_b + I_p)\dot{\psi}_b\} + (\textrm{Angular momentum})= T_c \tag{4}

Therefore, combination of Equations (2) and (4) helps construct the spacecraft dynamics model with a flexible structure.

Variables

$I_b$: Inertia moment of spacecraft structure (without flexible structure) $I_p$: Inertia moment of a flexible structure of the spacecraft $\psi_b$: Attitude angle of the spacecraft based on the inertia frame $\psi_d$: Bending angle of the flexible structure $T_c$: Torque affecting spacecraft $c_p$: Dumping coefficient of the flexible structure $k_p$: String constant of the flexible structure

Test results

where the torque is set to the following values: image

Comparison between matlab simulation and S2E simulation: image

Even after changing the calculation method (using libra::numerical_integrator library), the outcome looks like the same. image

Verification results of the comment (https://github.com/ut-issl/s2e-core/pull/639#discussion_r1625337983)

Impact

Describe the scope of influence of the changes, e.g., The behavior of feature ** changes.

Supplementary information

Provide any supplementary information.

suzuki-toshihir0 commented 4 months ago

@TomokiMochizuki ミーティングの調整はお願いします 🙏 ミーティングの前に今実装しようとしている内容の整理はしておきたいので、PR descriptionは丁寧に書いてもらえると嬉しいです。

TomokiMochizuki commented 4 months ago

@TomokiMochizuki ミーティングの調整はお願いします 🙏 ミーティングの前に今実装しようとしている内容の整理はしておきたいので、PR descriptionは丁寧に書いてもらえると嬉しいです。

了解です。 今週は予定があるので、来週以降で調整しますが、日程調整はしばしお待ち下さい。 (また、日程調整はSlackにてさせていただきます。)

TomokiMochizuki commented 4 months ago

ミーティングの結果、Attitudeフォルダに柔軟構造モデルが追加された姿勢伝搬クラスを新たに作る方向になった。

TomokiMochizuki commented 4 months ago

ミーティングの結果、Attitudeフォルダに柔軟構造モデルが追加された姿勢伝搬クラスを新たに作る方向になった。

@200km @suzuki-toshihir0 新しいcpp/hppファイルの名前ですが、attitude_flexible_structure_vibration.cpp/hppでいかがでしょう?

suzuki-toshihir0 commented 4 months ago

flexible_structure だと例えば「膜面の柔軟構造は含むのか?」とか「高次の振動は含むのか?」とかがあってまだ名前が広く、そこがMTG中で問題になっていたのだと理解しています。 「バネマスダンパ系で近似された1次元ブーム」が本質で、そこを(なるべく短く)表現した命名がいいと思います(モデルに名前がついていない以上、性質で命名せざるを得ないですがそれは仕方ないかなと)。

TomokiMochizuki commented 4 months ago

flexible_structure だと例えば「膜面の柔軟構造は含むのか?」とか「高次の振動は含むのか?」とかがあってまだ名前が広く、そこがMTG中で問題になっていたのだと理解しています。 「バネマスダンパ系で近似された1次元ブーム」が本質で、そこを(なるべく短く)表現した命名がいいと思います(モデルに名前がついていない以上、性質で命名せざるを得ないですがそれは仕方ないかなと)。

確かにそうですね。 attitude_ one_dimensional_vibration.cpp/hpp とかですかね?

これ以上短くする手法があまり思いつかなかったです。

suzuki-toshihir0 commented 4 months ago

正直僕も現状あまり良い命名は思いついてないです(すみません)

そのあたりを踏まえて、今の自分なら attitude_with_cantilever_vibration_model とかで妥協する気がします。modelとかvibrationとかは長さに応じて削ってもいいかなと

TomokiMochizuki commented 4 months ago

正直僕も現状あまり良い命名は思いついてないです(すみません)

  • one_dimensional だと、何が一次元なのかが不明瞭になってしまうと思っています。モデルは1次元梁ですが、振動方向は2方向あるので......
  • 片持ち梁は cantilever なので、このへんを使うと良さそう( beam は "光線" と混同しやすいし、どういう支え方の梁になっているかも不明だな、と思ってました)
  • バネマスダンパ系は略すと SMD model ですが、S2Eの略語使用ポリシーには引っかかりそうですね。第一「どういう手法でモデル化しているか」で命名するのは性質を列挙しただけで命名といいがたいため、(言っておいてなんなんですが)やめたほうが良い気がしてきました。

そのあたりを踏まえて、今の自分なら attitude_with_cantilever_vibration_model とかで妥協する気がします。modelとかvibrationとかは長さに応じて削ってもいいかなと

とりあえずattitude_with_cantilever_vibrationで実装してみます (modelは要らない気がするので)

TomokiMochizuki commented 4 months ago

415, #483 のPRにあるnumerical integrationをどのように導入するかわからなかったため、とりあえずRK4のアルゴリズムを実装してみました。

TomokiMochizuki commented 4 months ago

@200km @suzuki-toshihir0 レビューお願いします!

TomokiMochizuki commented 4 months ago

細かい改修点以外はひとまずは問題ないのではないかな、と思っています。 伝搬法もいったんはRK4で良いと思っています(高度化はこの後別でやっていく、でよいと考えています) もし五十里先生からもコメントがあればいただければと思います。

@suzuki-toshihir0 こちらコメントをもとに修正しましたので確認お願いします。

200km commented 4 months ago

私もちゃんとレビューしたいので、マージはまだしないでください。

TomokiMochizuki commented 3 months ago

私もちゃんとレビューしたいので、マージはまだしないでください。

@200km お時間があるときでいいので、こちらのPRをレビュー頂きたいです。 MatlabとS2Eのシミュレーションの挙動が一致しているので、特に問題はないと思っています。

TomokiMochizuki commented 3 months ago

@200km こちらのレビューをお願いできないでしょうか?

200km commented 3 months ago

遅くなりすみません。忙しいのが落ち着いたのでレビュー開始します。

TomokiMochizuki commented 3 months ago

この件ですが、複数の初期条件でシミュレーションを回し、問題なく動作することが確認されたので動作検証結果を簡単に記載しておきました。