One after the other
select 2 blocksTwo blocks connected output to input become one realization.
Exported code advances every block on its own. A feedback loop drawn as separate blocks is closed a sample late, and each block's hold assumes an input the loop is still changing. Select the loop and choose Reduce: ICore Blocks does the state-space algebra and swaps the selection for one exact State Space block, which deploys as a single discretized loop on fewer signal buffers. When the algebra has no answer, it says so and changes nothing.
A reduction doesn't change what the loop is. It changes how the deployed core advances it. The State Space block it builds is exact, so what you gain is everything the interconnection used to cost on the target.
A is discretized at once.
There is no loop delay and no hold between the blocks that made it up. Under the default
Zero-order Hold, the reduced loop is exact at every sample for a held
input.A, B, C,
D are stored dense. Constants and multiply-adds per sample grow roughly
with the square of the total state count. A small scalar loop comes out ahead on RAM. On
a large one, weigh the RAM saved against flash and cycles.This is the loop from the clip, redrawn. Each step highlights the selection first, then replaces it with the block that Reduce builds. Nothing outside the selection moves.
The same five reductions were run in the app straight after loading the model, with no simulation run first. The final block's transfer function matches the closed loop derived by hand to within 5e-16.
Edit → Reduce, or the same submenu on the canvas' right-click menu, has three entries: Series, Parallel and Feedback Loop. Between them they cover four shapes. Each one replaces the selection with a State Space block whose realization is the exact combination of the blocks it replaced.
Two blocks connected output to input become one realization.
Two blocks fed from one signal, with their outputs combined by a Sum or Subtract block. Each branch's sign is read from the input port it lands on.
A forward block and a feedback block around a summing junction. The two feedthrough terms are resolved in closed form.
The loop closes straight from the output. The signs of both inputs are read from the junction, so a positive-feedback loop reduces as correctly as a negative one.
A reduced model is one set of state equations instead of an interconnection you have to trace, and it deploys as one discretized loop. Blocks in the library are written with this in mind. A block that can't honestly present a linear form doesn't claim one, because a made-up linear form is worse than none when a reduction is going to consume it.
If both blocks in a feedback loop have direct feedthrough, the loop is algebraic: at each instant the output depends on itself. The reduction solves it in closed form, which is possible exactly when this term can be inverted:
If it is numerically zero (smaller than 1e-9 in magnitude), the loop has no unique solution. The reduction fails and leaves your diagram alone. It will never build a realization that runs and gives wrong answers, which is the failure this feature exists to avoid.
1 − DG·DH is
singular. The diagram isn't touched, and the refusal doesn't use up an undo step, so
your next Undo still reverts your last real edit.Every refusal comes with a notification naming the reason. The diagram is left as it was.
|1 − DG·DH| is below 1e-9, the loop has no unique solution.
It is refused, not approximated.ICoreAPIs::reduceSeriesSelection ·
reduceParallelSelection · reduceFeedbackSelection -
API
referenceSee also: Global solvers, per-rate subsystems · Code export
Download the application from the customer portal, or read the documentation first - the manual, a page for every block, and the full command reference are public.