The Algebraic Constraint block works in my continuous model but not in my discrete, why?
3 次查看(过去 30 天)
显示 更早的评论
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?
0 个评论
回答(1 个)
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.
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Gain Scheduling 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!