Why does XY Graph affect algebraic loop solver?
Mostra commenti meno recenti
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:

Risposta accettata
Più risposte (1)
Azzi Abdelmalek
il 8 Gen 2013
Modificato: Azzi Abdelmalek
il 8 Gen 2013
0 voti
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 Commenti
Ben
il 8 Gen 2013
Azzi Abdelmalek
il 9 Gen 2013
Modificato: Azzi Abdelmalek
il 9 Gen 2013
2011b, this file did'nt work
Ben
il 9 Gen 2013
Azzi Abdelmalek
il 9 Gen 2013
Modificato: Azzi Abdelmalek
il 9 Gen 2013
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
il 10 Gen 2013
Azzi Abdelmalek
il 10 Gen 2013
Modificato: Azzi Abdelmalek
il 10 Gen 2013
Replace your xy-graph with scopes, you will have the same message. I know that with viewers scope it works.
Categorie
Scopri di più su General Applications in Centro assistenza e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!


