Documentation

Control Variant Condition Propagation

During variant condition propagation, Simulink automatically assigns conditions to blocks. You can control how the variant condition propagates upstream and downstream in a model.

Consider this model.

In Simulink, click Simulation > Run to view the variant condition propagation to blocks.

The Variant Source1 block has the A==1 condition, which propagates backward and forward to the blocks connected to Variant Source1 block. The variant condition propagates to Gain4 block but does not propagate to the Sine Wave1 block.

The Scope block is unconditional and receives its inputs from the Sine Wave1 block. Therefore, the Sine Wave1 block is unconditional. If you remove the Scope block, the variant condition propagates to the Sine Wave1 block.

If you replace the Scope block with any other block (including the Terminator block), the Sine Wave1 block remains unconditional.

A block is unconditional if at least one of its inputs is unconditional. The input side of the Sum block is connected to Gain5 (conditional) block and to the Sine Wave2 (unconditional) block. Therefore, the Sum block is unconditional.

You can use these concepts to create a Subsystem block that controlls the propagation of variant conditions to both sides or to one side.

Stop Propagation of Variant Condition Upstream and Downstream

Consider the section of the model that is connected to the Variant Source2 and Variant Source3 blocks. When you simulate the model, the Variant condition from the Variant Source2 block and the Variant Source3 blocks propagates upstream and downstream.

The Stop on both sides block between Gain6 and the Gain7 block, prevents the Variant condition from propagating upstream or downstream. Double-click the Stop on both sides block to view its components.

The Stop on both sides block uses a Terminator to stop the variant condition propagation on upstream of the Subsystem block. To stop the condition propagation on the downstream side of the Subsystem block, one of the inports is connected to Ground (unconditional). Therefore, this arrangement stops the variant condition propagation upstream and downstream. Similarly, you can selectively stop the condition propagation of variant condition at upstream or downstream for a model. For example, if you remove the Terminator block, variant condition propagated upstream but is stopped downstream.

Stop Propagation of Variant Condition Downstream

Here, one input port of the Subsystem block is unconditional making the Subsystem block unconditional at input side and thus stopping the propagation of variant condition downstream.

More About

Was this topic helpful?