Why does XY Graph affect algebraic loop solver?
显示 更早的评论
I have a model involving an algebraic loop that mysteriously refuses to solve ONLY when an XY Graph is attached. I don't think the model's exact purpose is important, but you can read more about it here. I'm using Matlab & Simulink 2011a. The observations I think are important are:
- This model works fine as-is
- When you change Constant1 from 4.8 to 5, the model will no longer solve -- you'll get the error message "Algebraic state in algebraic loop containing 'algebraicscope/Sum1' computed at time 0.0 is Inf or NaN"
- When you then delete the XY Graph block from the model (and leave Constant1 as 5), the model will again solve just fine (the normal scope can be used to verify results; there should be a constant line of value 0 and a constant line of value 4)
It is the simple presence of the XY Graph that prevents Simulink from solving the model under certain conditions! As a beginner in Simulink, it is extremely disturbing to me that the presence of a read-only debugging tool can affect the solution of a model. Am I thinking about something wrong, or is this actually a bug?
This is a graphic of the model in question:

采纳的回答
更多回答(1 个)
Azzi Abdelmalek
2013-1-8
编辑:Azzi Abdelmalek
2013-1-8
0 个投票
Ben, In the previous question http://www.mathworks.com/matlabcentral/answers/58271-why-does-algebraic-loop-not-solve I've simulated the model without XY graph, it works, then added an XY graph, it works again. I've also simulated the second model which did'nt work for reasons that I ignore, but have nothing to do with xy graph
6 个评论
Ben
2013-1-8
Azzi Abdelmalek
2013-1-9
编辑:Azzi Abdelmalek
2013-1-9
2011b, this file did'nt work
Ben
2013-1-9
Azzi Abdelmalek
2013-1-9
编辑:Azzi Abdelmalek
2013-1-9
Ben, in fact there is just one thing that allows: it works or it does'nt work, If the algebraic loop has solution it works, otherwise it does'nt. In your example when you add xy-graph it don't work, replace this xy graph with any display block(scope, to workspace,...), because there is no solution to display, simulink shows error, when you remove those display blocks, the simulation does'nt work, and because you are not asking for displaying result, simulink does not show errors. In fact it's not an error, it's just that the solution is [], which can't be displayed.
Ben
2013-1-10
Azzi Abdelmalek
2013-1-10
编辑:Azzi Abdelmalek
2013-1-10
Replace your xy-graph with scopes, you will have the same message. I know that with viewers scope it works.
类别
在 帮助中心 和 File Exchange 中查找有关 General Applications 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


