Main Content

Prediction (discrete->continuous)

Prevent accuracy loss when connecting fixed-step network to variable-step network

Since R2022a

  • Prediction (discrete->continuous) block

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 variable-step network (Network 1) to a fixed-step network (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 (discrete->continuous) 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 and provides the inter-sample prediction to Network 1. The block implementation is a masked subsystem.

Prediction (discrete->continuous) subsystem diagram

Ports

Input

expand all

Connect this port to the fixed-step network, Network 2, to capture its output.

Output

expand all

Connect this port to the input of the variable-step network, Network 1.

Parameters

expand all

Specify sample time for the fixed-step network, Network 2, in seconds.

Extended Capabilities

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

Version History

Introduced in R2022a