Prediction (slow->fast)
Prevent accuracy loss when connecting fixed-step networks with different step sizes
Since R2022a
Libraries:
Simscape /
Utilities /
Network Couplers /
Fundamental Components
Description
Note
Prediction and smoothing algorithms are built into the Network Coupler blocks, and you can enable them by using the check boxes in the block dialogs. The prediction and smoothing blocks in the Fundamental Components sublibrary are provided for your reference only.
Connecting a network with faster sampling (Network 1) to a network with slower sampling (Network 2) may result in accuracy loss in the Network 1 simulation when its sample times are between the sample times of Network 2. The Prediction (slow->fast) block helps prevent the accuracy loss. It predicts the output of Network 2 between its sample times by using the last computed derivative of the output of Network 2. The block implementation is a masked subsystem.
The subsystem contains blocks that run at both the slower and the faster rate. The Delay block is driven by the slower rate, and changes in its output are used as a trigger, so that the triggered subsystem captures the latest derivative of input u. The discrete-time integrator runs at the faster rate and uses this derivative to predict the output y until the next trigger event happens.