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:
Parameters
| Type | Name | Default | Description |
|---|---|---|---|
| Modelica.Units.SI.Time | samplePeriod | 1.0 | Sample period for the generation of random numbers |
| Integer | seed | 614657 | Seed to initialize random number generator |
| Real[100] | r | Random number buffer |
Components
| Type | Name | Default | Description |
|---|---|---|---|
| Real | offset | The offset for interpolation | |
| Real | rConstant | Constantly interpolated random number | |
| Real | rLinear | Linearly interpolated random number | |
| Real | rSmooth | Smoothly inteprolated random number |
Revisions
|
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 |