Main Content

Prediction (slow->fast)

Prevent accuracy loss when connecting fixed-step networks with different step sizes

  • Library:
  • Simscape / Utilities / Network Couplers / Fundamental Components

  • Prediction (slow->fast) block



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.

Prediction (slow->fast) subsystem diagram

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.



expand all

Connect this port to the slower network, Network 2, to capture its output.


expand all

Connect this port to the input of the faster network, Network 1.


expand all

Specify sample time for the slower network, Network 2, in seconds.

Specify sample time for the faster network, Network 1, in seconds.

Extended Capabilities

C/C++ Code Generation
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2022a