modelFunctionCall

Shows how to use the internal random functions

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

Information

This example demonstrates, how the internal functions of the PRNG block can also be used in your own models: You need to instatiate the respective function with the neccessary redeclarations and then you can call the functions. Please not, that the sample-based RNGs also need handling of their states!

Parameters

TypeNameDefaultDescription
Realdt0.1The time step for discrete random numbers

Components

TypeNameDefaultDescription
Realr_continuousmy_continuous_random(time)The time-continuous noise signal
Realr_discretemy_continuous_random(integer(time/dt)*dt)The time-discrete noise signal
Realr_sampledThe sampled noise signal
Integer[1]stateThe state of the random number generator

Contents

NameDescription
my_continuous_randomThe state-less random number generator
my_sampled_randomThe state-less random number generator

Revisions

Developed 2014 at the DLR Institute of System Dynamics and Control