My simscape model will not run.
조회 수: 4 (최근 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!