シミュレーション中に​パラメータを時間変化​させる方法はあります​か?

14 visualizaciones (últimos 30 días)
和希
和希 el 29 de Jun. de 2023
Comentada: 和希 el 4 de Jul. de 2023
Simulinkで伝達関数G(s)=K/(T1*s+1)の係数を変化させ応答の変化を調べたいと思っています。sはラプラス変数、K、T1が係数です。今回はT1だけをシミュレーション中に変化させたいです。具体的にはシミュレーション時間が100秒ではT1の値を1から10へ線形的に変化させたいです。何か方法はありますか?

Respuesta aceptada

Toshinobu Shintai
Toshinobu Shintai el 4 de Jul. de 2023
Editada: Toshinobu Shintai el 4 de Jul. de 2023
デバッグタブで停止したい時間を指定し、モデルを実行します。
モデルを実行すると、100秒で一時停止します。この時にパラメーターを変更し(例えばワークスペースに置かれているT1変数の値を1から10に書き換える)、以下のコマンドをコマンドウィンドウで実行します。
set_param(model_name, 'SimulationCommand', 'update')
model_nameは、実行したモデルファイルの名前です。
次に、再度実行ボタンをクリックします。
これにより、変更されたパラメーターが反映された状態で、残りのシミュレーション時間分を実行します。
  1 comentario
和希
和希 el 4 de Jul. de 2023
回答ありがとうございます。教えて頂いたことを試してみたいと思います。

Iniciar sesión para comentar.

Más respuestas (0)

Categorías

Más información sobre 一般分野への適用 en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2023a

Community Treasure Hunt

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

Start Hunting!