Prevent Algebraic Loop Errors in MATLAB Function, Chart, and Truth Table Blocks
You can use MATLAB Function, Chart, and Truth Table blocks in feedback loops in your model if you apply certain settings. You can also use these blocks with synchronous subsystems enabled by the State Control block. To prevent algebraic loop or synchronous semantic errors, apply these restrictions.
Use Moore charts to prevent an algebraic loop. In the Property Inspector,
set the State Machine Type to
Nondirect feedthrough semantics prevent algebraic loop errors by ensuring that outputs depend only on the current state. To enable nondirect feedthrough, clear the Allow direct feedthrough property.
When Allow direct feedthrough is selected, do not:
When you follow these guidelines, you allow the Simulink® solver to try to solve resultant algebraic loops.
|Truth Table (Stateflow)|
When you follow these guidelines, you allow the Simulink solver to try to solve resultant algebraic loops.