Algebraic loop error, how to solve?

24 次查看(过去 30 天)
The Simulink simulation I am running produces an algebraic loop error because of this part of the scheme:
A delay block just after the port DELTA_U(k) actually solves the problem, however I cannot use this solution because such a block introduces some strange dynamics in the system and it does not work as it should.
How can I solve this problem in an alternative way?
Note: I don't know if this information is relevant, but such an error appears only in one particular condition. I am given 10 different set of parameters for the system: by running the simulation with each of them, only a warning about the algebraic loop is produced, and in 9 cases the system works perfectly fine anyway. The simulation stops with an error only when using one of these sets.
  2 个评论
Sulaymon Eshkabilov
Please share the prompted error message here
Ale_798
Ale_798 2023-9-18
Simulink cannot solve the algebraic loop containing '...' at time 5.0 using the TrustRegion-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, follow either of the suggested actions. If the error persists in spite of the following changes, then the model is likely ill-defined and requires modification.
Suggested Actions:
• Switch to auto algebraic loop solver algorithm using set_param('...','AlgebraicLoopSolver','Auto') - Fix
• Reduce the Fixed-step size of the solver. - Open

请先登录,再进行评论。

采纳的回答

Fangjun Jiang
Fangjun Jiang 2023-9-18
There is no algebraic loop here. Giving what ever value to DELTA_U(k), "f" can be calculated without problem.
If you feed the output of the "Interpreted MATLAB Fcn" to DELTA_U(k), then it is an algebraic loop.
  3 个评论
Fangjun Jiang
Fangjun Jiang 2023-9-18
It depends on the content of the "Interpreted MATLAB Fcn", or the problem (equation) that you intend to solve. Most likely, the Simulink model is incorrectly constructed for that equation.
Ale_798
Ale_798 2023-9-18
Sorry, I misunderstood your previous answer.
"If you feed the output of the "Interpreted MATLAB Fcn" to DELTA_U(k), then it is an algebraic loop."
This is the problem! It took me a while to spot it among all my subsystems, but at some point DELTA_U(k) becomes function of the output of the "Interpreted MATLAB Fcn".
Now at least I know where I have to investigate to solve the problem.
Thank you!

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 General Applications 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by