Warning about discontinuous signal feeding continuous states, while there are no continuous states?

38 visualizzazioni (ultimi 30 giorni)
Hi,
here is the situation: I have one model A that references another model B. Within model A, I connect one of B's outputs back to its input.
Therefore, I have created an Algebraic Loop within model A. I would prefer not to do this and keep it local to B, but ALs are not supported in Model Referencing.
The AL is intentional and it all works (more or less!, but that is on me) like intended.
When I compile (CTRL+D) model B alone, it gives 0 warnings. All of its input as well as output ports have sample time -1, inherited.
When I compile model A, that barely does more than contain the Algebraic Constraint in the feedback path from one of B's outputs back to one of its inputs, I get a warning:
Warning: The model block '/model B/XYZ' is outputting a signal that has discontinuities and is feeding a block with continuous states.
This happens multiple times. Of course, if I compile model A without model B in it, again, no warnings.
There is nothing continuous about this simulation. In fact, the solver is set to Auto and its picks VariableStepDiscrete itself. The simulation is discrete.
It does have discontinuities, the warning is right about that (Saturation/Switches).
When I run sldiagnostics() on either model, it returns zero states. There are no states at all, neither discrete nor continuous.
I really do not get what this warning is trying to tell me. Putting "outputting a signal that has discontinuities and is feeding a block with continuous states" (with quotation marks!) into Google returns absolutely nothing useful at all. No-one ever, ever had this?
The warning is telling me about continuity that is not there, and about states that are not there.
I am at a loss. Thanks!

Risposte (1)

Archit Dhanani
Archit Dhanani il 23 Lug 2019
Hi Alexander,
Since I have not looked at the model, I cannot be sure. But the reason, the diagnostic is issued, is the Simulink Engine detects extraneous discrete signals at the input port of the model reference block. You can control this diagnostic using the model parameter: Extraneous discrete derivative signals
-Archit

Categorie

Scopri di più su Component-Based Modeling in Help Center e File Exchange

Prodotti


Release

R2018a

Community Treasure Hunt

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

Start Hunting!

Translated by