Main Content

Smoothing (fast->slow)

Apply output smoothing when connecting fixed-step networks with different step sizes

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

  • Smoothing (fast->slow) block

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.

When network with faster sampling (Network 1) has high-frequency activity above what the slower network (Network 2) can sample, applying smoothing to the output of Network 1 can sometimes be advantageous because it helps you avoid picking a local peak or trough of the Network 1 activity. The Smoothing (fast->slow) block provides an averaged value of the Network 1 output to Network 2. The block implementation is a masked subsystem.

Smoothing (fast->slow) subsystem diagram

The smoothing works by averaging the last N samples. You specify N by using the Number of samples over which to smooth parameter.

Ports

Input

expand all

Connect this port to the faster network, Network 1, to capture its output.

Output

expand all

Connect this port to the input of the slower network, Network 2.

Parameters

expand all

Specify the number of samples for averaging the output of the faster network, Network 1.

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

Specify initial output value for the faster network, Network 1.

Extended Capabilities

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

Version History

Introduced in R2022a