modelInterpolateRandomNumbers

Interpolate random numbers with the various interpolators

Extends from Modelica.Icons.Example (Icon for runnable examples).

Information

This example demonstrates how to use the interpolators of package Interpolators in a Modelica model. The example uses the impure random function to generate a series of random numbers. These are then interpolated piece-wise constantly, linearly and using the smooth interpolation of truncated ideal low-pass. Simulations results are shown in the figure below:

Diagram InterpolateRandomNumbers.png

Parameters

TypeNameDefaultDescription
Modelica.Units.SI.TimesamplePeriod1.0Sample period for the generation of random numbers
Integerseed614657Seed to initialize random number generator
Real[100]rRandom number buffer

Components

TypeNameDefaultDescription
RealoffsetThe offset for interpolation
RealrConstantConstantly interpolated random number
RealrLinearLinearly interpolated random number
RealrSmoothSmoothly inteprolated random number

Revisions

DLR logo Copyright © DLR Institute of System Dynamics and Control
Initial version implemented by A. Klöckner, F. v.d. Linden, D. Zimmer, M. Otter.
DLR Institute of System Dynamics and Control