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年代imulation>Runto view the variant condition propagation to blocks.
TheVariant Source1
block has theA==1
condition, which propagates backward and forward to the blocks connected toVariant Source1
block. The variant condition propagates toGain4
block but does not propagate to the年代ine Wave1
block.
The年代cope
block is unconditional and receives its inputs from the年代ine Wave1
block. Therefore, the年代ine Wave1
块是无条件的。如果你删除年代cope
block, the variant condition propagates to the年代ine Wave1
block.
If you replace the年代cope
block with any other block (including theTerminator
block), the年代ine Wave1
block remains unconditional.
A block is unconditional if at least one of its inputs is unconditional. The input side of the年代um
block is connected toGain5
(conditional) block and to the年代ine Wave2
(unconditional) block. Therefore, the年代um
块是无条件的。
You can use these concepts to create a Subsystem block that controls the propagation of variant conditions to both sides or to one side.
年代top Propagation of Variant Condition Upstream and Downstream
Consider the section of the model that is connected to theVariant Source2
andVariant Source3
blocks. When you simulate the model, the Variant condition from theVariant Source2
block and theVariant Source3
blocks propagates upstream and downstream.
The年代top on both sides
block betweenGain6
and theGain7
block prevents the Variant condition from propagating upstream or downstream. Double-click the年代top on both sides
block to view its components.
The年代top on both sides
block uses aTerminator
to stop the variant condition propagation on upstream of the年代ubsystem
block. To stop the condition propagation on the downstream side of the年代ubsystem
block, one of the inports is connected to地面
(unconditional). Therefore, this arrangement stops the variant condition propagation upstream and downstream. Similarly, you can selectively stop the condition propagation of variant condition upstream or downstream for a model. For example, if you remove theTerminator
block, variant condition propagates upstream but is stopped downstream.
年代top 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.