필터 지우기
필터 지우기

algebraic loop warning despite using algebraic constraint block

조회 수: 2 (최근 30일)
Joshua
Joshua 2016년 8월 9일
댓글: Robert 2016년 8월 10일
I have a model that unfortunately has an algebraic equation, which would like to an algebraic constraint. I don't really want to add an artificial transfer function since it reduces the simulation speed. I also have tricky issues with initial conditions, etc.
I tried using an algebraic constraint block, but the warning persists. In desperation, I copied the model from the Matlab documentation http://www.mathworks.com/help/simulink/slref/algebraicconstraint.html to see any example working.
To my surprise, I still get a warning. I am using Matlab R2014b. Does anyone have insight why the system is still giving me a warning?
Many thanks, Josh

답변 (1개)

Robert
Robert 2016년 8월 9일
That warning is simply telling you that you have an algebraic loop. I imagine that algebraic loops are created more often by accident than on purpose. It sounds like you know what you are doing and have put the algebraic loop there on purpose. You can silence the warning with
set_param(myModel,'AlgebraicLoopMsg','none') % or 'warning' or 'error'
  댓글 수: 2
Joshua
Joshua 2016년 8월 9일
In the original model, perhaps, I would tolerate an algebraic loop, but the run time can be higher and unstable. In any case, my question is that the algebraic constraint block is supposed to eliminate the algebraic loop and solve it correctly/efficiently. Unfortunately, this is not the case, even when using Matlab's example.
Robert
Robert 2016년 8월 10일
By my understanding, the Algebraic Constraint block does not (and is not supposed to) eliminate algebraic loops. Instead, it exists to help the algebraic loop solver to converge more quickly on a solution in the case of a real, intentional algebraic loop.
Admittedly, this is a bit confused by the documentation's arrangement, in which the brief discussion of the Algebraic Constraint block appears in the Remove Algebraic Loops section; however, the content does not relate to removing algebraic loops but offers the Algebraic Constraint block as an alternative to removing the loop, "when you think the loop is legitimate."

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Loops and Conditional Statements에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by