My simscape model will not run.
5 ビュー (過去 30 日間)
古いコメントを表示
I have tried running a simscape model, but I got an error which states that An error occurred while running the simulation and the simulation was terminated Caused by: Simulink cannot solve the algebraic loop containing 'Motor/Solver Configuration1/EVAL_KEY/INPUT_6_1_1' at time 8.0E-5 using the LineSearch-based algorithm due to one of the following reasons: the model is ill-defined i.e., the system equations do not have a solution; or the nonlinear equation solver failed to converge due to numerical issues. To rule out solver convergence as the cause of this error, either a) switch to TrustRegion-based algorithm using set_param('Motor','AlgebraicLoopSolver','TrustRegion') b) reducing the ode45 solver RelTol parameter so that the solver takes smaller time steps. If the error persists in spite of the above changes, then the model is likely ill-defined and requires modification.
Image of Error
What I can I do to fix this error? Attached is my model I attempted to run.
0 件のコメント
回答 (1 件)
Sebastian Castro
2016 年 3 月 1 日
This can happen when you have an algebraic loop in Simulink. This happens when a block's output depends directly on its input, so Simulink cannot solve it step-by-step and has to iterate to solve. Sometimes this iterative solution can fail, which is what you're seeing.
In the context of Simscape, this happens when you are measuring a Simscape output, doing a direct calculation on it, and applying this value back as an input to Simscape.
If your algorithm is discretely sampled, you should add a Unit Delay before that measured "Stator Current" is fed to the controller -- this can represent a sensor delay. If it's a continuous algorithm, you can similarly break the algebraic loop by using a low-pass filter (Transfer Fcn block).
- Sebastian
0 件のコメント
参考
カテゴリ
Help Center および File Exchange で Troubleshooting についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!