MATLAB Answers

The Algebraic Constraint block works in my continuous model but not in my discrete, why?

조회 수: 5(최근 30일)
Kristin
Kristin 2015년 6월 23일
답변: Drew Davis 2015년 6월 24일
I have a Simulink model that uses a Algebraic Constraint block to calculate an important parameter for the rest of the model. I first built the model with continuous blocks and now I want to build the same model but with discrete blocks. It works perfect with continuous blocks but when I use the discrete model the block Algebraic Constraint does not work at all. The fault message I receive is:
Algebraic state in algebraic loop containing 'model/Subsystem Pump, variable parameters/Subsystem Flow, q2/Subsystem/Algebraic Constraint/Sum' computed at time 0.0013000000000000002 is Inf or NaN. There may be a singularity in the solution. If the model is correct, try reducing the step size (either by reducing the fixed step size or by tightening the error tolerances)
I have tried reducing the step size to ridiculously low values and nothing happens. My question is how can I solve this problem? And why does it work in the continuous model but not the discrete?

답변(1개)

Drew Davis
Drew Davis 2015년 6월 24일
When using the algebraic constraint block you are introducing an algebraic loop into your model. The Simulink algebraic loop solver has some limitations specifically the solver cannot solve loops that has blocks with discrete valued outputs. See the documentation for more info on algebraic loops.

Community Treasure Hunt

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

Start Hunting!

Translated by