における状態 '1' の導関数が有限ではありません

simulinkにおいて以下のシュミレーションをおこなったのですが,「ブロック 'do/Quadrotor Dynamics F1/Integrator' の時間0.02 における状態 '1' の導関数が有限ではありません。シ ミュレーションを停止します。解に特異点が存在する可能性があります。そうでない場合は、(固定ステップ サイズを小さくする、または許容誤差を厳しくすることによって) ステップ サイズを減らしてみてください」というエラーが出ました.サンプル時間を短くしても同じようなエラーが出ました.何かいい方法はないでしょうか?
''go.m'を実行することで動作します.simulinkモデルは'do.slx'です.
他のmファイルはパラメータの設定の為のものなので,基本は関係ないと思われます.
どうぞよろしくお願いいたします.

Risposte (1)

covao
covao il 19 Mar 2023

0 voti

モデルにより対策方法は様々ですが、ステップ サイズや許容誤差を変更する他、ソルバーの種類をode15s,ode23sなどStiffなソルバーに変えてトライしてみる方法が考えられます。
類似するエラーの回答例があります。
unzip('https://jp.mathworks.com/matlabcentral/answers/uploaded_files/1296895/file.zip');
cd('./file');
open_system('do.slx');
%set_param(bdroot,'Solver', 'ode23s'); %Try changing stiff solver
go;
e{x}離散時間系モデル伝達関数 sys_M_x = 4.997e-07 z + 4.993e-07 ----------------------- z^2 - 1.998 z + 0.998 Sample time: 0.01 seconds Discrete-time transfer function. e{x}離散時間系モデル伝達関数 sys_M_y = 4.997e-07 z + 4.993e-07 ----------------------- z^2 - 1.998 z + 0.998 Sample time: 0.01 seconds Discrete-time transfer function. e{z}離散時間系モデル伝達関数 sys_M_z = 4.997e-07 z + 4.993e-07 ----------------------- z^2 - 1.998 z + 0.998 Sample time: 0.01 seconds Discrete-time transfer function. e{roll}離散時間系モデル伝達関数 sys_M_r = 0.0001974 z + 0.0001947 ----------------------- z^2 - 1.96 z + 0.9608 Sample time: 0.01 seconds Discrete-time transfer function. e{pitch}離散時間系モデル伝達関数 sys_M = 0.0001974 z + 0.0001947 ----------------------- z^2 - 1.96 z + 0.9608 Sample time: 0.01 seconds Discrete-time transfer function. e{yaw}離散時間系モデル伝達関数 sys_M = 0.2642 z + 0.1353 ----------------------- z^2 - 0.7358 z + 0.1353 Sample time: 0.01 seconds Discrete-time transfer function.
Error using go
Derivative of state '1' in block 'do/Quadrotor Dynamics F1/Integrator' at time 0.02 is not finite. The simulation will be stopped. There may be a singularity in the solution. If not, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)

Prodotti

Release

R2022a

Richiesto:

il 15 Feb 2023

Risposto:

il 19 Mar 2023

Community Treasure Hunt

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

Start Hunting!